This topic describes how to configure a histogram.
Background information
A histogram is used to display the frequency distribution of a data set. This helps you view the distribution of data. Simple Log Service histograms support the following modes: time series mode and non-time series mode. If you want to use the x-axis to represent time, we recommend that you enable the time series mode. In time series mode, Simple Log Service automatically transforms raw data to time-formatted data and displays the distribution of data in the time dimension. For more information about the time series mode, see Time series mode.
Compared with column charts, histograms are more statistically significant. The following section describes the difference between histograms and column charts:
The x-axis in a histogram displays numeric data, such as length, weight, and time. The x-axis in a column chart displays categorical data, such as request methods.
The data on the x-axis of a histogram is continuous and contains no intervals. The data on the x-axis of a column chart is not continuous.
A histogram displays the distribution of data. A column chart displays the comparison between different categories of data.
For information about how to add a histogram to a dashboard, see Add a chart (Pro) to a dashboard.
Common Settings tab
On the Common Settings tab, you can configure global settings for the histogram.
Basic Configurations section
Parameter
Description
Title
The title of the histogram.
Show Title
If you turn on Show Title, the title of the histogram is displayed.
Show Border
If you turn on Show Border, the borders of the histogram are displayed.
Show Background
If you turn on Show Background, the background color of the histogram is displayed.
Show Time
If you turn on Show Time, the query time range of the histogram is displayed.
Fixed Time
If you turn on Fixed Time, the specified time range remains unchanged regardless of whether the global time range of the dashboard changes.
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 number of digits after the decimal point of numeric values.
Display Name
The name of the legend entries.
If you specify a display name, the name of each legend entry is changed to the display name. If you want to change the name of a legend entry, you can configure the name on the Fields tab.
Color Scheme
The color scheme that specifies the colors of the background and legend entries in the histogram.
Built-in: The built-in color is used.
Solid: You can select a color.
Histogram Settings section
Parameter
Description
Direction
The direction of the histogram. Valid values: Vertical and Horizontal.
Coordinate Scale
The interval between values on the x-axis. This parameter is available only in non-time series mode.
Time Scale
The time scale. This parameter is available only in time series mode.
Time Range
The interval between values on the x-axis. This parameter is available only in time series mode.
Buckets
The number of buckets.
If you have already configured the Coordinate Scale parameter in non-time series mode, you do not need to specify the number of buckets.
Rotation Angle
The direction of the text on the x-axis.
If you set the Direction parameter to Vertical, you must configure this parameter.
Merge Columns
If you specify multiple fields for the y-axis, you can configure the Merge Columns to specify the manner in which the columns are displayed.
No: The value of each field is counted from the bottom of each column.
Yes: The values of fields are merged into one column.
Stacked: The columns of different categories are stacked and do not overlap with each other.
Connector Width
The width of the border.
Transparency
The transparency of the histogram.
Gradient Mode
The gradient mode of the histogram.
Transparency: The gradient is based on the column color and the value of the Transparency parameter.
No: No gradient is used. The column color is based on the setting of the Color Scheme parameter.
Configure Query and Analysis 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. You can specify multiple fields to generate a grouped histogram.
By default, Simple Log Service automatically selects an appropriate field for the y-axis.
Legend Configurations section
Parameter
Description
Display Legend
If you turn on Display Legend, the legend is displayed in the histogram.
Legend
The position of the legend in the histogram.
Actions
The method that is used to display the data of legend entries.
Single: If you click a legend entry, only the data of the legend entry is displayed in the histogram.
Switch: If you click a legend entry, the data of the legend entry is hidden or displayed in the histogram.
Maximum Width (Height)%
The maximum width and height of the legend.
Tooltip Configurations section
Parameter
Description
Sorting Order
The sorting method of data.
When you move the pointer over a column whose data you want to view, the data is displayed based on the sorting method that you specified.
Display Mode
The display mode of data.
When you move the pointer over a column whose data you want to view, the data is displayed based on the display mode that you specified.
Axis X section
Parameter
Description
Display Axis X
If you turn on Display Axis X, the x-axis of the histogram is displayed.
Axis X Title
The title of the x-axis.
Format
The format of the time on the x-axis. This parameter is valid only in time series mode.
Axis X Height
The height of the x-axis.
By default, Simple Log Service automatically specifies the height of the x-axis
Drag and Zoom
In time series mode, the global time or the current single chart time is refreshed after you drag and zoom specific columns.
Axis Y section
Parameter
Description
Display Axis Y
If you turn on Display Axis Y, the y-axis of the histogram 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.
Max Value
The maximum value that can be displayed on the y-axis.
By default, Simple Log Service automatically specifies the maximum value of the y-axis.
Minimum
The minimum value that can be displayed on 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. In most cases, this parameter does not take effect if you configure only one y-axis on the Common Settings tab. If you want to configure multiple y-axes, you must configure the required parameters on the Fields 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 histogram.
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, they are merged into one y-axis. If two y-axes have the same unit but different IDs, they are displayed as two y-axes.
Replace Variable section
Parameter
Description
Replace Variable
The variable replacement. You can click Add Replace Variable to add a filter of the Replace Variable type to a single chart. After you configure the variable replacement on the Common Settings tab, Simple Log Service adds a filter in the upper-left corner of the 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 chart with the value that you specified for the variable, and performs a query and analysis operation. For more information, see Example 2: Configure variable replacement.
Parameters in the Replace Variable section
Parameter
Description
Replace Variable
The settings of variable replacement. You can click AddReplace Variable to add a filter of the Replace Variable type to a single chart. After you configure the settings of variable replacement on the Common Settings tab, Simple Log Service adds a filter in the upper-left corner of the 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 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.
Documentation section
Parameter
Description
Add Documentation Link
The button that allows you to specify custom documentation links and descriptions. After you configure the settings, a documentation icon is displayed in the upper-right corner of the histogram.
Fields tab
You can configure custom display settings for the result of a single query statement or for a single column in the result. For information about the parameters on the Fields tab, see Common Settings tab.
For example, if you want to specify a custom color for the columns of a field on the y-axis, you can configure the field on the Fields tab. In this example, the A > GET field is added to configure the GET column in the result of Query Statement A. The A > POST field is added to configure the POST column in the result of Query Statement A.
Interaction Occurrences tab
You can configure an interaction occurrence for the result of a single query statement or for a single column of data in the result to analyze data in a fine-grained manner. You can configure the following interaction occurrences: Open Logstore, Open Saved Search, Open Dashboard, Open Trace Analysis, Open Trace Details, and Create Custom HTTP URL. For more information, see Drill-down events.
In this example, the A > GET field is added to configure an interaction occurrence for the GET column in the result of Query Statement A. After you configure the Open Logstore interaction occurrence for the GET column in the result of Query Statement A, you can move the pointer over a yellow column and then click Open Logstore. You are redirected to the Logstore that you specified in the interaction occurrence.