This topic explains how to configure the x-axis and y-axis of a line chart.
Prerequisites
Log data is collected. For more information, see Collect text logs from hosts.
Indexes are created. For more information, see Create an index.
Overview

-
Search & Analysis: You can query and analyze logs in the console, such as log search, log aggregation, and log statistics.
-
Add a chart: A dashboard consists of one or more charts. Each chart is based on one or more query statements.
-
Configure the x-axis and y-axis of a line chart: Set the x-axis and y-axis for the chart.
Step 1: Query and analyze logs
Log on to the Simple Log Service console. In the Projects section, click the project you want.

On the tab, click the logstore you want.

-
Enter a query statement and click Last 15 Minutes to set the time range for the query.
Example:
-
The query statement for Query A is:
* | select __time__,count(request_url) as pv group by __time__
-
Step 2: Add a chart
In the left-side navigation pane, choose . In the Dashboard list, click the dashboard you want. In the upper-right corner of the dashboard page, click Edit. In edit mode, choose .

-
Under , select
. On the Search & Analysis tab, select Logstore (SQL), select the target Logstore, and then enter a query statement.From the drop-down list in the upper-right corner, select a time range, such as Last 15 Minutes. Click .
-
: Select
__time__for Axis X Field andpvfor Axis Y Field.

-
Step 3: Configure the x- and y-axes
X-axis
X-axis visibility
: To show or hide the x-axis, turn the Display Axis X option on or off.

X-axis formatting
Formatting for the x-axis is available only in Time Series Mode. The following figure shows the Time Series Mode toggle and time formatting options.

Y-axis
Y-axis visibility
: To show or hide the y-axis, turn the Display Axis Y option on or off.

Maximum and minimum values
Set the maximum and minimum values for the y-axis.

Multiple series
Modify the query statement to: * | select __time__,count(request_url) as pv,count(request_url)-50 as pv1,count(request_url)+50 as pv2 group by __time__.
: Select the three fields pv, pv1, and pv2.

Thresholds
In the section, select pv2 for Upper Boundary and pv1 for Lower Boundary. For Boundary Fill Color, select red.
