Line chart

Updated at:

A line chart is ideal for analyzing data trends over time. For example, you can track product sales to identify patterns and predict future performance. This topic describes how to add data to a line chart and configure its styles.

Prerequisites

You have created a dashboard. For more information, see Create a dashboard.

Overview

Use cases

  • Line charts display continuous data over time, making them ideal for showing trends at regular intervals.

  • You can use a line chart to determine if data is increasing, decreasing, cyclical, or growing exponentially over time. You can also compare multiple trends on the same chart.

Benefits

  • Powerful analytics: Easily configure features such as period-over-period comparisons, cumulative calculations, reference lines, trendlines, forecasting, anomaly detection, and fluctuation analysis.

  • Rich visualization: Supports both smooth (curved) and straight line styles, with options for data labels, a legend, and a thumbnail axis.

  • Comparison and annotation: Lets you compare data from the same period and highlight values with annotations.

Example

image

Limitations

A line chart is composed of a category axis/dimension, value axis/measure, color legend/dimension, and facet/dimension:

  • The category axis is determined by the dimensions of your data. You must select at least one dimension, such as date, province, or product type.

  • The value axis is determined by the measures of your data. You must select at least one measure, such as order quantity.

  • The color legend is determined by a dimension from your data. You can select only one dimension, such as shipping method.

    Note

    If you add multiple measures to the value axis and a dimension to the color legend, you must enable the in-chart metric filter to switch between measures.

  • The facet is determined by a dimension from your data. You can select only one dimension, such as product type or region.

Configure chart fields

  1. On the Fields tab, select the dimension and measure fields:

    • In the Dimensions list, double-click or drag Product Type to the category axis/dimension area.

    • In the Measures list, double-click or drag Profit Amount and Unit Price to the value axis/measure area.

    Note

    You can configure an auto-refresh policy to automatically update the chart data based on your business requirements.

  2. Click Update. The chart updates automatically.

    image

  3. (Optional) You can add a dimension field to facet/dimension to display trends for different dimension values in separate sub-charts (facets).

    Note
    • You can add only one facet dimension field. Facet mode has the following limitations:

      • Fields: For fields in facet/dimension, the advanced calculation feature only supports TopN and None.

      • Style: In the Axes section, you cannot enable the dual Y-axis. In the Auxiliary Display section, you cannot enable the thumbnail axis.

      • Analysis: Only data interaction is supported. Advanced settings, Analysis and Alerts, annotations, and Smart Insights are not supported.

    • Using many facets can cause the page to lag. For optimal performance, we recommend using no more than 500 facets.

    image

Configure chart styles

This section describes the style settings for this chart. For general style settings, see Configure the chart title area.

Chart area

In the Chart area section, configure the line chart style.

image

Parameter

Description

Color scheme

Set the color for the lines. You can use a system color scheme or a custom color.111

Chart type

Set the chart type. Supported types include line chart, area chart, stacked area chart, and 100% stacked area chart.

Line type

Supported types are Smooth and Straight.

Line style

Set the style and thickness of the lines.

Show markers

Set the shape of the markers.

image

Handle null values

You can set how to handle null values. Options include Skip, Set to 0 and connect, and Break line.

Default selection on mobile

If enabled, you can set the Default selection to either Last global dimension value or Last dimension value of a specified series.

Facet

In facet mode, configure the chart layout and style in the Facet section.

Note

To use facet mode, add a field to facet/dimension.

image

Parameter

Description

Layout style

Set the chart layout. Supported modes are Single Column and Grid.

Shared axes

Specify whether the charts share the same axes.

111

Show separator

Specify whether to display a separator line between charts.

When enabled, you can further configure the color and style of the separator.111

Columns

When the layout style is set to Grid, you can set the number of columns.

The default is Auto, but you can also customize the number of columns based on your needs.111

Note
  • Configure the number of columns separately for PC and mobile. Use the image icon at the top of the page to switch the target device.

  • The number of columns ranges from 1 to 6 for PC and 1 to 3 for mobile.

Min facet block size

Set the minimum width and height for each chart. The configurable options vary by layout style.

  • Single Column or Grid with Auto Columns: Only the minimum width of the facet block can be configured.

  • Grid with Custom Columns: Both the minimum width and height of the facet block can be configured.

Row and column spacing

Set the row and column spacing between charts. The configurable options vary by layout style.

  • Single Column: Only the column spacing between charts can be configured.

  • Grid: Both row and column spacing between charts can be configured.

Facet label

Position

Set the display position of the dimension value label. It can be placed Above chart or Below chart.111

