Skip to main content

Combo chart properties

These are the properties used by Qlik Sense combo 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.

qDimensions

Type: Array

Description: Extends NxDimension, see Engine API: NxDimension.

  • qDef

    Type: Object

    Description: Extends NxInlineDimensionDef, see Engine API: NxInlineDimensionDef.

    • autoSort

      Type: Boolean

      Description: Set to automatically sort the dimension. Default: true.

    • cId

      Type: String

      Description: ID used by the client. Must be unique within the current chart.

    • othersLabel

      Type: StringExpressionContainer

  • qAttributeDimensions

    Type: Array

    Description: Extends NxAttrDimDef, see Engine API: NxAttrDimDef.

    • id

      Type: String

      Description: 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".

  • qAttributeExpressions

    Type: Array

    Description: Extends NxAttrExprDef, see Engine API: NxAttrExprDef.

    • id

      Type: String

      Description: There are three qAttributeExpressions IDs specifically for use with custom tooltips.

      • customTooltipExpression: An AttributeExpression with this ID sets the extra tooltip measure.
      • customTooltipTitle: An AttributeExpression with this ID sets the tooltip title.
      • customTooltipDescription: An AttributeExpression with this ID sets the tooltip description.

qMeasures

Type: Array

Description: Extends NxMeasure, see Engine API: NxMeasure.

  • qDef

    Type: Object

    Description Extends NxInlineMeasureDef, see Engine API: NxInlineMeasureDef.

    • autoSort

      Type: Boolean

      Description: Set to automatically sort the measure. Default: true.

    • cId

      Type: String

      Description: ID used by the client. Must be unique within the current chart.

    • modifiers

      Type: Array

      Description: Set to apply a modifier to a measure.

      Name Type Description
      accumulation Object

      Only displayed when accumulation has been set as a modifier. It allows you to accumulate values of your measure over one or two dimensions.

      Properties:

      • accumulationDimension: Type: Integer. Only displayed when there are two dimensions. Selects the dimension on which the accumulation will take place. If the accumulation is made across multiple dimensions, this will be the first dimension.
      • crossAllDimensions: Type: Boolean. Only displayed when there are two dimensions. Continues accumulation across both dimensions.
      • fullAccumulation: Type: Boolean. Select whether the accumulation will happen on the Full range or Custom range.
      • steps: Type: Integer. Only displayed when Range is set to Custom. The number of steps in the dimensions which form an accumulation range. Only zero and positive integers are accepted.
        Note: Sorting order of dimension values (or step order) is important and affects results.

      • outputExpression: Type: String. Shows the expression used by the modifier.
      • showExcludedValues: Type: Boolean. Shows the excluded values (values not in the current selection) in the accumulation.
      • disabled: Type: Boolean.
      movingAverage Object

      Only displayed when movingAverage has been set as a modifier.

      Properties:

      • primaryDimension: Type: Integer. Only displayed when there are two dimensions. Selects the dimension on which the moving average will take place. If the moving average is made across multiple dimensions, this will be the first dimension.
      • crossAllDimensions: Type: Boolean. Only displayed when there are two dimensions. Continues the moving average across both dimensions.
      • fullRange: Type: Boolean. Select whether the moving average will happen on the Full range or Custom range.
      • steps: Type: Integer. Only displayed when Range is set to Custom. The number of steps in the dimension which form a moving average. Only zero and positive integers are accepted. Note: Sorting order of dimension values (or step order) is important and affects results.
      • nullSuppression: Type: Boolean. Choose to have null values calculated by the moving average modifier.

      • outputExpression: Type: String. Shows the expression used by the modifier.
      • showExcludedValues: Type: Boolean. Shows the excluded values (values not in the current selection) in the moving average.
      • disabled: Type: Boolean.
      difference Object

      Only displayed when difference has been set as a modifier.

      Properties:

      • primaryDimension: Type: Integer. Only displayed when there are two dimensions. Selects the dimension on which the difference will take place. If the difference is made across multiple dimensions, this will be the first dimension.
      • crossAllDimensions: Type: Boolean. Only displayed when there are two dimensions. Continues the difference across both dimensions.
      • outputExpression: Type: String. Shows the expression used by the modifier.
      • showExcludedValues: Type: Boolean. Shows the excluded values (values not in the current selection) in the difference.
      • disabled: Type: Boolean.
      relativeNumber Object

      Only displayed when relativeNumber has been set as a modifier. Allows you to see relative percentages to see the impact of specific selections, relative to the selection, relative to the total, or relative to other fields. You can change the basis upon which the relative number is calculated.

      Properties:

      • dimensionalScope: Type: Integer. Sets whether the relative numbers are calculated based on a dimension. You can choose to have the modifier respect all available dimensions, respect a specific dimension if there are two, or to disregard the dimensions. The dimension values can be one of:
        • respectOneDimension: Value: 0. Available when more than one dimensions are available. Calculates the subtotal for that dimension.
        • respectAllDimensions: Value: 1. Available when more than one dimensions are available. Uses all dimensions when calculating the modifier. The calculated number is relative to every dimensional value, for both dimensions.
        • disregardDimension: Value: 2. Available when more than one dimensions are available. Uses the total when calculating the modifier. The calculated number is relative to the total.
        • disregardAllDimensions: Value: 3. Available when more than one dimensions are available. Uses the total when calculating the modifier. The calculated number is relative to the total.
      • selectionScope: Type: Integer. Sets whether the relative numbers are calculated based on the current selection or a specific field value. You can also disregard the current selection. The selection values can be one of:
        • currentSelection: Value: 0. Uses current selection to calculate modifier.
        • selectFieldValue: Value: 1. Uses a field to calculate the modifier.
        • disregardSelection: Value: 2. Disregards any selections when calculating the modifier.

    • numFormatFromTemplate

      Type: Boolean

      Description: 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

      Type: Boolean

      Description: Set to true to toggle off the default client formatting.

    • othersLabel

      Type: StringExpressionContainer


  • qAttributeExpressions

    Type: Array

    Description: Extends NxAttrExprDef, see Engine API: NxAttrExprDef.

    • id

      Type: String

      Description: 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.

