Horizontal bar chart

更新时间:
复制 MD 格式

A horizontal bar chart is used to visualize data distribution in two-dimensional datasets. One axis represents the categories to be compared, and the other represents the corresponding values. For example, the category axis can show months, and the value axis can show product sales. This topic explains how to add data and configure styles for a horizontal bar chart.

Prerequisites

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

Overview

  • Use cases

    Horizontal bar charts provide a simple and intuitive way to compare values across different groups. The length of each bar corresponds to its value, making it easy to see differences at a glance.

  • Benefits

    • Computational capabilities: It offers one-click configuration for period-over-period comparisons, cumulative calculations, and smart reference lines and trendlines.

    • Visualization effects: Supports standard, stacked, and 100% stacked horizontal bar charts. You can configure various display options, including data labels, a legend, and a thumbnail axis.

  • Exampleimage

Limitations

A horizontal bar chart is configured using the following fields: Value Axis/Measure, Category Axis/Dimension, and Color Legend.

  • The value axis is determined by measures. You must select at least one measure, such as order count and profit amount.

  • The category axis is determined by the dimensions of the data. You must select at least one dimension. For example, province and product type.

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

    Note

    The color legend can be enabled only when a single measure is added to the value axis.

  • A dimension determines the facet field. You can add a maximum of one dimension, for example, product type.

Configure chart data

  1. On the Data tab, select the dimension and measure fields that you need.

    • From the Dimensions list, find City and add it to the Category Axis/Dimension field.

    • From the Dimensions list, find Product Type and add it to the Color Legend/Dimension field.

    • From the Measures list, find Shipping Cost and add it to the Value Axis/Measure field.

      Note

      You can drag the same field into both the Category Axis and Color Legend fields to assign unique colors based on different dimension values. The chart appearance varies depending on the scenario:

      • If the Category Axis and Value Axis each contain only one field, the number of bars equals the number of dimension values on the category axis.image

      • If the Value Axis contains multiple measure fields, the chart displays the first measure by default. To switch to other measures, you must manually open the field filter panel.image

      • If the Category Axis contains multiple dimension fields, the number of bars is the product of the number of values for each dimension. For example, in the following figure, the number of bars equals the number of region values multiplied by the number of order level values.image

  2. Click Update. The system automatically updates the chart.image

  3. (Optional) If you only need to view data for specific cities within the City dimension, set up a filter to display only the required data.设置筛选条件

  4. (Optional) Auto refresh

    Enable this option to automatically refresh chart data at a specified interval. For example, setting the duration to 5 minutes refreshes the data every 5 minutes.

  5. (Optional) You can add another dimension field to the Facet/Dimension field to use faceting to better visualize data trends across different dimension values.

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

      • Fields: For the field in Facet/Dimension, the only advanced calculation functions supported are Top N and None.

      • Style: You cannot enable a dual Y-axis or set a thumbnail axis in the auxiliary display.

      • Analysis: Only data interaction is supported. Advanced settings, metric analysis, annotations, and smart insights are not supported.

    • Displaying too many facets may cause the page to slow down. For optimal performance, we recommend using no more than 500 facets.

    image

Configure styles

The following sections describe how to configure chart-specific styles. For general style settings, see Configure the Chart Title Area.

You can enter keywords in the search box at the top of the configuration pane to quickly find a configuration item. You can also click the image..png icon on the right to Expand/Collapse All Categories.

条形搜索..gif

Chart style

In the Chart style section, configure the bar chart style.

image..png

Parameter

Description

Color scheme

You can set a color scheme for the chart.

Chart type

Sets the chart type. horizontal bar chart, stacked horizontal bar chart, and 100% stacked horizontal bar chart are supported.111

Bar width

You can set the width of the bars.

Alignment

You can set the chart alignment to Left or Right.

image..png

Rounded corners

Sets the corner radius of the bars.111

Stacked, 100% Stacked

Switches between a standard horizontal bar chart, a stacked horizontal bar chart, and a 100% stacked horizontal bar chart.

111

Shape fill

When Chart type is set to horizontal bar chart, you can fill the bar area with icons that represent values. In this case, we recommend turning off the value axis. You can fill the bars by using Assets or an Image Field.

  • Assets: Sets a different shape pattern for each dimension value. You can select from built-in assets or upload a custom image.111

  • Image Field: Fills the bars with images from an image field in the dataset. The data is grouped based on the category axis dimension. If multiple images exist for the same value, the first image is used by default.

    Note

    The Image Field option is available only if the dataset contains an image field of the Image type (2). For more information, see Use Image Dimensions in Metric Dashboards.

    image

