This topic describes how to configure a progress bar to display query results. It also includes examples.

Background information

The progress bar shows the percentage of the actual value of a field to the maximum value of the field. You can configure the properties of the progress bar to adjust its style and set display rules.

The basic elements of a progress bar are as follows:
  • Actual value
  • (Optional) Unit
  • Total value

Procedure

  1. Log on to the Log Service console.
  2. Click the target project in the Projects section.
  3. Choose Log Management > Logstores, click the management icon of the target Logstore, and then select Management icon > Search & Analysis.
  4. Enter a query statement in the search box, select a time range, and then click Search & Analyze.
  5. Click Progress bar - 001 to display the query results in a progress bar.
  6. On the Properties tab on the right, configure the properties of the progress bar.
    Configuration item Description
    Actual Value The actual value in the chart. The data in the first row of the specified column is displayed by default.
    Unit The unit of the value in the progress bar.
    Total Value The maximum value indicated by the progress bar. Default value: 100.
    Maximum Value Column The maximum value in the specified column. If you turn on the Use Query Results switch, Total Value 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.
    Edge Shape The edge shape of the progress bar.
    Vertical Display Specifies whether to display the progress bar in the vertical mode.
    Font Size The font size of the progress bar.
    Thickness The thickness of the progress bar.
    Background Color The background color of the progress bar.
    Font Color The font color of the progress bar.
    Default Color The default color of the progress bar.
    Color Display Mode The color display mode of the progress bar.
    Start Color The start color of the progress bar. This configuration item is available when Color Display Mode is set to Gradient.
    End Color The end color of the progress bar. This configuration item is available when Color Display Mode is set to Gradient.
    Display Color The display color of the progress bar. This configuration item is available when Color Display Mode is set to Display by Rule.
    Note The value of Actual Value is compared with that of Threshold based on the condition specified by Operator. If the actual value matches the condition specified by Operator, the progress bar is displayed in the color specified by Display Color. Otherwise, the progress bar is displayed in the default color.
    Operator The condition that is used to determine the color of the progress bar. This configuration item is available when Color Display Mode is set to Display by Rule.
    Threshold The threshold that is used to determine the color of the progress bar. This configuration item is available when Color Display Mode is set to Display by Rule.

Examples

You can use the progress bar to display the percentage of a metric or the proportion of data.
* | select diff[1],diff[2] from (select compare( pv , 86400) as diff from (select count(1) as pv from log))
Bar chart - 001
When you select Display by Rule as the color display mode, the progress bar changes its color according to the specified condition. If the specified condition is not met, the progress bar is displayed in the default color.Bar chart - 002