Bar Chart
In a Bar Chart, data is represented as vertical or horizontal bars, where the height or width is proportional to the displayed values. Each bar corresponds to a distinct data value or category.
Widget Settings
In addition to the common widget settings, this widget has unique configuration options.
Data Settings
The widget supports two dimension groups: Dimension 1 and Dimension 2. You can add multiple dimensions to each group. For dimensions, you can hide empty values, assign click actions, and configure the Display setting (Always / By variable / By formula). You can also add measures to the widget.
You can assign colors to dimensions and measures. Display rules applicable to the widget are defined either at the workspace level in the Data Model or in the dashboard’s indicator tab under Dashboard.
The availability of color configuration modes for dimensions and measures depends on the widget’s configuration.
| 1 Dimension | 2 Dimensions | |
|---|---|---|
| 1 Measure | For the dimension, available modes: 1. Disabled 2. By values (only rules with Solid mode are allowed) 3. By rule (only dimension-based rules added to the widget are allowed) For the measure, allowed rule modes: 1. Solid 2. By measure 3. Custom | For Dimension 1: Color settings unavailable For Dimension 2, available modes: 1. Disabled 2. By values (only rules with Solid mode are allowed) 3. By rule (only rules for the dimension added to the widget are allowed) For the measure: Color settings unavailable |
| Multiple Measures | For the dimension: Color settings unavailable For measures, allowed rule mode: 1. Solid | Invalid widget configuration |
As with other widgets, you can apply sorting to the Bar Chart.
If your Bar Chart uses two dimensions, sorting by total value may display incorrectly. To ensure correct total-value sorting, use the formula:
any(process(count("dimension_2"), "dimension_1")).
This formula calculates the full range of values and enables proper ascending or descending sorting.
Display Settings
Text Size
Controls the text size in the widget, excluding measure Data labels.
Dimension Limits
Dimension 1 Limit and Dimension 2 Limit control the number of bars displayed on the chart.
Hide Empty Values
Enable this option to exclude empty values from the chart.
Hint
When enabled, hovering over a bar in Browse mode displays a hint with detailed information about the data. This is especially useful when the chart contains many bars and not all labels are visible.
Chart Type
Controls how bars are displayed: Stacked (default) or Grouped. When using stacked bars, you can optionally show total Data labels and adjust their text size.
Orientation
Controls the direction of the bars:
- Auto (default)
- Vertical
- Vertical-left
- Vertical-right
If the dimension uses a time-based format, the chart orientation is vertical; otherwise, it defaults to horizontal.
Bar Width
Default: Auto (20 pixels for horizontal orientation, 36 pixels for vertical). Acceptable values: 12–100 pixels. The input value is used as the maximum bar width if sufficient space is available (gaps between bars are at least as wide as the bars themselves). If space is limited, the system automatically reduces bar width to fit.
When bars are displayed in Grouped mode, the width setting applies uniformly to all bars.
Legend
For details on legend configuration, see Widgets.
X-Axis
For the X-axis, you can enable a title and configure label rotation and height.
Y-Axis
For the Y-axis, you can enable a title and set label width.
You can independently enable or disable either axis.
Filtering Settings
The widget supports standard filtering settings.
Filters configured within the widget cannot be removed in Browse mode.
Widget Configuration in YAML
You can configure the widget not only visually but also in the YAML editor. The table below lists the keys and values available for configuration. For details on using the value key, see Dimension and Measure Values in YAML. Supported data formats are described on the corresponding page. General widget parameters are covered in Widget Configuration in YAML.
Data Settings in YAML
| Key | Type | Definition |
|---|---|---|
| title | string | Title |
| showMarkdown | boolean | Description |
| markdownText | string | Description text |
| markdownMeasures | — | Measures in description |
| dimensionsFirstGroup | — | Dimension 1 |
| dimensionsSecondGroup | — | Dimension 2 |
| measures | — | Measures |
| sorting | — | Sorting |
Dimension 1 (key: dimensionsFirstGroup)
| Key | Type | Definition |
|---|---|---|
| name | string | Indicator title |
| value | — | Event indicator formula |
| dbDataType | enum | Event indicator data type |
| format | enum | Format |
| formatting | enum | Formatting |
| formattingTemplate | string | Custom formatting Only for CUSTOM formatting |
| hideEmptyValues | boolean | Hide empty values |
| hierarchyDimensions | — | Hierarchy dimensions If added, the indicator is defined as a hierarchy |
| onClick | — | Click actions Not applied if hierarchical |
| color | — | Color: - DISABLED — disabled- VALUES — by values- RULE — by ruleNot applied if: 1. Dimension 2 group is used 2. Multiple measures are defined 3. Indicator is hierarchical |
| displayCondition | — | Display (display condition) |
| arrayNesting | boolean | Array nesting |
Hierarchical Dimension for Dimension 1 (key: hierarchyDimensions)
| Key | Type | Definition |
|---|---|---|
| name | string | Event title |
| value | — | Indicator formula |
| dbDataType | enum | Formula data type |
| format | enum | Format |
| formatting | enum | Formatting |
| formattingTemplate | string | Custom formatting Only for CUSTOM formatting |
| hideEmptyValues | boolean | Hide empty values |
| onClick | — | Click actions |
| color | — | Color: - DISABLED — disabled- VALUES — by values- RULE — by ruleNot applied if: 1. Dimension 2 group is used 2. Multiple measures are defined |
| displayCondition | — | Display (display condition) |
| arrayNesting | boolean | Array nesting |
Dimension 2 (key: dimensionsSecondGroup)
| Key | Type | Definition |
|---|---|---|
| name | string | Indicator title |
| value | — | Event indicator formula |
| dbDataType | enum | Event indicator data type |
| format | enum | Format |
| formatting | enum | Formatting |
| formattingTemplate | string | Custom formatting Only for CUSTOM formatting |
| hideEmptyValues | boolean | Hide empty values |
| hierarchyDimensions | — | Hierarchy dimensions If added, the indicator is defined as a hierarchy |
| onClick | — | Click actions Not applied if hierarchical |
| color | — | Color: - DISABLED — disabled- VALUES — by values- RULE — by ruleNot applied if: 1. Dimension 2 group is used 2. Multiple measures are defined 3. Indicator is hierarchical |
| displayCondition | — | Display (display condition) |
| arrayNesting | boolean | Array nesting |
Hierarchical Dimension for Dimension 2 (key: hierarchyDimensions)
| Key | Type | Definition |
|---|---|---|
| name | string | Event title |
| value | — | Indicator formula |
| dbDataType | enum | Formula data type |
| format | enum | Format |
| formatting | enum | Formatting |
| formattingTemplate | string | Custom formatting Only for CUSTOM formatting |
| hideEmptyValues | boolean | Hide empty values |
| onClick | — | Click actions |
| color | — | Color: - DISABLED — disabled- VALUES — by values- RULE — by ruleNot displayed if Dimension 1 is empty and multiple measures are defined |
| displayCondition | — | Display (display condition) |
| arrayNesting | boolean | Array nesting |
Measures in YAML (key: measures)
| Key | Type | Definition |
|---|---|---|
| name | string | Measure title |
| value | — | Measure formula |
| dbDataType | enum | Measure data type |
| format | enum | Format |
| formatting | enum | Formatting |
| formattingTemplate | string | Custom formatting Only for CUSTOM formatting |
| showLabels | — | Show Data labels |
| color | — | Color: - AUTO — auto- BASE — solid- GRADIENT — gradient- RULE — by rule- FORMULA — by formulaNot applied if both dimension groups are used |
| displayCondition | — | Display (display condition) |
Show Value Labels (key: showLabels)
| Key | Type | Definition |
|---|---|---|
| enabled | boolean | Enable/disable labels |
| size | number | Label size |
Display Settings in YAML
| Key | Type | Definition |
|---|---|---|
| paddings | string | Side paddings |
| titleSize | number | Title size |
| titleColor | — | Title color: - AUTO — auto- BASE — solid |
| titleWeight | enum | Font weight: - NORMAL — normal- BOLD — bold |
| markdownTextSize | number | Markdown description text size Available only if Description is enabled |
| textSize | number | Text size |
| firstDimensionLimit | number | Dimension 1 limit |
| secondDimensionLimit | number | Dimension 2 limit |
| hideEmptyValues | boolean | Hide empty values |
| showHint | boolean | Hint |
| chartType | enum | Chart type: - STACK — stacked- GROUP — grouped |
| orientation | enum | Orientation: - AUTO — auto- HORIZONTAL — horizontal- VERTICAL-LEFT — vertical-left- VERTICAL-RIGHT — vertical-right |
| legend | — | Legend |
| showTotalLabels | — | Total Data labels Only for STACK type |
| xAxis | — | X-axis settings |
| yAxis | — | Y-axis settings |
| barWidth | number | Bar width |
Total Value Labels (key: showTotalLabels)
| Key | Type | Definition |
|---|---|---|
| enabled | boolean | Enable/disable total labels |
| size | number | Label size |
X-Axis Settings (key: xAxis)
| Key | Type | Definition |
|---|---|---|
| enabled | boolean | Enable/disable X-axis |
| rotation | number | Label rotation |
| height | number | Label height |
| showTitle | boolean | Title |
Y-Axis Settings (key: yAxis)
| Key | Type | Definition |
|---|---|---|
| enabled | boolean | Enable/disable Y-axis |
| width | number | Label width |
| showTitle | boolean | Title |
Filtering Settings in YAML
| Key | Type | Definition |
|---|---|---|
| filterMode | enum | Filter mode: - DEFAULT — default- SINGLE — single selection- DISABLED — disabled |
| ignoreFilters | boolean | Ignore filters |
| filters | — | Filters |
| aggregateFilters | — | Aggregate filters |
| stateName | string | State |
Example of a Configured Widget in the YAML Editor
- key: BAR_CHART
apiVersion: "16"
type: BAR_CHART
settings:
displayCondition:
mode: DISABLED
orientation: VERTICAL_LEFT
textSize: 12
xAxis:
showTitle: false
enabled: false
ignoreFilters: false
legend:
position: BOTTOM
align: CENTER
dimensionsFirstGroup:
- displayCondition:
mode: DISABLED
color:
mode: DISABLED
dbDataType: STRING
name: Store
format: STRING
value:
mode: FORMULA
formula: '"store"."Store"'
formatting: AUTO
onClick: []
filters: []
showHint: true
filterMode: DEFAULT
yAxis:
showTitle: false
enabled: true
measures:
- displayCondition:
mode: DISABLED
color:
mode: AUTO
dbDataType: INTEGER
name: Sales Quantity
format: NUMBER
value:
mode: FORMULA
formula: sum("sale"."Sales Quantity")
formatting: AUTO
valueLabel:
size: 12
enabled: true
showLabels:
enabled: true
size: 12
- displayCondition:
mode: DISABLED
color:
mode: AUTO
dbDataType: INTEGER
name: Sales Quantity Plan
format: NUMBER
value:
mode: FORMULA
formula: sum("sale"."Sales Quantity Plan")
formatting: AUTO
valueLabel:
size: 12
enabled: true
showLabels:
enabled: true
size: 12
dimensionsSecondGroup: []
sorting:
- name: sum (Sales Quantity)
value:
mode: IN_WIDGET
index: 0
group: measures
direction: DESC
chartType: GROUP
secondDimensionLimit: 50
title: ""
titleSize: 14
stateName: State 1
firstDimensionLimit: 5
showTotalLabels:
size: 12
enabled: false
titleColor:
mode: AUTO
titleWeight: NORMAL
showMarkdown: false
markdownMeasures: []
markdownText: ""
Was the article helpful?