histogram properties
This API is reliable and breaking changes are unlikely.
histogram()
These are the properties used by Qlik Sense histograms.
Version history
Version state | Details |
---|---|
Introduced | Qlik Sense June 2017 |
Properties
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.
disableNavMenu
Type: Boolean
Disables the hover menu in the visualization.
Default: false
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
qDimension
Type: Array
Description: Extends NxDimension, see Engine API: NxDimension.
Additional properties
-
qDef
Type: Object
Description: Extends NxInlineDimensionDef, see Engine API: NxInlineDimensionDef.
qDef properties Name Type Description autoSort Boolean Set to automatically sort the dimension.
Default: true
cId String ID used by the client. Must be unique within the current chart. othersLabel StringExpressionContainer String expression container. -
qAttributeDimensions
Type: Array
Description: Extends NxAttrDimDef, see Engine API: NxAttrDimDef.
id
Type: String
One of:
- colorByAlternative: colors the chart using different dimensions. Can be used together with color.mode="byDimension" for attribute dimensions.
- colorByExpression: used together with color.mode="byExpression".
qMeasures
Type: Array
Description: Extends NxMeasure, see Engine API: NxMeasure.
Additional properties
-
qDef
Type: Object
Description: Extends NxInlineMeasureDef, see Engine API: NxInlineMeasureDef.
qDef Properties Name Type Description autoSort Boolean Set to automatically sort the measure.
Default: true
cId String ID used by the client. Must be unique within the current chart. numFormatFromTemplate Boolean When enabled, the number format to use can be selected from multiple predefined formats based on the desired type: number or date.
Default: true
isCustomFormatted Boolean Set to true to toggle off the default client formatting. othersLabel StringExpressionContainer String expression container. -
qAttributeExpressions
Type: Array
Extends NxAttrExprDef, see Engine API: NxAttrExprDef.
id
Type: String
One of:
- colorByAlternative: colors the chart using different dimensions. Can be used together with color.mode="byDimension" for attribute dimensions.
- colorByExpression: used together with color.mode="byExpression".
qLayoutExclude
Type: Object
customErrorMessage
Type: Object
Set to define custom error messages.
-
calcCondition
Type: String
Description: Deprecated. Use qCalcCondition.qMsg instead. Set to customize the calculation condition unfilled message.
dimensionAxis
Type: Object
Dimension axis settings.
Name | Type | Description |
---|---|---|
show | String |
Defines if titles and labels should be visible. Can be one of:
Default: all |
label | String |
Defines the label orientation. Can be one of:
Default: auto |
dock | String |
Axis docking position. Can be:
Default: near |
measureAxis
Type: Object
Measure axis settings.
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 | Set the min value for the range. |
max | ValueExpressionContainer | Set the max value for the range. |
label
Type: StringExpressionContainer
Spring expression container for labels.
gridlines
Type: Object
Grid line settings.
Name | Type | Description |
---|---|---|
auto | Boolean |
Set to show grid lines. Default: true |
spacing | Integer |
Defines the grid line spacing. Used when "auto": false. Can be one of:
Default: 2 |
color
Type: Object
Color settings for the distribution plot.
barColor
Type: Object
Bar color properties.
Name | Type | Description |
---|---|---|
paletteColor | Object |
Description: Color information structure. Holds the actual color and index in palette.
|
bins
Type: Object
Defines how the bins are visualized.
Name | Type | Description |
---|---|---|
auto | Boolean |
When set to true, a histogram with no special parameters is generated. When set to false, bins are defined with the binMode property. Default: true |
binMode | String |
Sets the display mode of the bars when "auto": false. Can be:
Default: maxCount |
binCount | Integer |
Sets number of bars to be displayed. Applicable when "binMode": "maxCount". Default: 10 |
countDistinct | Boolean | Shows unique values. |
binSize | Integer |
Sets the maximum number of bars as a float. Applicable when "binMode": "size". Default: 10 |
offset | Integer | Sets where to start displaying bars on the x-axis. |
dataPoint
Type: Object
Data point settings.
Name | Type | Description |
---|---|---|
showLabels | Boolean |
Set to show labels on data points. Default: false |
refLine
Type: Object
Reference line settings.
refLines
Type: Array
Name | Type | Description |
---|---|---|
show | Boolean |
Set to true to display this reference line. Default: true |
label | String | Reference line label. |
color | Integer |
Deprecated. Use paletteColor instead. Color. Default: 3 |
paletteColor | Object |
Description: Color information structure. Holds the actual color and index in palette.
|
Example using Visualization API
In this example we create a basic histogram, containing a single dimension and a custom title.
app.visualization.create(
'barchart',
[
{
"qDef": {
"qFieldDefs": [
"DrDist"
],
"qFieldLabels": [
"Drive distance"
]
}
}
],
{
"showTitles": true,
"title": "Driving distance"
}
).then(function(vis){
vis.show("QV01");
});