All Products
Search
Document Center

Simple Log Service:Set aliases and colors for a multi-axis chart

Last Updated:Nov 13, 2024

A multi-axis chart allows you to view differences among multiple metrics on the dashboard. You can assign aliases and colors to each metric for easier distinction.

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(request_url) as pv,count(request_url)-50 as pv1,count(request_url)+50 as pv2 group by __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, pv1, and pv2.

    image

Step 3: Set aliases and colors

Set aliases

Standard Configurations > Display Name: Assign aliases to the axis Y fields.

image

Set colors

Standard Configurations > Color Scheme > Solid: Set different colors for different fields of the axis Y.

image