Line charts are useful for analyzing trends in data over time. For example, analyzing changes in product sales over time and predicting future sales. This section will show you how to add data and configure styles for line charts.
Notes and Constraints
- The dimension axis is determined by the dimensions of the data and at least one dimension must be selected, such as date, province, or product type.
- The metric axis is determined by the metrics of the data and at least one metric must be selected, such as order quantity.
- The color legend is determined by the dimensions of the data and only one dimension can be selected.
- The color legend can only be enabled when a metric field is selected on the value axis.
- The chart will display label values if the query limit is 14 or less, but not if it is greater than 14.
Prerequisites
- A project has been created by referring to Creating a Project.
- A data source has been connected by referring to Creating a Data Source.
- A dataset has been created by referring to Creating a Dataset.
- A dashboard has been created by referring to Creating a Dashboard.
Procedure
- In the top navigation bar on the dashboard creation page, click
to create a line chart template.
- Select a dataset in the Data area.
- Set parameters on the Field, Style, and Advanced tabs.
- Click Update. The system automatically updates the chart.
Figure 1 Line chart
- Click Save or Save and Publish in the upper right corner to save the intelligent chart.Note
Click Save in the upper right corner. In the displayed dialog box, enter the dashboard name, and click Confirm. The saved dashboard cannot be viewed but can be deleted.
Click Save and Publish to save and publish the dashboard. You can view the saved dashboard. To delete the dashboard, you need to take it offline first.
- On the displayed dashboard page, enter a dashboard name. Click OK.
Field
This part explains how to configure line chart fields.
- Set dimension and metric fields.
- Select data.
- In the dimension and metric lists within the data columns, select the desired dimensions and metrics.
- In the dimension list under the data columns, select the field and drag it to the dimension column of the field.
- In the metric list under the data columns, select the field and drag it to the metric column of the field.
- Set the field display content.
Click
in the column, select Field Display Content and click to modify the field display content on the displayed page. Click OK.
- Set the drill-down.
Columns support the setting of field display content modification and drill-down functions for dimension fields.
NoteDrill-down function: When analyzing company sales data, you can change the analysis granularity by drilling down the data, such as drilling down from the regional granularity to the provincial granularity to view the data situation based on geographic dimensions. Connecting data from various dimensions facilitates data analysts to analyze the data and draw conclusions.
- Click the field (
) in the column and drag the field of the target location to be drilled down to the Drilldown area.
- Click Update to test whether the drilldown function is set successfully.
- Click the field (
- Set the aggregation mode.
Columns support the setting of aggregation method and field display content for metric fields.
NoteAggregation method: Perform calculation and processing on data to make the analyzed data more orderly and intuitive.
Click
of the field in the column, select Aggregation Method and click to support setting of no aggregation, sum, count, distinct count, maximum value, minimum value, average value, population standard deviation, sample standard deviation, sample variance, range start value, and range end value.
- Select data.
- Set color legend (dimension).
Drag the required fields to the Color Legend (Dimension) area on the Field tab. Color legends also support drill-down.
- Set a filter.
- Drag dimension and metric fields to the Filter area.
- Click
next to a field in the Filter area.
- In the displayed Set Filter dialog box, set the parameters and click OK.
Table 1 Filter parameters Type
Parameter
Description
String
Condition
Filter Mode: The options are Condition and Enumeration.
Condition Type: The options are And condition and Or condition.
Filter Condition: The options are Exact match, Contain, Start with, End with, Not match, Not contain, Null, and Not null.
Enumeration
Query Mode: The options are Single-select and multi-select.
Filter Condition: The options are >, ≥, <, ≤, =, ≠, Null, and Not null.
Metric
Condition Type
The options are And condition and Or condition.
Filter Condition
The options are >, ≥, <, ≤, =, ≠, Null, and Not null. You can select Before aggregation and After aggregation for data.
NOTE:If you select Before aggregation, data is filtered before aggregation. If you select After aggregation, data is filtered after aggregation. For aggregation concepts, see Creating a Dataset.
You can click Create Filter Condition to set multiple filter criteria.
Date
Range value
Select a time range for filtering.
Single value
Set a single time for filtering.
Condition
You can select And condition or Or condition as the condition type and select filter condition like >, ≥, <, ≤, and =.
You can click Create Filter Condition to set multiple filter criteria.
- Set sorting.
- Drag and drop required data fields from the Dimension and Metric (Indicator) areas under Data to the Sorting area.
- Click
next to a field in the Sorting area and select a sorting mode. The sorting modes are Ascending, Descending, and Custom.
- To cancel sorting, click
next to the sorting field.
- Set the maximum number of query results.
Enter the maximum number of records that can be returned in the text box. The default value is 1000.
- Set automatic refresh.
The auto refresh interval supports the following options: no refresh, 1 minute, 5 minutes, 15 minutes, and 30 minutes.
Style
This part describes how to set the style parameters of a line chart. For details, see Table 2 and Table 3.
Parameter | Description |
---|---|
Card Title | Cards can be configured with or without a title. If a title is set, it will be displayed in the top left corner of the card. If the checkbox is not selected ( If the checkbox is selected ( |
Text | You can adjust the font size and color of the text. To change the font size, you can either type in the desired size or use the NOTE: Note that the input cannot be empty and must be from 14 to 32. |
Alignment | You can align the text in the card to the left or center. |
Bottom Margin | Set the distance between the line chart title and the chart. To change the margin, you can either type in the desired margin or use the NOTE: Note that the input cannot be empty and must be from 0 to 32. |
Divider | Cards can be configured with or without a divider line. If the checkbox is not selected ( If the checkbox is selected ( NOTE: Note that the input for the style cannot be empty and must be from 0 to 8. The bottom margin can only be set after the style has been set, and the input cannot be empty and must be from 0 to 32. |
Card Background | Cards can be configured with or without a background. If the checkbox is not selected ( If the checkbox is selected ( |
Status Icon | You can customize the display style and color of the icon, which can be set to always show or show on hover. The card icon can be set to have a status or no status. If the checkbox is not selected ( If the checkbox is selected ( |
Show Legend | Set the legend text, position, color palette, and value, and more. Text in the text legend can be modified by inputting the text size or adjusting the margin size using the NOTE: Note that the input cannot be empty and must be from 12 to 32. The position of the text can either be below or above the legend. The color palette can be either the system default or custom settings. The value supports setting the context, unit, and display format. The context supports Chinese (Simplified) and English, and the unit supports: none, hundred, thousand, ten thousand, hundred million, and trillion. The display format supports scientific notation, using a thousand separator, and decimal places. |
Axis Type | Parameter | Description |
---|---|---|
X axis | Show Title and Unit | Set whether to display the title and unit of the X axis. If the checkbox is not selected ( If the checkbox is selected ( |
Show Axis | Set whether to display the coordinate axis. If the checkbox is not selected ( If the checkbox is selected ( | |
Show Axis Label | Set whether to display X-axis labels. If the checkbox is not selected ( If the checkbox is selected ( | |
Show Grid Line | Set whether to display X-axis gridlines. If the checkbox is not selected ( If the checkbox is selected ( | |
Show Scale Line | Set whether to display the scale line. If the checkbox is not selected ( If the checkbox is selected ( | |
Abbreviated Axis Label | Set the X-axis label abbreviation. | |
Y axis | Show Title and Unit | Set whether to display the title and unit of the Y axis. If the checkbox is not selected ( If the checkbox is selected ( |
Auto Set Numeric Range | If the checkbox is not selected ( If the checkbox is selected ( | |
Show Axis | Set whether to display the coordinate axis. If the checkbox is not selected ( If the checkbox is selected ( | |
Show Axis Label |
| |
Show Grid Line | Set whether to display the Y-axis gridlines. If the checkbox is not selected ( If the checkbox is selected ( | |
Show Scale Line | Set whether to display the scale line. If the checkbox is not selected ( If the checkbox is selected ( | |
Scale Type | To display data on a logarithmic scale, the data range must be either all greater than 0 or all less than 0. Supported types include linear and logarithmic. | |
Abbreviated Axis Label | Set the Y-axis label abbreviation. |
Function | Description |
---|---|
Abbreviated Axis | Set whether to enable the abbreviated axis. |
Abbreviated Axis Background Data | Set the background data display for the abbreviated axis. |
Null Value Processing | Set the rule for handling null values: Delete, intelligently delete, set to zero, or break on null. |
Advanced
- Linkage
Click the Advanced tab and click
next to Linkage. The Chart Linkage Settings page is displayed. Set parameters. For details, see Linkage example.
Table 5 Chart linkage configurations Parameter
Description
Filter
Select the fields to be bound first and then select the chart to be associated with them. You can select all charts on the dashboard.
Associated Charts
Link the associated charts.
- Follow bound field: When the bound field is set to A, the associated data tables filter data related to A.
- SQL placeholder: The bound field value corresponds to the value set for the SQL placeholder in the dataset.
- Initialize Query for Associated Query Control: whether the associated query control supports query initialization. If the checkbox is selected (
), the control supports query initialization. If the checkbox is not selected (
), the control does not support query initialization.
NoteIf you select this option, when a chart is linked to a query control and the query control does not have a default query set, the chart's data configuration will be queried during chart initialization.
- Notes and Constraints
- Prerequisites
- Procedure
- Field
- Style
- Advanced