Skip to main content

KPI properties

These are the properties used by Qlik Sense KPI objects.

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

  • qDimension

    Type: Array

    Description: Extends NxDimension, see Engine API: NxDimension.

    Additional properties

    • qDef

      Type: Object

      Description: Extends NxInlineDimensionDef, see Engine API: NxInlineDimensionDef.

      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
    • qAttributeDimensions

      Type: Array

      Description: Extends NxAttrDimDef, see Engine API: NxAttrDimDef.

      Additional properties

      Name Type Description
      id 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.

      Additional properties

      • conditionalColoring

        Type: Object

        Description: Coloring settings.

        • useConditionalColoring
        • Type: Boolean

          Description: Set if the object should use conditions to color the object.

          Default: false

        • singleColor
        • Type: Integer

          Description: Deprecated. Use paletteSingleColor instead. Set to reference a color in the color palette.

          Default: 3

        • paletteSingleColor
        • Type: Integer

          Description: Color information structure. Holds actual color and index in palette.

          Name Type Description
          index Integer

          Index in palette.

          Default: 6

          color String Color as HEX string.
        • segments
        • Type: Object

          Description: Segment settings.

          Name Type Description
          limits Array

          Properties

          Name Type Description
          value Number

          Value for limit between two segments.

          Default: 1

          gradient Boolean

          Set if the limit should be considered as a hard limit (false) or a gradient limit (true)

          Default: false

          colors Array

          Colors of the segments. Array should contain (segment limits) + 1 colors.

          Properties

          Name Type Description
          color Integer

          Integer reference to a color for the segment.

          Defualt: 2

          icon String Set the actual string for the glyph (using an icon font).
          paletteColors Array

          Colors of the segments. Array should contain (segment limits) + 1 colors.

          Properties

          Name Type Description
          color Integer

          Color as a string.

          index Integer

          Integer reference to a color for the segment.

          Default: 6

          icon String Set the actual string for the glyph (using an icon font).
      • measureAxis

        Type: Object

        Description: Set the limits for the range.

        Properties

        Name Type
        min ValueExpressionContainer
        max ValueExpressionContainer
      • 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.

      • 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.

  • qLayoutExclude

    Type: Object

  • customErrorMessage

    Type: Object

    Description: Set to define custom error message:

    • calcCond: String. Deprecated. Use qCalcCondition.qMsg instead.
    • Set to customize the calculation condition unfilled message.

showMeasureTitle

Type: Boolean

Sets if the main title of the first measure should be displayed.

Default: true

textAlign

Type: String

Aligns the text in the KPI object. Can be one of:

  • left
  • center
  • right

Default: center

layoutBehavior

Type: String

Sets the layout mode for the font in the KPI object. Can be one of:

  • Fixed. The font size is always the same. The font size is independent of the box size and the length of the KPI text. Overflows with (…) if the text is too long.
  • Fluid. The font size adapts to the size of the box. Overflows with (…) if the text is too long.
    Note: Make the KPI boxes the same size to keep the same font size.
  • Responsive. Text always fits. The font size adapts to the size of the box and the length of text.

fontSize

Type: String

Sets the font size of the main value. Can be one of:

  • S (small)
  • M (medium)
  • L (large)

Default: M

useLink

Type: Boolean

Set if the KPI will link to another sheet when clicked.

Default: false

sheetLink

Type: String

The sheet id (as a string) of the sheet to link to if "useLink": true.

openUrlInNewTab

Type: Boolean

Sets if the KPI opens in another tab when clicked. If false, it will only redirect from the current page.

Default: true

color

Type: Object

Controls if colors encoded in master items should be used.

Name Type Description
useBaseColors String

Use colors encoded in master items. One of:

  • off
  • measure

Default: measure