All Products
Search
Document Center

Simple Log Service:Scatter chart

Last Updated:Nov 21, 2024

A scatter chart is a data visualization tool that you can use to display the relationship between two variables. This topic describes how to configure a scatter chart. This topic also provides examples of scatter charts.

Overview

A scatter chart is used to display the relationship between two variables in a Cartesian coordinate system by using data points. Each point consists of two sets of data. One set corresponds to a value on the x-axis, and the other corresponds to a value on the y-axis. You can determine the degree to which two variables interact with each other based on the positions, distribution, and density of the points.

Configuration example

  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, 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

  3. On the right side of the Edit Chart page, select Scatter Chart in the Chart Types section and configure parameters in the Query and Analysis Configurations 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 scatter chart. After you complete the configuration, click Apply in the upper part of the Edit Chart page to view the configuration effects of the scatter chart.

    image

    The following query statement is used to query the number of requests and the average request duration by time and request method:

    * | select __time__ - __time__ % 60 as time, COUNT(*) as pv, avg(request_time) as duration, request_method GROUP BY time, request_method order by time limit 1000

    The preceding figure shows a scatter chart that displays the number of requests and the average request duration by time and request method.

    • Points in different colors indicate different request methods.

    • The position of a point in the y-axis indicates the average request duration for the related request method. A point in a higher position indicates a longer average request duration for the related request method within the specified period of time.

    • The size of a point indicates the number of requests for the related request method. A point of a larger size indicates a larger number of requests for the related request method within the specified period of time.

Configuration on the General Configurations tab

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

  • Basic Configurations

    Parameter

    Description

    Title

    The title of the chart.

    Display Title

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

    Display Border

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

    Display Background

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

    Display Time

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

    Fixed Time

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

  • Standard Configurations

    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 name of the display field.

    If you specify a value for Display Name, the value is used as the names for all display fields in the chart. If you want to change the name of a display field, you must configure parameters on the Field Configuration tab.

    Color Scheme

    The color scheme of the chart.

    • 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 Query and Analysis Configurations section

    Parameter

    Description

    Axis X Field

    Select a field for the x-axis.

    By default, Simple Log Service automatically selects an appropriate field for the x-axis.

    Axis Y Field

    Select a field for the y-axis.

    By default, Simple Log Service automatically selects an appropriate field for the y-axis.

    Category Column

    The field that is used to categorize data.

    Point Size Column

    The field that affects the sizes of points. Simple Log Service dynamically changes the sizes of points based on the values of the selected field.

  • Parameters in the Chart Configurations section

    Parameter

    Description

    Line Width

    The width of the lines in the scatter chart.

    Transparency

    The transparency of the points in the scatter chart.

    Point Size

    The size of the points in the scatter chart.

    Note

    If you configure the Point Size Column parameter, the setting of the Point Size parameter does not take effect.

    Shape

    The shape of the points in the scatter chart. Valid values: Circle, Square, and Triangle.

    Axis Y Grouping

    You can turn on Axis Y Grouping after you configure the Category Column parameter.

  • Parameters in the Axis X section

    Parameter

    Description

    Display Axis X

    If you turn on Display Axis X, the x-axis of the scatter chart is displayed.

    Axis X Title

    The title of the x-axis.

    Format

    The format of the values on the x-axis.

    Axis X Height

    The height of the x-axis.

    By default, Simple Log Service automatically specifies the height of the x-axis.

  • Parameters in the Axis Y section

    Parameter

    Description

    Display Axis Y

    If you turn on Display Axis Y, the y-axis of the scatter chart is displayed.

    Axis Y Title

    The title of the y-axis.

    Axis Y Position

    The position of the y-axis.

    Axis Y Width

    The width of the y-axis.

    By default, Simple Log Service automatically specifies the width of the y-axis.

    Maximum Value

    The maximum value of the y-axis.

    By default, Simple Log Service automatically specifies the maximum value of the y-axis.

    Minimum Value

    The minimum value of the y-axis.

    By default, Simple Log Service automatically specifies the minimum value of the y-axis.

    Elastic Maximum Value

    The elastic maximum value of the y-axis. The elastic maximum value takes effect only when all values of the y-axis are less than the elastic maximum value.

    By default, Simple Log Service automatically specifies the elastic maximum value of the y-axis.

    Elastic Minimum Value

    The elastic minimum value of the y-axis. The elastic minimum value takes effect only when all values of the y-axis are greater than the elastic minimum value.

    By default, Simple Log Service automatically specifies the elastic minimum value of the y-axis.

    Axis Y ID

    The ID of the y-axis. If you configure only one y-axis on the General Configurations tab, this parameter does not take effect. If you want to configure multiple y-axes, you must configure the required parameters on the Field Configuration tab. The ID of the y-axis is a string. A y-axis that has a specified ID represents a unique y-axis in a scatter chart.

    The specified ID for the y-axis takes precedence over the unit that you specify in the Standard Configurations section. For example, if two y-axes have the same unit, the y-axes are merged into one y-axis. If two y-axes have the same unit but different IDs, the y-axes are displayed as two y-axes.

  • Parameters in the Legend Configurations section

    Parameter

    Description

    Display Legend

    If you turn on Display Legend, the legend is displayed in the scatter chart.

    Sorting Order

    The order in which the legend items are sorted.

    Legend Position

    The position of the legend in the scatter chart.

    Actions

    The data display effect when you click a legend item. Valid values:

    • Single: If you click a legend item, only the data for the legend item is displayed in the scatter chart.

    • Switch: If you click a legend item, the data for the legend item is hidden or displayed in the scatter chart.

    Maximum Width (Height)%

    The maximum width and height of the legend.

  • Parameters in the Tooltip Configurations section

    Parameter

    Description

    Additional Information

    The additional information. After you specify additional information, the information is displayed in a card when you move the pointer over a point.

    You can specify variables. Example: Method:${{request_method}}\nQuantity: ${{pv}}. \n specifies a line feed.

  • 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 points in the scatter chart are displayed in different colors based on the specified thresholds.

  • 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 scatter chart. 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 scatter chart. You can select a value from the filter drop-down list. After you select a value, Simple Log Service automatically replaces the variable in the query statement of the scatter chart 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 scatter 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.

The following figure provides an example of a scatter chart. In this chart, the y-axis field is set to duration. If you want to add units to the values on the y-axis, you can select Standard Configurations > Unit from the Add Configuration drop-down list and select a unit in the A > duration section.

散点图

Configuration on the Interaction Occurrences tab

You can configure an interaction occurrence for a single field or the results of a single query statement 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 > duration to configure an Open Logstore interaction occurrence for the duration field in the results of Query Statement A. After you configure the interaction occurrence, you can click a point in the scatter chart and click Open Logstore. Then, you are navigated to the Logstore that you specify.

散点图