You can also configure Value per Shape, Number of Rows, and Compress Layout.

  • Value per Shape: Sets the numerical value that a single shape represents.

  • Number of Rows: By default, shapes are displayed in a single row. You can set the number of rows from 1 to 5.111

  • Compress Layout: Compresses the shapes towards the value axis while maintaining their spacing and size ratio. When you enable this option, the value axis loses its reference meaning.111

Default selection on mobile

After you enable this option, you can set Default Selection to Last Global Dimension Value or Last Dimension Value in Specified Series.

Facet

In faceting mode, configure the layout and style of the chart arrangement in the Facet section.

Note

Faceting mode is enabled only when a field is added to the Facet/Dimension area.

image

Parameter

Description

Layout style

Sets the chart arrangement layout. Single-Column Comparison and Grid Distribution are supported.

Shared axis

Specifies whether the charts share the same axis.

111

Show divider

Specifies whether to display a dividing line between charts.

When enabled, you can further configure the divider's color and style.111

Number of columns

When the layout style is set to Grid Distribution, you can set the number of columns for the chart arrangement.

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

Note
  • The number of columns must be configured separately for PC and mobile devices. You can switch between these device configurations by using the image icon at the top of the page.

  • The number of columns for PC can be set from 1 to 6. For mobile, it can be set from 1 to 3.

Min facet block width/height

Sets the minimum width and height for each chart. The configurable options vary depending on the layout style.

  • Single-Column Comparison, Grid Distribution with Auto Columns: You can only configure the minimum width of the facet block.

  • Grid Distribution with Custom Columns: You can configure both the minimum width and height of the facet block.

Row/column spacing

Sets the row and column spacing between charts. The configurable options vary depending on the layout style.

  • Single-Column Comparison: You can only configure the column spacing between charts.

  • Grid Distribution: You can configure both the row and column spacing between charts.

Facet label

Position

Sets the display position of the dimension value label. You can place it Above Chart or Below Chart.111

Text

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

Align

Sets the alignment of the dimension value label.

Axes

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

You can select Show Dual Y-Axis, which takes effect only when two or more measures are added. If you select this option, the Upper X-Axis section appears in the Axes area.

image..png

Axis

Parameter

Description

Y-Axis

Show Y-axis

Specifies whether to show the Y-axis.

Show title and unit

Specifies whether to show the axis title and unit on the Y-axis.

Show axis label

Specifies whether to show labels on the Y-axis, and configures the axis label display rule and text style.

Content

Sets the displayed content to some or all dimensions.

image.png

Show ticks

Specifies whether to show ticks on the Y-axis.

Show axis line

Specifies whether to show the Y-axis line, including its style, width, and color.

Show gridlines

Specifies whether to show gridlines on the Y-axis, including their line style, width, and color.

Lower X-Axis

Show lower X-axis

Specifies whether to show the lower X-axis.

Show title and unit

Specifies whether to show the axis title and unit.

Show axis label

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

  • The default mode is Auto. In this mode, the axis labels inherit the data format settings of the measure field. If there are multiple measure fields, the format of the first field is used.

  • In Custom mode, click the image icon to configure the data format in the Data Display Format Settings dialog box. For details about the configuration items in the dialog box, see Data Display Formats > Custom.

Show ticks

Specifies whether to show ticks on the lower X-axis.

Show axis line

Specifies whether to show the lower X-axis line, including its style, width, and color.

Show gridlines

Specifies whether to show gridlines on the lower X-axis, including their line style, width, and color.

Axis value range and interval

  • Supports Auto or manual setting of the Maximum/Minimum values for the lower X-axis labels and tick range.

  • Supports setting a Custom Interval by step value or number of divisions.

100.gif

Note

Configure the Upper X-Axis only when Show Dual Y-Axis is enabled. Its settings are identical to those of the Lower X-Axis.