Text

Set the font color and style of the dimension value label.111

Alignment

Set the alignment of the dimension value label.

Axes

In the Axes section, configure the axis style. By default, axes are shown.

You can select Show dual Y-axis. This option is available only when you add two or more measures. If you select this option, a Right Y-axis section appears in the Axes area.

Note
  • Configure the Right Y-axis only when Show dual Y-axis is enabled. Its parameters are the same as for the Left Y-axis.

  • The dual Y-axis feature is not supported in facet mode.

image

Name

Parameter

Description

x-axis

Show x-axis

Specifies whether to show the x-axis.

Show title and unit

Specifies whether to show the Axis Title and Unit on the x-axis.

Show axis labels

Specifies whether to show labels on the x-axis. If enabled, you can set the axis label display rule and text style.

Content to display

Choose to display all dimension values or a subset of them.

image.png

Show tick marks

Specifies whether to show tick marks on the x-axis.

Show axis line

Specifies whether to show the x-axis line, including its type, width, and color.

Show axis labels

Specifies whether to show labels on the x-axis.

Show gridlines

Specifies whether to show gridlines for the x-axis, including their line type, width, and color.

y-axis

Invert y-axis scale

Inverts the y-axis scale.

Y轴刻度翻转..gif

Show left y-axis

Specifies whether to show the left y-axis.

Show title and unit

Specifies whether to show the Axis Title and Unit.

Show axis labels

Specifies whether to show labels on the y-axis. When enabled, you can set the Axis Label Format and Text Style. The axis label format can be set to Auto or Custom.

  • Auto is the default mode. In this mode, the axis label inherits the data display format settings of the measure field. If there are multiple measure fields, it uses the format of the first field.

  • In Custom mode, click the image icon to configure the data format in the Data Display Format Settings dialog box. For a description of the options, see Data Display Format > Custom.

Show tick marks

Specifies whether to show tick marks on the left y-axis.

Show axis line

Specifies whether to show the left y-axis line, including its type, width, and color.

Show gridlines

Specifies whether to show gridlines for the left y-axis, including their line type, width, and color.

Axis value range and interval

  • You can set the Maximum/Minimum range for the left y-axis labels and ticks automatically (Auto) or manually.

  • You can set a Custom Interval by step value or by number of divisions.

    线图-坐标轴.gif

Legend

In the Legend section, click the image icon to enable the chart legend and configure its style.

  • PC configuration

    image

    Parameter

    Description

    Style

    Set the style of the legend icon. Options include Auto, Line Only, and Line and Marker.111

    Note
    • When you select Line and Marker, the legend synchronizes with the marker style set in the chart. If no marker style is configured, it displays a solid circle by default.

    • When you select Scale legend symbol with text in Theme > General Content Style, the legend icon and line thickness scale proportionally with the chart's line thickness and the legend text size.

    Position

    Set the display position and alignment of the legend on PC.

    • When the position is set to Top or Bottom: supports left, center, and right alignment.

    • When the position is set to Left or Right: supports top, center, and bottom alignment. You can also set the distance between the legend and the chart data content.

    Text

    Set the text style for the PC legend, including font color, size, weight, and whether it is italicized.

  • Mobile configuration

    image

    Parameter

    Description

    Style

    Set the style of the legend icon. Options include Auto, Line Only, and Line and Marker.

    Position

    Set the display position and alignment of the mobile legend.

    • When the position is set to Top or Bottom: supports left, center, and right alignment.

    • When the position is set to Left or Right: supports top, center, and bottom alignment. You can also set the distance between the legend and the chart content.

    Note

    When the position is set to Top, you can enable labels below the legend.

    Text

    Set the text style for the measure name in the mobile legend, including font color, size, weight, and whether it is italicized.

    Display label content

    When Position is set to Top, click the image icon to enable labels under the legend.

    Content

    Set the data content to display in the labels under the legend. Options include Percentage and Total.

    • Percentage: The percentage of a data point within the current dimension out of the total. For example, the profit from office supplies as a percentage of total revenue. When showing the percentage, you can set the Decimal Places for Percentage to 0, 1, or 2.

    • Total: The sum of all measures in the current dimension. For example, the total sales amount across all regions in 2025.

    Style

    Set the layout of the labels under the legend. The following styles are supported:

    • Multi-line equal division: Automatically arranges labels in a grid based on the number of columns set in Max items per row and the number of rows set in Max items per page.image

    • Single-line tiled: All label content is displayed in a single line.image

    • Text only: Displays text content without icons. The text color matches the color of the corresponding measure's line in the chart.image

    When not selected, show metric as

    When Style is set to Multi-line equal division or Single-line tiled, you can configure how to display metrics when a viewer has not selected a legend item. Options are to display as "-" or Empty.111

    Percentage position

    When Content is set to show Percentage and Style is set to Multi-line equal division or Single-line tiled, you can set the display position of the percentage data. It can be placed Below or to the Right of the value label.111

    Text style

    When Style is set to Multi-line equal division or Single-line tiled, you can configure the style of the Value text.

    If the content is set to show Percentage data, you can format its text to differentiate it from the Value label content, enhancing the visual distinction between different data types.

    Show full text

    When Style is set to Multi-line equal division, long measure names might be truncated. To display the full measure name, select Show full text.

    Show tooltip fields

    When selected, the fields you configured in the Tooltip/Measure section of the Fields panel are displayed in the legend area.image

    Note

    Displaying tooltip fields is not supported when the chart is split by dimension value (that is, when the color legend is a dimension).

