All Products
Search
Document Center

Simple Log Service:Statistical chart

Last Updated:Dec 17, 2024

A statistical chart is a visualization tool that is used to display the trends and distribution of data in an intuitive manner. You can configure a statistical chart that includes only a single value chart. You can also configure a statistical chart that includes multiple single value charts to display the results of multiple query statements. This topic describes how to configure a statistical chart.

Overview

A statistical chart can contain one or more single value charts. You can use a single value chart to display a single numeric value. The following figure shows sample single value charts. Each colored rectangle represents a single value chart.

统计图Pro版本

For more information about the entry point to add a statistical chart, see Add a chart to a dashboard.

Configuration effect

Statistical chart type

Sample statistical chart

References

Basic statistical chart

image

Configure a basic statistical chart

Trend chart

image

Configure a trend chart

Statistical chart that supports threshold configuration

ff454563dcdb0fb734205803218743e8 2aed352e908ee1c0236c225531159aa8

Specify thresholds for a statistical chart

Statistical chart that supports multi-statement query

image

Configure a statistical chart that supports multi-statement query

Configure a basic statistical chart

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

    image

  2. In the left-side navigation pane, choose Dashboard > Dashboards. In the Dashboard list, click the dashboard that you want to manage. In the upper-right corner of the dashboard that you want to modify, click Edit. In the edit mode, choose Add > Add Chart.

  3. On the right side of the Edit Chart page, select Single Value Chart Pro in the Chart Types section and configure parameters in the Search & Analysis Settings section based on the following figure. On the left side of the Edit Chart page, configure the query time range, Logstore, and query statement for the statistical chart. After you complete the configuration, click Apply in the upper part of the Edit Chart page to view the configuration effects of the statistical chart.

    image

    The following query statement is used to query the number of page views (PVs) of a web page:

    status < 400 | SELECT count(*) AS PV

Configuration on the General Configurations tab

You can configure global settings for a statistical chart on the General Configurations tab.

  • Parameters in the Basic Configurations section

    Parameter

    Description

    Title

    The title of the statistical chart.

    Display Title

    If you turn on Display Title, the title of the statistical chart is displayed.

    Display Border

    If you turn on Display Border, the borders of the statistical chart are displayed.

    Display Background

    If you turn on Display Background, the background color of the statistical chart is displayed.

    Display Time

    If you turn on Display Time, the query time range of the statistical chart is displayed.

    Fixed Time

    If you turn on Fixed Time, the query time range of the statistical chart is independent of the global time range of the dashboard.

  • Parameters in the Standard Configurations section

    Parameter

    Description

    Format

    The display format of numeric values.

    Unit

    The unit of numeric values.

    Number of Digits after Decimal Point

    The decimal places of numeric values.

    Display Name

    The display name of a single value chart.

    If you specify a value for the Display Name parameter, the value is used as the names for all single values charts in the statistical chart. If you want to change the name of a single value chart, you must configure parameters on the Field Configuration tab.

    Color Scheme

    The color scheme that specifies the background color of the statistical chart. Valid values:

    • Built-in: uses the built-in color scheme.

    • Solid: uses the color that you select.

    • Threshold: uses different colors for different values based on the specified thresholds for the values.

  • Parameters in the Data Configuration section

    Parameter

    Description

    Display Mode

    The display mode of data in the statistical chart. Valid values:

    • Calculation Result: displays the calculation results of all values of a field based on the query and analysis results.

    • All Values: displays all values of a field based on the query and analysis results.

    Function

    If you set the Display Mode parameter to Calculation Result, you must select a function to calculate the query and analysis results.

    For example, if you set the Function parameter to Maximum Value, the statistical chart displays the maximum value of a field based on the query and analysis results.

    Limit

    If you set the Display Mode parameter to All Values, you can configure the Limit parameter to specify the number of values that you want to display in the statistical chart.

    Layout

    The layout of the single value charts in the statistical chart. Valid values:

    • Automatic: arranges single value charts in an adaptive manner.

    • Horizontal: arranges single value charts from left to right.

      You can configure the Minimum Width parameter to specify the minimum width for single value charts.

    • Vertical: arranges single value charts from top to bottom.

      You can configure the Minimum Height parameter to specify the minimum height for single value charts.

  • Parameters in the Chart Style section

    Parameter

    Description

    Text Mode

    The text that you want to display in a single value chart. Valid values:

    • Auto: displays text based on the query and analysis results.

    • Value: displays only a numeric value.

    • Value and Title: displays a numeric value and a title.

    • Title: displays only a title.

    • None: No content is displayed.

    Title Font Size

    The font size of the title for a single value chart.

    Value Font Size

    The font size of the numeric value for a single value chart.

    Color Mode

    The color of a single value chart. Valid values:

    • None: No color is displayed for the single value chart.

    • Value: displays the numeric value and the trend chart in a specific color.

    • Background: displays the background and the trend chart in a specific color.

    Background Color or Font Color

    The background color or the font color of the numeric value in a single value chart.

    • If you set the Color Mode parameter to Value, you can configure the Background Color parameter to specify the background color for the single value chart.

    • If you set the Color Mode parameter to Background, you can configure the Font Color parameter to specify the font color for the numeric value in the single value chart.

    Image Mode

    Specifies whether to display a trend chart in a single value chart. Valid values:

    • None: displays only a numeric value.

    • Trend Chart: displays a trend chart.

    Text Alignment

    The mode in which the text of a single value chart is aligned. Valid values:

    • Automatic: aligns the text in an adaptive manner.

    • Center: locates the text in the center of the single value chart.

  • Parameters in the Search & Analysis Settings section

    Parameter

    Description

    Displayed Fields

    The field that you want to display in a single value chart.

    Description Field

    The field whose value you want to add a description to.

    Compared Field

    The field whose value you want to compare with the value of the Displayed Fields parameter.

    Compare Value Format

    The display format of the comparison value.

    Comparison Result Description

    The description of the comparison value.

    Comparison Value Unit

    The unit of the comparison value.

    Trend Comparison Threshold

    The threshold that is used to measure the trend of the comparison value.

    Number of Digits after Decimal Point

    The decimal places of numeric values.

    Description Font Size

    The font size of the description.

  • Parameters in the Threshold section

    Parameter

    Description

    Threshold

    The thresholds of numeric values.

    If you set the Color Scheme parameter to Threshold and specify thresholds in the Threshold section, the text in the statistical chart is displayed in different colors based on the specified thresholds.

  • Parameters in the Value Mapping section

    Parameter

    Description

    Value Mapping

    The text or icon that you want to use to replace a specified value in the statistical chart.

    For example, if you set the Value parameter to 200, the Mapping Type parameter to Text, and the Mapping Value parameter to Success, all values of 200 in the statistical chart are replaced with Success.

  • Parameters in the Variable Replacement section

    Parameter

    Description

    Variable Replacement

    The settings for variable replacement. You can click AddVariable Replacement to add a filter of the Variable Replacement type to the table. After you configure the settings for variable replacement on the General Configurations tab, Simple Log Service adds a filter in the upper-left corner of the table. You can select a value from the filter drop-down list. Then, Simple Log Service automatically replaces the variable in the query statement of the table with the variable value indicated by the value that you select, and performs a query and analysis operation. For more information, see Example 2: Configure variable replacement.

  • Parameters in the Documentation section

    Parameter

    Description

    Add Documentation Link

    The button that allows you to specify custom document links and descriptions. After you configure the settings, the specified information is displayed in the upper-right corner of the statistical chart.