Legend

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

  • PC configuration

    image.png

    Parameter

    Description

    Content

    If the field in the Category Axis field is the same as in the Color Legend field, and Shape fill is enabled in the Chart style section, the chart contains multiple legends. You can select the content to be displayed in the legend here.111

    Position

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

    • If the display position is Top or Bottom, you can select left, center, or right alignment.

    • If the display position is Left or Right, you can select top, center, or bottom alignment. You can also set the distance between the legend and the chart data.

    Text

    Sets the text style of the legend on PC. You can configure the font color, size, weight, and whether it is italicized.

  • Mobile configuration

    image

    Parameter

    Description

    Position

    Sets the display position and alignment of the legend on mobile devices.

    • If the display position is Top or Bottom, you can select left, center, or right alignment.

    • If the display position is Left or Right, you can select top, center, or 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. In this case, custom alignment is not supported.

    Text

    Sets the text style for the measure name in the legend on mobile devices. You can configure the 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 below the legend.

    Content

    Sets the data content to display in the labels below the legend. Supported options include percentage and total.

    • Percentage: The percentage of a data point within the total for the current dimension. For example, the percentage of profit amount out of the total revenue for office supplies. When you choose to display the percentage, you can also set the number of decimal places to 0, 1, or 2 in Percentage Decimal Places.

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

    Style

    Sets the layout of the label text below the legend. The following options are available:

    • Multi-line Evenly Spaced: Automatically arranges the labels in a grid based on the number of columns entered in Maximum Display per Row and the number of rows entered in Maximum Display per Page.image

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

    • Plain Text: Displays only text without icons. The text color will match the corresponding measure's line color in the chart.image

    Display metrics as when not selected

    When Style is set to Multi-line Evenly Spaced or Single-line Tiled, you can further configure how to handle the display of metrics when the report viewer has not selected a legend. You can choose to display as "-" or display as empty.111

    Percentage Position

    When Percentage data is selected in Content, and Style is set to Multi-line Evenly Spaced or Single-line Tiled, you can further set the display position of the percentage data. You can choose to place it below or to the right of the numeric label.111

    Text Style

    When Style is set to Multi-line Evenly Spaced or Single-line Tiled, you can further set the style of the numeric text.

    If the content is selected to display Percentage data, you can format the text for the percentage data to distinguish it from the numeric label content, enhancing the visual difference between different data.

    Full Text Display

    When Style is set to Multi-line Evenly Spaced, you may encounter cases where long metric names are hidden. If you still need to display the full metric name, you can check Full Text Display.

    Show Tooltip Fields

    When checked, the fields configured in the Tooltip/Measure section of the field panel will be displayed in the legend area.image

    Note

    Tooltip fields are not supported in scenarios where data is split by dimension values (i.e., when the color legend is a dimension).

Data labels

In the Data labels section, configure whether to display data labels and their styles.

image

Parameter

Description

Content

When the Chart type in the Chart style section is set to stacked horizontal bar chart or 100% stacked horizontal bar chart, you can select the data content to display in the data labels. Supported options include Measure, Percentage, and Total.

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

Show all

After enabling Show All Data Labels, the system will intelligently adjust the label positions to prevent them from overlapping. If there are too many data labels, some may not be displayed if they exceed the axis area. In addition to showing all data labels, you can also choose to allow data labels to overlap.

Position

Sets the display position of the labels.

When Shape fill is enabled in the Chart style section, only Outside is supported.

Text

Sets the label text style.

Tooltip

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

  • PC configuration

    image

    Parameter

    Description

    Display mode

    Sets how tooltips are displayed. You can choose to display them per data point or by dimension value.

    Content

    Selects the data content to display in the tooltip. The available options vary based on the configuration:

    When the display mode is per 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 total for the current dimension. For example, the percentage of profit amount out of the total revenue for office supplies. When you choose to display the percentage, you can also set the number of decimal places to 0, 1, or 2 in Percentage Decimal Places.

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

    Background color

    Sets the background fill color of the tooltip.

    Text

    Sets the style of the text in the tooltip. You can configure the font color, size, weight, and whether it is italicized.

  • Mobile configuration

    image

    Parameter

    Description

    Floating bubble

    Click the image icon to enable the floating bubble display (①).

    Content

    Sets the data content to display in the floating bubble. Supported options include Percentage and Total.

    • Percentage: The percentage of a data point within the total for the current dimension. For example, the percentage of profit amount out of the total revenue for office supplies. When you choose to display the percentage, you can also set the number of decimal places to 0, 1, or 2 in Percentage Decimal Places.

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

    Background color

    Sets the background fill color of the floating bubble.

    Text

    Sets the text style in the floating bubble. You can configure the font color, size, weight, and whether it is italicized.

    Show axis dimension

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

    Background color

    Sets the background fill color of the axis dimension label.

    Text

    Sets the text style of the axis dimension label. You can configure the font color, weight, and whether it is italicized.