Data labels

In the Data labels section, configure whether to show data labels and their style.

image

Parameter

Description

Content

When the Chart type in the Chart area section is set to stacked area chart or 100% stacked area chart, you can choose the data content to display in the data labels. Options include Measure, Percentage, and Total.

When showing Percentage data, you can set the number of decimal places to 0, 1, or 2 in Decimal Places for Percentage.image

Show all labels

Specifies whether to display all data labels. When enabled, the system intelligently adjusts label positions to prevent overlap. If there are too many data labels, some may be hidden if they extend beyond the axis area. You can also choose to Allow data labels to overlap.

Position

Set the display position of the labels.

Text

Set the text style for the labels.

Tooltip

In the Tooltip section, click the image icon to enable tooltips and configure their settings.

  • PC configuration

    image

    Parameter

    Description

    Display mode

    Set the tooltip display method, which supports two modes: by single data point or by dimension value.

    Content

    Select the data content to display in the tooltip. For By single data point mode, you can show the Percentage. For By dimension value mode, you can show the Total and Percentage.

    When the display mode is By Single Data Point, Percentage is supported. When the display mode is By Dimension Value, Total and Percentage are supported.

    • Percentage: The percentage of a data point within the current dimension out of the total. For example, the profit from office supplies as a percentage of total revenue. When showing the percentage, you can set the Decimal Places for Percentage to 0, 1, or 2.

    • Total: The sum of all measures in the current dimension. For example, the total sales amount across all regions in 2025.

    Background color

    Set the background fill color of the tooltip.

    Text

    Set the style of the text in the tooltip, including font color, size, weight, and whether it is italicized.

  • Mobile configuration

    image

    Parameter

    Description

    Tooltip

    Click the image icon to enable tooltip display (①).

    Content

    Set the data content to display in the tooltip. Options include Percentage and Total.

    • Percentage: The percentage of a data point within the current dimension out of the total. For example, the profit from office supplies as a percentage of total revenue. When showing the percentage, you can set the Decimal Places for Percentage to 0, 1, or 2.

    • Total: The sum of all measures in the current dimension. For example, the total sales amount across all regions in 2025.

    Background color

    Set the background fill color of the tooltip.

    Text

    Set the style of the text in the tooltip, including font color, size, weight, and whether it is italicized.

    Show axis dimension

    Click the image icon to enable axis dimension display (②).

    Background color

    Set the background fill color of the axis dimension label.

    Text

    Set the text style of the axis dimension label, including font color, weight, and whether it is italicized.

Series settings

In the Series settings section, configure the series style.

image

Note

You can configure the Alias and Series value display format in the Series settings section only when a field is added to color legend/dimension in the Fields panel.

Parameter

Description

Select field

Select a dimension or measure item based on your business scenario.

Alias

Set a custom name for the field.

This option is configurable only when a field is added to color legend/dimension.

Line style

Set the type and thickness of the line chart's lines.

Note

This feature is not supported for stacked and 100% stacked area charts.

Show markers

Specifies whether to show markers. If enabled, you can select the marker style.

Note

This feature is not supported for stacked and 100% stacked area charts.

Show data labels

Choose whether to display data labels and set their position and text format.

Series value display format

Configure the display format for series values. Options are Auto and Custom.

  • Auto: This is the default. The series value inherits the data display format settings of the corresponding measure field.

  • Custom: Click the image icon to configure the data format in the Data Display Format Settings dialog box. For a description of the options, see Data Display Format > Custom.

This option is configurable only when a field is added to color legend/dimension.

Show min/max values

