All Products
Search
Document Center

Simple Log Service:Set the chart type to line chart, area chart, column chart, or cross table

Last Updated:Nov 04, 2024

This topic explains how to configure the graph type for flow charts, including line charts, area charts, column charts, and cross tables.

Prerequisites

Step 1: Query and analyze data

  1. Log on to the Simple Log Service console. In the Projects section, click the project you want.

  2. In the left-side navigation pane, click Log Storage. In the Logstores list, click the logstore you want.

    image

  3. Enter the query and analysis statement, and set the time range for your query and analysis, such as Last 15 Minutes.

    Example:

    * | select __time__,count(0) as pv group by request_method,__time__

Step 2: Add a chart

  1. In the left-side navigation pane, choose Dashboard > Dashboards. In the dashboard list, click the dashboard you want. In the upper-right corner of the dashboard page, click Edit. In edit mode, click Add > Add Chart.

    image

  2. On the General Configurations tab, click image in the Chart Types section. On the Search & Analysis tab, select Logstore (SQL) and choose the logstore you want, and enter the query statement. Select a time range, such as Last 15 Minutes, and click OK > Save.

    • Query and Analysis Configurations: Set Axis X Field to __time__, and Axis Y Field to pv.

    In the chart, the X axis __time__ is in Unix format. Enable Time Series Mode and set the Format to YYYY-MM-DD hh:mm:ss. For more information, see Time series mode.image

Step 3: Set the chart type to line chart, area chart, column chart, or cross table

Line chart

To configure the field pv to be displayed as a line chart, choose Flow Chart Configurations > Flow Chart Type > Line Chart.

image

Area chart

To configure the field pv to be displayed as an area chart, choose Flow Chart Configurations > Flow Chart Type > Area Chart.

image

Column chart

To configure the field pv to be displayed as a column chart, choose Flow Chart Configurations > Flow Chart Type > Column Chart.

image

Cross table

To configure the field pv to be displayed as a cross table, choose Flow Chart Configurations > Flow Chart Type > Cross Table.

image