Series settings

In the Series settings section, configure the series style.

image

Note

You only need to configure aliases and numeric display formats in Series settings when Color Legend/Dimension is enabled in the Fields configuration panel.

Parameter

Description

Select series

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

Alias

Sets a field name that aligns with your business scenario.

This item can only be configured when Color Legend/Dimension is set.

Show data labels

Selects whether to show data labels and sets the label position and text format.

Series numeric display format settings

Configures the display format for series numeric values. You can select Auto or Custom.

  • Auto: This is the default option. In this mode, the series numeric 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 based on your display needs. For a description of each configuration item in the dialog box, refer to Data Display Format > Custom.

This item can only be configured when Color Legend/Dimension is set.

Show extremum

Sets whether to display extremum labels in the chart. After checking, you can set the extremum label's position in the chart, the display content (maximum/minimum), the label's background fill color, and the label's text style.

Note

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

Auxiliary display

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

image

Parameter

Description

Enable metric filter display

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

View controls

When the data on the chart axis is dense and the current container size cannot fully display all data, you can click the image icon to enable chart view controls. This allows report viewers to dynamically adjust the visible range of the chart by scrolling, providing a flexible user experience while ensuring data integrity and readability.

You can control the visible range on the chart axis using the following two control types: Thumbnail axis and Scrollbar.

  • When Thumbnail axis is selected, a simplified, full-data trend graph (the thumbnail axis) is displayed at the bottom of the chart. Report viewers can drag the selection area to quickly browse all data or focus on a specific range. The thumbnail axis uses absolute coordinates, meaning the selected interval directly corresponds to a fixed number of data bars on the actual axis. This is suitable for comparative analysis or complex scenarios requiring direct positioning.image By default, the thumbnail axis is only displayed when the data volume exceeds the chart container's display width. If you need the thumbnail axis to always be visible in the chart, you can check Always show. Once checked, the thumbnail axis will always be displayed, even if the chart data does not fill the screen.

  • When Scrollbar is selected, a horizontal scrollbar is displayed on the right side of the chart, allowing report viewers to move the viewing window left and right by dragging the slider horizontally. The scrollbar uses a relative ratio, meaning 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 scrollbar to limit the amount of data in the current chart window. This ensures that the chart content is clearly scaled within the visible area, avoiding visual clutter from overlapping data labels or overly dense data points. The minimum category width defaults to 32px, with a value range of 16-100px.

    After setting the minimum category width, the scrollbar will be displayed if the actual category width allocated to the chart when fully displayed is less than this value. When the scrollbar is enabled, chart elements and data labels will be constrained within the rectangular area of the coordinate system, and any overflowing parts (such as markers, data labels, etc.) will be automatically truncated or repositioned to fit the display.

Note

If no visual controls are configured for the chart and the chart size is too small, the system will automatically enable visual controls, selecting Thumbnail axis with a display logic that only shows it when the data volume exceeds the chart container's display width.

Chart analysis

Parameter

Name

Description

Data interaction

Drill-down

When you have finished setting the drill-down fields in the fields panel, you can set the display style of the drill-down hierarchy rows here.

Linkage

When the data you need to analyze is in different charts, you can link the charts to perform data analysis through chart linkage. For specific settings, see Linkage Settings and Display.

Jump

When the data you need to analyze is in multiple dashboards, you can link them through dashboard jumping for data analysis. Jumps include parameter jump and external link. For specific settings, see Jump Settings and Display.

Analysis and warning

Reference line

Use reference lines to see the difference between the current metric value and the set value of the reference line. The reference line value can be a fixed value or a calculated value. Calculated values include average, maximum, minimum, and median. For specific settings, see Reference Lines.

Trendline

Use trendlines to show the overall trend of the current data. There are six types of trendlines: smart recommendation, linear, logarithmic, exponential, polynomial, and power function. For specific settings, see Trendlines.

Annotation

-

When there are anomalies or data points that need special attention in the chart, you can use color highlighting, icons, comments, or data points for annotation to help you identify anomalies and take appropriate action. For specific setting methods, see Annotations.

Next steps

  • When others need to view the dashboard, you can share it with specific people. See Share a Dashboard.

  • When you need to create complex dashboards with navigation menus for thematic analysis, you can integrate the created dashboard into a data portal. See Create a PC Data Portal.