Stacked bar chart
A stacked bar chart shows trends over time for each data item and enables comparisons across items. This topic describes how to add data and configure styles for a stacked bar chart.
Prerequisites
You have created a dashboard. For more information, see Create a dashboard.
Example

Add data
In the component library, under Charts, find stacked bar chart and drag it onto the canvas.

Click Select a dataset and add data as shown in the figure below.

You can also do the following with the data:
Set field formats in bulk (①). For details, see Configure field styles in batches.
Set a field filter (②). For details, see Filter data.
Set automatic data refresh (③). For details, see Refresh data on a schedule.
Switch datasets (④). For details, see Switch datasets.
Edit the dataset (⑤). For details, see Edit a dataset.
Transform data (⑥). For details, see Create a calculated field and Create a grouped dimension.
Duplicate a field (⑦). For details, see Duplicate a field as a dimension.
Configure chart style
Position and size
Adjust component alignment (①): Align the component left, center, or right.
Adjust component position (②): Set the X and Y coordinates relative to the top-left corner.
Adjust component angle (③): Set the rotation angle.
Adjust component size (④): Set the component's width (W) and height (H).
Lock the component (⑤): Prevents the component from being resized.

Plotting area
Color palette: Select the colors for the columns.
Column orientation: Set the column orientation to horizontal or vertical.
Column style: Set the column width and corner radius.
Show data labels: Shows or hides data labels. You can select the content to display (measure, percentage, or total), choose whether to show all labels, and configure the text style. When you select percentage, you can set the number of decimal places. The default is 2.
When all data labels are shown, the system automatically adjusts their positions to prevent overlap. However, if there are too many data labels, some may not be displayed because they extend beyond the axis area. You can also select Allow data labels to overlap.
NoteIf you select percentage, the data label format settings in series settings apply only to measure and total.

Legend
Show legend: Shows or hides the legend.
Position: Sets the legend's position.
Text: Configures the text style, such as font size and color.

X-axis
Show X-axis: Shows or hides the X-axis.
Axis title: Shows or hides the axis title and its unit, sets their text, and configures the text style.
Axis line: Shows or hides the axis line and configures its color.
Axis labels and ticks: Shows or hides the axis labels and ticks, and configures the text color of the labels and the style of the ticks.
Gridlines: Shows or hides the gridlines and configures their width and color.

Y-axis
Show Y-axis: Shows or hides the Y-axis. You can also set its position and value range (minimum and maximum).
Axis title: Shows or hides the axis title and its unit, sets their text, and configures the text style.
Axis line: Shows or hides the axis line and configures its color.
Axis labels and ticks: Shows or hides the axis labels and ticks, and configures the text color of the labels and the style of the ticks.
Gridlines: Shows or hides the gridlines and configures their width and color.

Tooltip

Parameter | Description |
Display mode | Sets how the tooltip is displayed. Options are by single data point and by dimension value. |
Content | The available content depends on the Display mode. If set to by single data point, you can show percentage. If set to by dimension value, you can show total and percentage. |
Background color | Sets the background color. |
Text | Configures the tooltip text style. |
Series settings
You can configure the Alias and Series Value Display Format in Series Settings only if Color Legend/Dimension is enabled in the Field configuration panel.
Select a series: Select a dimension or measure.
Alias: Set a custom display name for the field.
Show data labels: Configure the value display format and text style for the data labels. The value display format has two modes: Auto and Custom.
Auto (Default): Series values inherit the data display format settings of the corresponding measure field.
Custom: Click the
icon to open the Data display format settings dialog box, where you can customize the data format. For details on the available settings, see Data display format > Custom.
Sync style to: Applies the current conditional formatting to other measures.
