Bar chart properties
These are the properties used by Qlik Sense bar charts.
showTitles
Type: Boolean
Show title for the visualization.
Default: true.
showDetails
Type: Boolean
Sets if visualization details should be shown.
Default: false
title
Type: String | qStringExpression
Visualization title shown if "showTitles": true.
subtitle
Type: String | qStringExpression
Visualization subtitle shown if "showTitles": true.
footnote
Type: String | qStringExpression
Visualization footnote shown if "showTitles": true.
qHyperCubeDef
Type: Object
The hypercube definition used by most visualizations.
A subset of the properties available in the qHyperCubeDef is presented here. For complete documentation of all available properties, see Engine API: HyperCubeDef.
Properties
Name | Type | Description | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
qDimensions | Array |
Extends NxDimension, see Engine API: NxDimension. Additional properties
|
|||||||||||||||||||||||||||||||||
qMeasures | Array |
Extends NxMeasure, see Engine API: NxMeasure. Additional properties
|
|||||||||||||||||||||||||||||||||
qLayoutExclude | Object |
|
|||||||||||||||||||||||||||||||||
customErrorMessage | Object |
Set to define custom error messages.
|
refLine
Type: Object
Reference line settings.
Properties
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
refLines | Array |
Properties
|
barGrouping
Type: Object
Bar grouping settings.
Properties
Name | Type | Description |
---|---|---|
grouping | String |
Bar grouping can be one of:
Default: grouped |
nullMode
Type: String
Sets the null value presentation mode. Can be one of:
- gap
- connect
- zero
Default: gap
orientation
Type: String
Orientation settings. Can be:
- horizontal
- vertical
If vertical, the dimension axis can only be docked on bottom or top and measure axis on left or right.
Default: vertical
scrollStartPos
Type: Number
Scroll Alignment. Generally decides if the scroll starts at the beginning or end of the data.
- 0: the scroll bar starts at the left/top of the chart
- 1: the scroll bar starts at the right/bottom of the chart
gridLine
Type: Object
Grid line settings.
Properties
Name | Type | Description |
---|---|---|
auto | Boolean |
Set to use automatic grid line spacing. Default: true |
spacing | Integer |
Grid line spacing. Used only when "auto": false. One of:
Default: 2 |
dataPoint
Type: Object
Data point settings.
Properties
Name | Type | Description |
---|---|---|
showLabels | Boolean |
Set to show labels on data points. |
showSegmentLabels | Boolean |
Set to show labels on segments (only for stacked bar charts). Only applicable if showLabels is set to true. |
showTotalLabels | Boolean |
Set to show total labels (only for stacked bar charts). Only applicable if showLabels is set to true. |
scrollbar
Type: String
Scroll bar style settings.
Properties
Name | Type | Description |
---|---|---|
scrollbar | String |
Set the styling of the scroll bar. Can be one of:
Default: miniChart |
color
Type: Object
Most color options for visualizations are set in the color object in the options. You activate custom coloring by setting "auto": false which turns off auto-coloring.
If "auto": true, no other properties need to be defined in the color object.
The following parameters can be set in the color object:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
auto | Boolean |
Set to use automatic coloring. When "auto": true, color settings are based on the visualization used and the number of dimensions and measures, that is, the settings are not fixed, but are dependent on the data input. Default: true |
|||||||||
mode | String |
Sets the coloring mode for the visualization when auto-coloring has been switched off ("auto": false). Can be one of:
|
|||||||||
useBaseColors | String |
Only applicable when "mode": "primary" or "mode": "byMultiple" has been defined. Use colors encoded in master items. Should only be defined when a master dimension or master measure used in the visualization has a color assigned to it. One of:
Default: off |
|||||||||
singleColor | Integer |
Deprecated. Use paletteColor instead. Set to use single color. Default: 3 |
|||||||||
paletteColor | Object |
The paletteColor object is used to define the color when you color by single color ("mode": "primary"). It has the following properties:
|
|||||||||
persistent | Boolean |
Set to true to use persistent colors on data points between selection states. Only applicable when using one dimension and when "mode": "byDimension" or when "mode": "byMultiple". Default: false |
|||||||||
expressionIsColor | Boolean |
Set to true to define whether the result of the expression is a valid CSS3 color. Only applicable when "mode": "byExpression". Default: true |
|||||||||
expressionLabel | String |
Defines the label on tool tips when using a coloring expression. Only applicable when "mode": "byExpression" and only used if "expressionIsColor": false. |
|||||||||
colorExpression | Value Expression Container |
Sets the color expression to be used when "mode": "byExpression" is defined. Supported formats:
Example: "colorExpression": "=if(sum(Sales)<avg(Total aggr(sum(Sales),Product)),rgb(255,0,0),RGB(0,255,0))"
|
|||||||||
measureScheme | String |
Color scheme when "mode": "byMeasure". Can be one of:
Default: sg |
|||||||||
useMeasureGradient | Boolean |
Set to true if you want to apply the colors defined for library measures when used. Only applicable if "mode": "byMeasure". Default: true |
|||||||||
dimensionScheme | String |
Color scheme when "mode": "byDimension" or "mode": "byMultiple". Can be one of:
Default: 12 |
|||||||||
useDimColVal | Boolean |
Set to true if you want to apply the colors defined for library dimensions when used. Only applicable if "mode": "byDimension". Default: true |
|||||||||
reverseScheme | Boolean |
Set to true to reverse the color scheme. |
|||||||||
autoMinMax | Boolean |
Set to false to define custom color range. Custom color range is only applicable when coloring is by measure ("mode": "byMeasure") or by expression ("mode": "byExpression"). When coloring is by expression, "expressionIsColor": "false" must be set for custom color range to work. Default: true |
|||||||||
measureMin | Value Expression Container |
Set the min value for the color range. Only applicable if autoMinMax: false. Can be used in conjunction with measureMax or by its own. |
|||||||||
measureMax | Value Expression Container |
Set the max value for the color range. Only applicable if autoMinMax: false. Can be used in conjunction with measureMin or by its own. |
legend
Type: Object
Legend settings.
Properties
Name | Type | Description |
---|---|---|
show | Boolean |
Set to show the legend. Default: true |
dock | String |
Sets the legend position. Can be one of:
Default: auto |
showTitle | Boolean |
Show the legend title. Default: true |
dimensionAxis
Type: Object
Dimension axis settings.
Properties
Name | Type | Description |
---|---|---|
show | String |
Set to display the labels and titles. Can be one of:
Default: all |
label | String |
Set the label orientation. Can be one of:
Default: auto |
dock | String |
Sets the axis docking position. Can be one of:
Default: near |
continuousAuto | Boolean |
Continuous setting used for toggling between auto and custom setting. Default: true |
axisDisplayMode | String |
Set to specify axis display mode (number of bars). Can be one of:
Default: auto |
maxVisibleItems | Expression |
Only visible when axisDisplayMode is custom. Accepts integers or expressions. Max = 10000 / (numDims+numMeasures) |
measureAxis
Type: Object
Measure axis settings.
Properties
Name | Type | Description |
---|---|---|
show | String |
Set to display the labels and titles. Can be one of:
Default: all |
dock | String |
Sets the axis docking position. Can be one of:
Default: near |
spacing | Number |
Set the axis scale: Default: 1 |
autoMinMax | Boolean |
Set to use automatic min/max for measure color. Default: true |
minMax | String |
Set custom max/min. Can be one of:
Default: min |
min | ValueExpressionContainer | |
max | ValueExpressionContainer |
preferContinuousAxis
Type: Boolean
Chart axis setting to control preference of scale on a dimensional axis.
If true, the scale along the dimensional axis is continuous if supported by the data, otherwise discreet.
Default: true
showMiniChartForContinuousAxis
Type: Boolean
Chart axis setting to turn mini charts on for continuous axis.
Default: true
components
Type: Array
Component settings.
Properties
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
key | String |
Determines which component the settings apply to. Possible values: 'bar' |
||||||||||||
style | Object |
Properties
|