A column chart can also be a bar chart. You can use a column chart to visualize the results of multiple query statements. You can also configure personalized display settings on the Field Configuration tab. This topic describes how to configure a column chart.
Overview
A column chart uses vertical bars to display the values of different categories. You can use a column chart to display the number of values in each category. A bar chart uses horizontal bars. Bar charts are often used in top-N analysis.
For more information about the entry point to add a column chart or a bar chart, see Add a chart to a dashboard.
Configuration effect
Column chart type | Sample column chart | References |
Basic column chart | ||
Grouped column chart and stacked column chart |
Configuration example
Basic column chart
Configuration on the General Configurations tab
You can configure global settings for a column chart on the General Configurations tab.
Parameters in the Basic Configurations section
Parameter
Description
Title
The title of the column chart.
Display Title
If you turn on Display Title, the title of the column chart is displayed.
Display Border
If you turn on Display Border, the borders of the column chart are displayed.
Display Background
If you turn on Display Background, the background color of the column chart is displayed.
Display Time
If you turn on Display Time, the query time range of the column chart is displayed.
Fixed Time
If you turn on Fixed Time, the query time range of the column 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 name of the legend.
If you specify a value for the Display Name parameter, the value is used as the name for all items in the legend that is displayed in the column chart. If you want to change the name of an item in the legend, you can configure parameters on the Field Configuration tab.
Color Scheme
The color scheme that specifies the background color and legend colors of the column chart. Valid values:
Built-in: uses the built-in color scheme.
Solid: uses the color that you select.
Parameters in the Column Settings section
Parameter
Description
Direction
The direction of the columns in the chart. The direction is used to distinguish between column charts and bar charts. Valid values:
Vertical: a column chart.
Horizontal: a bar chart.
Group Width
The width of the group.
Column Width
The width of the column.
Rotation Angle
The direction of the text on the x-axis.
If you set the Direction parameter to Vertical, you must configure this parameter.
Display Value
Specifies whether to display numeric values in the column chart.
Value Font Size
The size of the text displayed in the column chart.
Line Width
The width of the border.
Transparency
The transparency of the column chart.
Gradient Mode
The gradient mode of the column chart. Valid values:
Transparency: If you select this mode, the column chart has a color gradient that is affected by the column color and the value of the Transparency parameter.
No Gradient: If you select this mode, the column chart does not have a color gradient. The column color is used in the column chart.
Parameters in the Query and Analysis Configurations section
Parameter
Description
Axis X Field
Select a field as the x-axis.
By default, Simple Log Service automatically selects an appropriate field as the x-axis.
Axis Y Field
Select a field as the y-axis. You can specify multiple fields to generate a grouped column chart.
By default, Simple Log Service automatically selects an appropriate field as the y-axis.
Parameters in the Legend Configurations section
Parameter
Description
Display Legend
If you turn on Display Legend, the legend is displayed in the column chart.
Legend Position
The position of the legend in the column 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 column chart.
Switch: If you click a legend item, the data for the legend item is hidden or displayed in the column chart.
Maximum Width (Height)%
The maximum width and height of the legend.
Parameters in the 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 specify.
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 specify.
Parameters in the Axis X section
Parameter
Description
Display Axis X
If you turn on Display Axis X, the x-axis of the column chart is displayed.
Axis X Title
The title of 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 column 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 column 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, 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.
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 column chart.
Configuration on the Fields 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.
For example, you can select A > uv to configure settings for the uv field in the results of Query Statement A. You can add a different y-axis. This way, the uv and avg fields are represented by different y-axes in the same column chart. In the following figure, the left y-axis displays the values of the avg field and the right y-axis displays the values of the uv field.
Configuration on the Interaction Events 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, in the A section, you can configure an Open Logstore interaction occurrence for the results of Query Statement A. After you configure the interaction occurrence, you can click a point in the column chart and click Open Logstore. Then, you are navigated to the Logstore that you specify.
Sample grouped column chart
* | select host, COUNT(*) as pv, approx_distinct(remote_addr) as uv GROUP BY host ORDER BY uv desc LIMIT 5