Specifies whether to show min/max value labels in the chart. If enabled, you can set the labels' Position, Content to Display (Maximum/Minimum), Background Fill Color, and Text Style.

Note

This feature is not supported for stacked and 100% stacked area charts.

Auxiliary display

In the Auxiliary display section, configure the display of the metric filter and view controls.

image

Parameter

Description

Show metric filter

Specifies whether to enable the in-chart metric filter. If enabled, you can further set the default selected metric field.

View controls

When the data on an axis is too dense to fit in the chart's container, you can click the image icon to enable chart view controls. This allows viewers to dynamically adjust the visible range of the chart by sliding, providing an interactive experience while ensuring data integrity and readability.

You can use the following control types to manage the visible area on the chart axis: thumbnail axis and scroll bar.

  • Selecting Thumbnail axis displays a simplified graph of the full data trend (the thumbnail axis) at the bottom of the chart. Viewers can drag the selection area to quickly browse all data or focus on a specific range. The thumbnail axis uses an absolute coordinate system, where the selected interval corresponds to a fixed number of data points on the actual axis. This is suitable for comparative analysis or complex scenarios requiring direct navigation.image By default, the thumbnail axis appears only when the data exceeds the chart's display width. To keep the thumbnail axis always visible, select Always show. After selection, the thumbnail axis is always displayed, even if the chart data does not fill the screen.

  • Selecting Scroll bar displays a horizontal scroll bar at the bottom of the chart. Viewers can drag the slider horizontally to move the view window left or right. The scroll bar uses a relative proportion, where the slider's length and position are determined by the ratio of the visible window to the total data range. This is suitable for general browsing scenarios.image You can further set the minimum category width for the scroll bar to limit the amount of data in the current window. This ensures that the chart content is clearly scaled and avoids visual clutter from overlapping data labels or overly dense data points. The minimum category width is 32px by default, with a value range of 16–100px.

    After setting the minimum category width, the scroll bar appears if the chart's actual category width is smaller than the set minimum. When the scroll bar is enabled, the system constrains chart elements and data labels within the rectangular area of the coordinate system. It automatically truncates or repositions any parts that extend beyond this area (such as markers and data labels) to fit.

Note

If you do not configure a view control and the chart is too small, the system automatically enables view controls, selects Thumbnail axis, and displays it only when the amount of data exceeds the chart container's display width.

Configure chart analysis

Section

Name

Description

Data interaction

Drill-down

When you configure the drill-down feature for a chart, you can set the display style of the drill-down level rows. For more information, see Drill-down.

linkage

If the data you want to analyze is in different charts, you can use chart linkage to associate multiple charts for data analysis. For more information, see Configure and display linkage.

hyperlink

To analyze data that spans multiple dashboards, use a hyperlink to connect them. A hyperlink can be Parameter-based or an External Link. For more information, see Configure and display hyperlinks.

Advanced settings

Add data comparison

When analyzing data with a date dimension, you can add a data comparison. If the date field's granularity is set to Day, you can select Same period last year, Same period last month, Same period last week, Previous day, or Custom end date for data comparison. For more information, see Data comparison analysis.

image

Analysis and alerts

Reference line

A reference line helps you compare the current measure value against a setpoint. The reference value can be a fixed value or a calculated value, including average, maximum, minimum, and median. For more information, see Reference Line.

Trendline

A trendline shows the overall trend in your data. Supported trendline types include Intelligent, Linear, Logarithmic, Exponential, Polynomial, and Power. For more information, see Analysis and Alerts.

Smart insights

Enable auto insights

If enabled, the system can intelligently interpret chart information.

Forecasting

Forecasting allows you to view future trends based on your current data for analysis and prediction. For more information, see Analysis and Alerts.

anomaly detection

Anomaly detection helps you identify unusual data points in your current data. For more information, see Analysis and Alerts.

fluctuation analysis

Fluctuation analysis uses intelligent algorithms to automatically break down and analyze the reasons for fluctuations in key metrics. You can break down by dimension or measure to analyze the cause of fluctuations. For more information, see Analysis and Alerts.

Note

The fluctuation analysis feature is currently in beta.

Annotation

-

When data in a chart is abnormal or requires special attention, you can use color highlights, icons, comments, or data points to create an annotation. This helps you identify anomalies and take appropriate action. For more information, see Annotation.

Next steps

  • If other users need to view the dashboard, you can share it with them. For more information, see Share a dashboard.

  • If you need to create a complex navigation menu for thematic analysis, you can integrate your dashboard into a BI portal. For more information, see Create a PC BI portal.