tooltip

Type: Object

Description: Custom tooltip settings.

auto

Type: Boolean

Description: Determines if the custom tooltip is displayed or not. If set to false, custom tooltip is displayed. Default: true

hideDefaultRow

Type: Boolean

Description: Hides all the basic tooltip content except the dimension and the custom tooltip content. If set to true, basic tooltip content is hidden. Default: false

barGrouping

Type: Object

Bar grouping settings.

Properties

Name Type Description
grouping String

Bar grouping can be one of:

  • grouped
  • stacked

Default: grouped

nullMode

Type: String

Sets the null value presentation. 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 scrollbar starts at the left/top of the chart
  • 1: the scrollbar starts at the right/bottom of the chart

dataPoint

Type: Object

Data point settings.

Properties

Name Type Description
show Boolean

Set to show data points on line series. Only used if there is at least one measure with type set to line.

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:

  • primary: a single color (by default blue) is used for all items in the chart. In visualizations that do not benefit from multiple colors (bar charts with one dimension and scatter plots), single color is the default setting.
  • byDimension: coloring is based upon the amount of dimension values. Details are set in the byDimensionDef property.

    Note: byDimension can only be used in conjunction with an attribute dimension on the dimension to color by, as shown in the example below.
    { "qDef": { "qFieldDefs": [ "NetScoreName" ] }, "qAttributeDimensions": [ { "qDef": "NetScoreName", "id": "colorByAlternative", "label": "Year" } ] }
  • byExpression: coloring is based on an expression, which in most cases is a color code. Details are set in the expressionIsColor, expressionLabel and colorExpression properties.

  • byMeasure: coloring is based on the measure value. Details are set in the byMeasureDef property.
  • byMultiple: can be used when more than one measure is used. By default, 12 colors are used for the dimensions. The colors are reused when there are more than 12 dimension values.
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:

  • off
  • measure: use colors encoded in master measure.
  • dimension: use colors encoded in master dimension.

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:

Name Type Description
index Integer

Index in the palette.

The default Qlik Sense color palette:

  • -1: set to use custom color that is not in the palette.
  • 0: No color
  • 1: White, HEX: #ffffff
  • 2: Light green, HEX: #46c646
  • 3: Green, HEX: #276e27
  • 4: Light blue, HEX: #b6d7ea
  • 5: Blue, HEX: #7db8da
  • 6: Dark blue, HEX: #4477aa
  • 7: Purple, HEX: #8e477d
  • 8: Yellow, HEX: #ffcf02
  • 9: Orange, HEX: #f8981d
  • 10: Red, HEX: #f93f17
  • 11: Brown, HEX: #633d0c
  • 12: Light gray, HEX: #b0afae
  • 13: Gray, HEX: #7b7a78
  • 14: Dark gray, HEX: #545352
  • 15: Black, HEX: #000000

Default: 6

color String

Color as HEX string.

Mandatory if "index": "-1".

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:

  • RGB
  • ARGB
  • HSL

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:

  • sg: (sequential gradient) the transition between the different color groups is made using different shades of colors. High measure values have darker hues
  • sc: (sequential classes) the transition between the different color groups is made using distinctly different colors.
  • dg: (diverging gradient) used when working with data that is ordered from low to high, for instance, to show the relationship between different areas on a map. Low and high values have dark colors, mid-range colors are light.
  • dc: (diverging classes) can be seen as two sequential classes combined, with the mid-range shared. The two extremes, high and low, are emphasized with dark colors with contrasting hues, and the mid-range critical values are emphasized with light colors.

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:

  • 12: 12 colors where all can be distinguished by people with vision deficiency.
  • 100: 100 colors where not all can be distinguished by people with vision deficiency

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:

  • auto
  • right
  • left
  • bottom
  • top

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:

  • all
  • labels
  • title
  • none

Default: all

label String

Set the label orientation. Can be one of:

  • auto
  • horizontal
  • tilted

Default: auto

dock String

Sets the axis docking position. Can be one of:

  • near
  • far

Default: near

continuousAuto Boolean

Continuous setting used for toggling between auto and custom setting.

Default: true

measureAxes

Type: Object

Array that should contain two measure axes, one for the primary and one for the secondary measure axis.

Properties

Name Type Description
show String

Set to show the labels and titles. Can be one of:

  • all
  • labels
  • title
  • none

Default: all

dock String

Sets the axis docking position. Can be one of:

  • near
  • far

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:

  • min
  • max
  • minMax

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