Chart Configuration¶
Includes common and advanced configurations for charts.
Common Configurations¶
Title¶
-
Title: Set the title name for the chart. Once set, it will be displayed at the top left of the chart. Supports hiding.
-
Description: Add a description for the chart. After setting, an
iicon will appear next to the chart title. If not set, it will not be displayed.
Based on TrueWatch's large model natural language generation capabilities, you can use the "Auto Generate" feature to quickly generate semantically relevant titles and descriptions.
Unit¶
Includes common unit formats for different dimensions, such as data size, time intervals, timestamps, etc.
You can enter custom units in the dropdown.
Select the metrics included under the current query conditions and enter custom units.
About Unit Display for Metric Data
-
Default Unit Display:
- If the queried data is metric data and you have set a unit for the metric in Metric Management, it will be displayed according to the metric's unit by default;
- If you have no relevant unit configuration in Metric Management, it will be displayed in numerical format with thousand separators.
-
After Configuring Units: The custom configured units will be prioritized for display. Metric data supports two options for numerical values:
- Default Carry: Units are ten thousand, million, etc. For example, 10,000 is displayed as 10 thousand, 1,000,000 is displayed as 1 million. Two decimal places are retained;
- Short Scale: Units are K, M, B. That is, thousand, million, billion, trillion, etc., represent the Chinese context of thousand, million, billion, trillion, etc. For example, 1,000 is 1 k, 10,000 is 10 k, 1,000,000 is 1 million; two decimal places are retained.
Alias¶
The system automatically lists all metrics and groups under the current chart query. After adding an alias, the group part of the chart will be dynamically updated based on the alias value. Aliases support the use of template variables for one-click replacement. For example:
-
{tags}: Replaced with all "tag names" and "tag values"; -
{host}: Replaced with the "tag value" ofhost; -
{__name__}: Replaced with all metric names.
Note
- The alias for the metric part is determined by the
ASon the right side of the query statement;
- If your query contains a by condition, all returned legend sequences will be displayed;
- If you set both the metric part and the group part in the alias, the priority is: group alias > metric alias.
Scenario Example¶
As shown below, query the total CPU usage (usage_total) and user-mode CPU usage (usage_user) of the host. Based on the former, the alias setting will result in the following scenarios:
- Effect without adding an alias:
- Effect of replacing with plain text:
- Based on the by condition, input the variable
{tags}:
Legend¶
Position¶
Supports hiding, bottom, or right-side legends. Clicking on a metric row in the legend can hide/show the corresponding metric.
Display Value¶
Select the value or calculated value to display in the legend.
The time series legend values will be recalculated based on the chart query results. Supports selecting Last (last value), First (first value), Avg (average value), Min (minimum value), Max (maximum value), Sum (sum), Count (number of points returned).
As shown below: First represents the first value of the current time series query result, Last is the last value of the current time series query result. Clicking on the legend value supports ascending/descending sorting.
Note
Avg, Sum, Count will display different results based on the selected time interval (original interval and automatic alignment).
Data Format¶
-
Decimal Places: Choose 0, 1, 2, 3 decimal places or full precision.
-
Thousand Separator: Enabled by default; when disabled, the original value will be displayed without separators.
TrueWatch dashboard chart query results support automatic thousand-separator format display.
If a unit is set, the data format will be displayed according to the set unit.
After setting, the data format will be displayed with thousand separators in preview. If a unit is set, it will be displayed according to the unit format.
- Thousand-separator data format display:
- Set data format display:
Advanced Configurations¶
Lock Time¶
This fixes the time range for the current chart query data, not limited by the global time component. After setting, the user-defined time will appear in the top right corner of the chart, such as "xx minutes", "xx hours", "xx days". For example, if the lock time interval is 30 minutes, even if the time control in the top right corner is adjusted, the chart will still only display the last 30 minutes of data.
Rule Mapping¶
Set metric ranges and corresponding background colors and font colors for different columns. Metrics within the range will be displayed according to the set style.
Set the metric range and mapping values. When the metric value is within the set data range, it will be displayed as the corresponding mapping value.
When a metric value satisfies multiple settings simultaneously, it will be displayed according to the last satisfied condition.
When setting value mapping, "Display as" and "Color" are not mandatory:
- Display as: Default is empty, meaning no mapping value display;
- Color: Default is empty, meaning no color mapping, displaying its original color.
Field Mapping¶
In actual business scenarios, if the fields to be queried are inconsistent with the fields displayed on the front end, you can enable field mapping in the chart. Combined with the object mapping function of view variables, it is disabled by default.
After enabling field mapping, the chart displays the queried group fields and corresponding mapped fields. Group fields without specified mappings will not be displayed.
Space Authorization¶
After enabling, you can query data from external workspaces in the current chart of the current workspace.
Below the chart, you can select the target workspace from the authorized workspace dropdown for querying.
Data Sampling¶
Only for workspaces with the Doris log data engine.
After enabling, it will sample query data other than "metrics". The sampling rate is not fixed and will be dynamically adjusted based on the data size.
Time Offset¶
Since non-time series data has a query delay of at least 1 minute after being stored. When querying relative time ranges, data from the last few minutes may not be collected, resulting in data loss.
After enabling the time offset, when querying relative time intervals, the actual query time range will be offset forward by 1 minute to prevent data acquisition failure due to storage delay. For example: if the current time is 12:30, querying the last 15 minutes of data will actually query the time range: 12:14-12:29.
Note
- This setting only applies to relative time. If the query time range is "absolute time range", the time offset will not take effect.
- For charts with time intervals, such as time series charts, if the set time interval exceeds 1 minute, the time offset will not take effect. It only takes effect if the time interval is <= 1 minute. For charts without time intervals, such as overview charts, bar charts, etc., the time offset remains effective.










