This topic describes how to configure an individual value plot to display query results. It also includes examples.

Background information

The individual value plot highlights a single value. Individual value plots include the following types:
  • Rectangle Frame: displays a general value.
  • Dial: shows how close the current value is to the configured threshold.
  • Compare Numb Chart: shows the SQL query results of interval-valued comparison and periodicity-valued comparison functions. For more information about the analytics syntax, see Interval-valued comparison and periodicity-valued comparison function.

Rectangle Frame is selected by default. A rectangle frame is the simplest way to display data at a point. It is used to show the key information of a time point. To display a proportional metric, you can use a dial.

The basic elements of an individual value plot are as follows:
  • Numeric value
  • (Optional) Unit
  • (Optional) Description
  • Chart type

Procedure

  1. On the Search & Analysis page of a Logstore, enter a search and analytics statement in the search box, specify the time range, and then click Search & Analyze.
    The Chart tab is automatically displayed when a query is completed.
  2. Click Individual value plot - 001 to display the query results in an individual value plot.
  3. On the Properties tab on the right, configure the properties of the individual value plot.
    Note Log Service automatically normalizes data in numeric value-based charts. For example, 230000 is processed as 230K. You can include Mathematical calculation functions in search and analytics statements to customize numeric formats.
    • The following table describes the configuration items of a rectangle frame.
      Configuration item Description
      Chart Types The type of the chart. Select Rectangle Frame.
      Value Column Data in the first row of the specified column is displayed by default.
      Unit The unit of data.
      Unit Font Size The font size of the unit. You can drag the slider to adjust the font size. Valid values: [10, 100]. Unit: pixels.
      Description The description of the value.
      Description Font Size The font size of the value description. You can drag the slider to adjust the font size. Valid values: [10, 100]. Unit: pixels.
      Format The format in which data is displayed.
      Font Size The font size of the value. You can drag the slider to adjust the font size. Valid values: [10, 100]. Unit: pixels.
      Font Color The color of the value, unit, and description in the chart. You can select the default color or customize a color.
      Background Color The color of the background. You can select the default color or customize a color.
    • The following table describes the configuration items of a dial.
      Configuration item Description
      Chart Types The type of the chart. Select Dial to display query results on a dial.
      Actual Value Data in the first row of the specified column is displayed by default.
      Unit The unit of the value on the dial.
      Font Size The font size of the value and unit. Valid values: [10, 100]. Unit: pixels.
      Description The description of the value.
      Description Font Size The font size of the value description. You can drag the slider to adjust the font size. Valid values: [10, 100]. Unit: pixels.
      Dial Maximum The maximum value of the scale on the dial. Default value: 100.
      Maximum Value Column The maximum value in the specified column. If you turn on the Use Query Results switch, Dial Maximum is replaced by Maximum Value Column. Then you can select the maximum value from query results for this configuration item.
      Use Query Results Specifies whether to select a value from query results. If you turn on the Use Query Results switch, you can select the maximum value from query results for Maximum Value Column.
      Format The format in which data is displayed.
      Colored Regions The number of segments that the dial is divided into. Each segment is displayed in a different color.

      Valid values: 2, 3, 4, and 5. Default value: 3.

      Region Max Value The maximum value of the scale in each colored segment of the dial. By default, the maximum value in the last segment is the maximum value on the dial. You do not need to specify this value.
      Note A dial is evenly divided into three colored segments by default. If you change the value of Colored Regions, Region Max Value is not automatically adjusted. You can set the maximum value for each colored segment based on your needs.
      Font Color The color of the value on the dial.
      Region The colored segment that the dial is divided into. A dial is evenly divided into three segments by default, which are displayed in blue, yellow, and red.

      If you set Colored Regions to a value greater than 3, the added segments are displayed in blue by default. You can change the color of each segment.

    • The following table describes the configuration items of a comparison chart.
      Configuration item Description
      Chart Types The type of the chart. Select Compare Numb Chart to display query results in a comparison chart.
      Show Value The value displayed in the center of the comparison chart. In most cases, this value is set to the statistical result calculated by the relevant comparison function in the specified time range.
      Compare Value The value used to compare with the threshold. In most cases, this value is set to the result of comparison between the statistical results calculated by the relevant comparison function in the specified time range and in the previously specified time range.
      Font Size The font size of the show value. Valid values: [10, 100]. Unit: pixels. You can turn on the Adaptive switch to enable self-adaptive behavior of the font size.
      Unit The unit of the show value.
      Unit Font Size The font size of the unit for the show value. Valid values: [10, 100]. Unit: pixels.
      Compare Unit The unit of the compare value.
      Compare Font Size The font size of the compare value and its unit. Valid values: [10, 100]. Unit: pixels.
      Description The description of the show value and its growth trend.
      Description Font Size The font size of the description. Valid values: [10, 100]. Unit: pixels.
      Trend Comparison Threshold The value used to measure the variation trend of the compare value.
      For example, the compare value is -1:
      • If you set Trend Comparison Threshold to 0, a down arrow is displayed on the page, indicating a value decrease.
      • If you set Trend Comparison Threshold to -1, the system determines that the value remains unchanged and does not display the trend on the page.
      • If you set Trend Comparison Threshold to -2, an up arrow is displayed on the page, indicating a value increase.
      Format The format in which data is displayed.
      Font Color The color of the show value and its description.
      Growth Font Color The font color of the compare value that is greater than the threshold.
      Growth Background Color The background color displayed when the compare value is greater than the threshold.
      Decrease Font Color The font color displayed when the compare value is less than the threshold.
      Decrease Background Color The background color displayed when the compare value is less than the threshold.
      Equal Background Color The background color displayed when the compare value is equal to the threshold.

Examples

Run the following search and analytics statements to view the number of requests and display the analysis results in charts:

  • Rectangle frame
    * | select count(1) as pv
    Rectangle frame
  • Dial
    * | select count(1) as pv
    Dial
  • Comparison chart
    View the comparison of today's requests and yesterday's requests:
    * | select diff[1],diff[2], diff[1]-diff[2] from (select compare( pv , 86400) as diff from (select count(1) as pv from log))
    Comparison chart