boxplot properties

Note: STABLE.
This API is reliable and breaking changes are unlikely.

boxplot()

These are the properties used by Qlik Sense boxplots.

Version history

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 | Expression

Visualization title shown if "showTitles": true.

subtitle

Type: String | Expression

Visualization subtitle shown if "showTitles": true.

footnote

Type: String | Expression

Visualization footnote shown if "showTitles": true.

boxplotDef

Type: Object

Settings specific to the box plot.

Properties

Name Type Description
elements Object

Box plot element settings.

Properties

Name Type Description
boxStart Object

Properties

Name Type
name StringExpressionContainer
expression ValueExpressionContainer
boxMiddle Object

Properties

Name Type
name StringExpressionContainer
expression ValueExpressionContainer
boxEnd Object

Properties

Name Type
name StringExpressionContainer
expression ValueExpressionContainer
firstWhisker Object

Properties

Name Type
name StringExpressionContainer
expression ValueExpressionContainer
lastWhisker Object

Properties

Name Type
name StringExpressionContainer
expression ValueExpressionContainer
outliers Object

Properties

Name Type
name StringExpressionContainer
expression ValueExpressionContainer
calculations Object

Box plot calculation settings.

Properties

Name Type Description
auto Boolean

Use automatic calculations.

Default: true

mode String

Auto calculation mode. Can be one of:

  • tukey
  • fractiles
  • stdDev

Default: tukey

parameters Object

Properties

Name Type Description
fractiles Number

A number representing the two whisker fractiles as N and 1-N.

Default: 0.01

stdDev Integer

Standard deviation spread for whiskers.

Default: 3

tukey Number

Number of inter-quartile ranges for whiskers.

Default: 1.5

color Object

Color settings for the box plot.

Properties

Name Type Description
box Object

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

Properties

Name Type Description
index Integer

Index in palette.

Default: 6

color String

Color as HEX string.

point Object

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

Properties

Name Type Description
index Integer

Index in palette.

Default: 6

color String

Color as HEX string.

presentation Object

Presentation settings for the box plot.

Properties

Name Type Description
whiskers Object

Settings for the box plot whiskers.

Properties

Name Type Description
show Boolean

Set to true to show whiskers.

Default: false

qHyperCubeDef 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

Name Type Description
qDef Object

Extends NxInlineDimensionDef, see Engine API: NxInlineDimensionDef.

Additional 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
qAttributeDimensions Array

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 Array

Extends NxMeasure, see Engine API: NxMeasure.

Additional properties

Name Type Description
qDef Object

Extends NxInlineMeasureDef, see Engine API: NxInlineMeasureDef.

Additional 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.
qAttributeExpressions Array

Extends NxAttrExprDef, see Engine API: NxAttrExprDef.

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".
qLayoutExclude Object

 

customErrorMessage Object

Set to define custom error messages.

Name Type Description
calcCond String

Deprecated. Use qCalcCondition.qMsg instead.

Set to customize the calculation condition unfilled message.

dimensionAxis

Type: Object

Properties

Name Type Description
show String

Defines if titles and labels should be visible. Can be one of:

  • all
  • labels
  • title
  • none

Default: all

label String

Defines the label orientation. Can be one of:

  • auto
  • horizontal
  • tilted

Default: auto

dock String

Axis docking position. Can be:

  • near
  • far

Default: near

gridLines

Type: Object

Grid line settings.

Properties

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:

  • 0: no lines
  • 1: wide
  • 2: medium
  • 3: narrow

Default: 2

measureAxis

Type: Object

Properties

Name Type Description
showBounds Boolean

Set to show min and max on axis.

dock String

Axis docking position. Can be:

  • near
  • far

Default: near

spacing Number

Axis scale.

Default: 1

autoMinMax Boolean

Set to enable automatic max/min.

Default: true

minMax String

Set custom max/min.

One of:

  • min
  • max
  • minMax

Default: min

min ValueExpressionContainer
max ValueExpressionContainer

orientation

Type: String

Sets the orientation of the boxplot. Can be one of:

  • vertical
  • horizontal

Default: vertical

If vertical, the dimension axis can only be docked at the bottom or at the top, and the measure axis on the left or on the right.

refLine

Type: Object

Reference line settings.

Properties

Name Type Description
refLines Array

Properties

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

Color information structure. Holds the actual color and index in palette.

Properties

Name Type Description
index Integer

Index in the palette. If a custom color, not in the palette, is being used, set index ti -1.

Default: 6

color String

Color as HEX string.

Mandatory if "index": "-1".

sorting

Type: Object

Properties

Name Type Description
autoSort Boolean

Set to sort automatically.

Default: true

elementId String

Sorting preset. Can be one of:

  • firstWhisker
  • boxStart
  • boxMiddle
  • boxEnd
  • lastWhisker

Default: firstWhisker

expression ValueExpressionContainer  
sortCriteria Object

Properties

Name Type Description
sortByAscii Number

Use to sort alphabetically.

sortByExpression Number Use to sort by expression.
sortByNumeric Number Use to sort numerically.

Example using Visualization API

Tip: For more examples of how to create box plots on the fly, see Mashups: Creating box plots.

In this example we want to create a basic box plot, containing one dimension and one measure, and with a custom title.

app.visualization.create(
  'boxplot',
  [
    {
      "qDef": {
        "qFieldDefs": [
          "Date.autoCalendar.Year"
        ],
        "qFieldLabels": [
          "Year"
        ]
      }
    },
    {
      "qDef": {
        "qLabel": "Driving average",
        "qDef": "Avg({<Par={'4','5'}>}DrDist)"
      }
    }
  ],
  {
    "showTitles": true,
    "title": "Driving average"
  }
).then(function(vis){
  vis.show("QV01");
});

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?