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.
Reference Lines
Reference lines serve as visual guides for specified values on a chart. Detailed information on configuring and using reference lines is provided on the Widgets page.
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 in the view 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 | Title 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 |
Reference Lines (key: referenceLines)
To add reference lines to the Y-axis, use the referenceLinesEnabled key.
| Key | Type | Definition |
|---|---|---|
| referenceLinesEnabled | boolean | Reference lines toggle |
Within the referenceLines block, the following keys are used:
| Key | Type | Definition |
|---|---|---|
| name | string | Name |
| color | — | Block for configuring the reference line color. The mode key specifies the coloring mode:- AUTO — automatic- BASE — solidIf BASE is selected, the HEX color code must be provided in the value key within double quotes, e.g., "#e51320" |
| type | enum | Line type: - SOLID — solid- DOTTED — dotted |
| dashLength | number | Dash length (configurable only for DOTTED lines) |
| thickness | number | Line thickness (range: 0 to 20) |
| formula | string | Formula (must be enclosed in double quotes, e.g., "400") |
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
widgets:
- key: bar-chart
apiVersion: "17"
type: BAR_CHART
settings:
titleColor:
mode: AUTO
titleSize: 14
paddings: 8
titleWeight: NORMAL
textSize: 12
filterMode: DEFAULT
ignoreFilters: false
stateName: null
title: ""
showMarkdown: false
markdownMeasures: []
markdownText: ""
markdownTextSize: 14
showTotalLabels:
enabled: false
size: 12
xAxis:
enabled: true
showTitle: true
referenceLinesEnabled: false
yAxis:
enabled: true
showTitle: true
referenceLinesEnabled: false
firstDimensionLimit: 15
secondDimensionLimit: 50
dimensionsFirstGroup:
- name: trimmed_name
value:
mode: FORMULA
formula: '"phases"."trimmed_name"'
dbDataType: String
formatting:
value: AUTO
mode: BASE
hideEmptyValues: false
format:
value: STRING
mode: BASE
onClick: []
displayCondition:
mode: DISABLED
color:
mode: DISABLED
dimensionsSecondGroup:
- name: action_type
value:
mode: FORMULA
formula: '"phases"."action_type"'
dbDataType: String
formatting:
value: AUTO
mode: BASE
hideEmptyValues: false
format:
value: STRING
mode: BASE
onClick: []
displayCondition:
mode: DISABLED
color:
mode: DISABLED
measures:
- name: Amount
value:
mode: FORMULA
formula: count()
dbDataType: UInt64
formatting:
value: AUTO
mode: BASE
format:
value: NUMBER
mode: BASE
showLabels:
enabled: true
size: 12
color:
mode: AUTO
displayCondition:
mode: DISABLED
chartType: STACK
orientation: AUTO
legend:
position: BOTTOM
align: CENTER
verticalAlign: TOP
width:
mode: PIXEL
value: null
filters: []
barWidth: null
Was the article helpful?