Configuration on the Field Configuration tab

You can configure personalized display settings for the results of a single query statement or for a single column of data in the results. For more information, see Configuration on the General Configurations tab.

In this example, five query statements named A, B, C, D, and E are added to query the number of requests by request method. The results of the query statements are displayed in a statistical chart. You can choose General Configurations > Search & Analysis Settings to specify a displayed field for each query statement to generate five single value charts for the statistical chart. On the Field Configuration tab, you can configure different colors for the single value charts. The following figure shows the configuration effects of the statistical chart.

  • A > GET: Select the GET field in the results of Query Statement A as the displayed field, select Solid from the Standard Configurations > Color Scheme drop-down list, and then specify purple for the single value chart of the GET field.

  • B > POST: Select the POST field in the results of Query Statement B as the displayed field, select Solid from the Standard Configurations > Color Scheme drop-down list, and then specify blue for the single value chart of the POST field.

  • C > PUT: Select the PUT field in the results of Query Statement C as the displayed field, select Solid from the Standard Configurations > Color Scheme drop-down list, and then specify orange for the single value chart of the PUT field.

  • D > D: Select the D field in the results of Query Statement D as the displayed field, select Solid from the Standard Configurations > Color Scheme drop-down list, and then specify yellow for the single value chart of the D field. DELETE is a keyword in SQL syntax and cannot be used as a field name in analytic statements. In this case, you can specify DELETE in the Standard Configurations > Display Name field.

  • E > HEAD: Select the HEAD field in the results of Query Statement E as the displayed field, select Solid from the Standard Configurations > Color Scheme drop-down list, and then specify red for the single value chart of the HEAD field.

统计图Pro

Configuration on the Interaction Occurrences tab

You can configure an interaction occurrence for the results of a single query statement or for a single column of data in the results to analyze data in a finer-grained manner. Supported types of interaction occurrences include Open Logstore, Open Saved Search, Open Dashboard, Open Trace Analysis, Open Trace Details, and Create Custom HTTP URL. For more information, see Interaction occurrences.

For example, you can select A > PV to configure an Open Logstore interaction occurrence for the PV field in the results of Query Statement A. After you configure the interaction occurrence, you can click the value of the PV field in the statistical chart and click Open Logstore. Then, you are navigated to the Logstore that you specify.

image