Updated on 2025-05-20 GMT+08:00

Line Chart

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

Procedure

  1. In the top navigation bar on the dashboard creation page, click to create a line chart template.
  2. Select a dataset in the Data area.
  3. Set parameters on the Field, Style, and Advanced tabs.
  4. Click Update. The system automatically updates the chart.
    Figure 1 Line chart
  5. Click Save or Save and Publish in the upper right corner to save the intelligent chart.

    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.

  6. On the displayed dashboard page, enter a dashboard name. Click OK.

    The dashboard name can contain up to 64 characters. It must be specified and cannot start or end with a space. Only letters, numbers, spaces, underscores (_), and hyphens (-) are allowed.

Field

This part explains how to configure line chart fields.
  1. In the Data area on the right, select a dataset, and double-click or drag required dimension and metric fields to the corresponding areas on the Fields tab.

    Table 1 Parameters on the Field tab

    Parameter

    Description

    Field display content

    Click in the column and click Field display content to modify the field display content on the displayed page. Click OK.

    Aggregation Method

    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.

    Drilldown

    You can enable drilldown for dimension fields. For example, you can view data at different levels of granularity, ranging from years down to quarters, months, weeks, days, hours, minutes, and even seconds, depending on the time dimension.
    • 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.
      NOTE:
      • Drill-down is only supported for dimension fields, not for metric fields.
      • You can only select one field as the starting point for drill-down.
      • When drilling down on time, the system will automatically add the subdivided time periods to the drill-down order list and include them in the sorting field (fields that are already in the sorting field will not be added again).
      • Drill-down icons should be highlighted for fields that have already been drilled down. If you remove the drill-down field from the dimension, the entire drill-down function box will disappear.
  2. Set color legend (dimension).

    Drag the required fields to the Color Legend (Dimension) area on the Field tab. Color legends also support drill-down.

  3. Set a filter.
    1. Drag dimension and metric fields to the Filter area.
    2. Click next to a field in the Filter area.
    3. In the displayed Set Filter dialog box, set the parameters and click OK.
      Table 2 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.

  4. Set sorting.
    1. Drag and drop required data fields from the Dimension and Metric (Indicator) areas under Data to the Sorting area.
    2. Click next to a field in the Sorting area and select a sorting mode. The sorting modes are Ascending, Descending, and Custom.
    3. To cancel sorting, click next to the sorting field.
  5. 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.

  6. 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 3, Table 4, and Table 5.

Table 3 Basic Settings

Parameter

Description

Card Title

Whether to display the card title. If selected, the card title is displayed in the upper left corner of the chart.

Text

Set the text size and click to select the text color.

Alignment

Set the alignment mode, which can be left alignment or center alignment.

Bottom Margin

Set the distance between the card title and the chart.

Divider

Whether to display the divider. You can set the size, color, and bottom margin of the divider.

Card Background

Whether to display the card background. Click to select a background color.

Status Icon

Whether to display the status icon. You can set the display mode and color of icons. The display modes include Always display and Hover display.

Hide Panel Operations

You can customize whether to display in the upper right corner of the chart.

Panel No Padding

You can customize whether to cancel card padding.

Table 4 Chart style

Parameter

Description

Show Legend

You can customize whether to display the legend and set the size, color, and position of the legend text.

Color Palette

The color palette can be either the system default or custom settings.

Value 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.

Table 5 Coordinate axis

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 (), the title and unit of the X axis will not be displayed.

If the checkbox is selected (), the title of the X axis can be automatically generated or manually entered, and the unit of the X axis can be manually entered. The font size and color of the title text can be set.

Show Axis

Set whether to display the coordinate axis.

If the checkbox is not selected (), the X-axis coordinate axis will not be displayed.

If the checkbox is selected (), the font size and color of the X-axis coordinate axis can be set.

Show Axis Label

Set whether to display X-axis labels.

If the checkbox is not selected (), the X-axis labels will not be displayed.

If the checkbox is selected (), the font size and color of the X-axis label text, and even the angle of the X-axis labels can be set.

Show Grid Line

Set whether to display X-axis gridlines.

If the checkbox is not selected (), the X-axis gridlines will not be displayed.

If the checkbox is selected (), the number of gridlines and their color on the X-axis can be set.

Show Scale Line

Set whether to display the scale line.

If the checkbox is not selected (), the scale line is not displayed.

If the checkbox is selected (), the scale line is displayed.

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 (), the title and unit of the Y axis will not be displayed.

If the checkbox is selected (), the title, position, and text of the Y axis can be automatically generated or manually entered. The position of the title can be either above or left of the Y axis. The unit of the X axis can be manually entered. The font size and color of the title text can be set.

Auto Set Numeric Range

If the checkbox is not selected (), the numeric range needs to be manually set.

If the checkbox is selected (), the numeric range can be automatically set by the chart.

Show Axis

Set whether to display the coordinate axis.

If the checkbox is not selected (), the Y-axis coordinate axis will not be displayed.

If the checkbox is selected (), the font size and color of the Y-axis coordinate axis can be set.

Show Axis Label

  • Set whether to display Y-axis labels.
    • If the checkbox is not selected (), the Y-axis labels will not be displayed.
    • If the checkbox is selected (), the font size and color of the Y-axis labels can be set.
  • Customize the display format of axis labels. Once checked, you can customize the display format.

Show Grid Line

Set whether to display the Y-axis gridlines.

If the checkbox is not selected (), the Y-axis gridlines will not be displayed.

If the checkbox is selected (), the number of gridlines and their color on the Y-axis can be set.

Show Scale Line

Set whether to display the scale line.

If the checkbox is not selected (), the scale line is not displayed.

If the checkbox is selected (), the scale line is displayed.

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.

Table 6 Style configuration — functions

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 7 Chart linkage settings

    Parameter

    Description

    Fields to Bound

    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

    Set linked associated charts. You can select charts from the same dataset or different datasets.

    • 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.

    If 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.