# boxplot properties

Information noteSTABLE.   
  
This API is reliable and breaking changes are unlikely.

boxplot()

These are the properties used by Qlik Sense boxplots.

## Version history

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

### showDisclaimer

Type: Boolean

Set to false to hide visualization disclaimers that appear at the bottom of the chart, such as limited data or the chart has negative values.

Default: true

### boxplotDef

Type: Object

Settings specific to the box plot.

Properties

#### elements

Type: Object

Description: Box plot element settings.

Additional properties:

* **boxStart**

  Type: Object

  Description: Properties.

  * name: StringExpressionContainer
  * expression: ValueExpressionContainer

* **boxMiddle**

  Type: Object

  Description: Properties.

  * name: StringExpressionContainer
  * expression: ValueExpressionContainer

* **boxEnd**

  Type: Object

  Description: Properties.

  * name: StringExpressionContainer
  * expression: ValueExpressionContainer

* **firstWhisker**

  Type: Object

  Description: Properties.

  * name: StringExpressionContainer
  * expression: ValueExpressionContainer

* **lastWhisker**

  Type: Object

  Description: Properties.

  * name: StringExpressionContainer
  * expression: ValueExpressionContainer

* **outliers**

  Type: Object

  Description: Properties.

  * name: StringExpressionContainer
  * expression: ValueExpressionContainer

#### calculations

Type: Object

Description: Box plot calculations settings.

* **auto**

  Type: Boolean

  Description: Use automatic calculations.

  Default: true

* **mode**

  Type: String

  Description: Auto calculation mode. Can be one of:

  * tukey
  * fractiles
  * stdDev

  Default: tukey

* **parameters**

  Type: Object

  parameters properties

  | Name | Type | Description |
  | --- | --- | --- |
  | fractiles | Number | A number representing the two whisker fractiles as N and 1-N.<br><br>Default: 0.01 |
  | stdDev | Integer | Standard deviation spread for whiskers.<br><br>Default: 3 |
  | tukey | Number | Number of inter-quartile ranges for whiskers.<br><br>Default: 1.5 |

#### color

Type: Object

Description: Color settings for the box plot.

* **box**

  Type: Object

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

  box properties

  | Name | Type | Description |
  | --- | --- | --- |
  | index | Integer | Index in palette.<br><br>Default: 6 |
  | color | String | Color as HEX string. |

* **point**

  Type: Object

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

  point properties

  | Name | Type | Description |
  | --- | --- | --- |
  | index | Integer | Index in palette.<br><br>Default: 6 |
  | color | String | Color as HEX string. |

#### presentation

Type: Object

Description: Presentation settings for the box plot.

* **whiskers**

  Type: Object

  Description: Settings for the box plot whiskers.

  whiskers properties

  | Name | Type | Description |
  | --- | --- | --- |
  | show | Boolean | Set to true to show whiskers.<br><br>Default: false |

### qHyperCubeDef

Type: Object

Description: 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](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/EngineJSONAPI/Content/models-hypercubedef.htm).

Properties

#### qDimension

Type: Array

Description: Extends NxDimension, see [Engine API: NxDimension](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/EngineJSONAPI/Content/models-nxdimension.htm).

Additional properties

* **qDef**

  Type: Object

  Description: Extends NxInlineDimensionDef, see [Engine API: NxInlineDimensionDef](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/EngineJSONAPI/Content/models-nxinlinedimensiondef.htm).

  qDef properties

  | Name | Type | Description |
  | --- | --- | --- |
  | autoSort | Boolean | Set to automatically sort the dimension.<br><br>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](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/EngineJSONAPI/Content/models-nxattrdimdef.htm).

  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](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/EngineJSONAPI/Content/models-nxmeasure.htm).

Additional properties

* **qDef**

  Type: Object

  Description: Extends NxInlineMeasureDef, see [Engine API: NxInlineMeasureDef](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/EngineJSONAPI/Content/models-nxinlinemeasuredef.htm).

  qDef Properties

  | Name | Type | Description |
  | --- | --- | --- |
  | autoSort | Boolean | Set to automatically sort the measure.<br><br>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.<br><br>Default: true |
  | isCustomFormatted | Boolean | Set to true to toggle off the default client formatting. |

* **qAttributeExpressions**

  Type: Array

  Extends NxAttrExprDef, see [Engine API: NxAttrExprDef](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/EngineJSONAPI/Content/models-nxattrexprdef.htm).

  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.

dimensionAxis properties

| Name | Type | Description |
| --- | --- | --- |
| show | String | Defines if titles and labels should be visible. Can be one of:<br><br><ul><li><span>all</span></li><li><span>labels</span></li><li><span>title</span></li><li><span>none</span></li></ul><br><br>Default: all |
| label | String | Defines the label orientation. Can be one of:<br><br><ul><li><span>auto</span></li><li><span>horizontal</span></li><li><span>tilted</span></li></ul><br><br>Default: auto |
| dock | String | Axis docking position. Can be:<br><br><ul><li><span>near</span></li><li><span>far</span></li></ul><br><br>Default: near |

### gridLines

Type: Object

Grid line settings.

gridLines settings

| Name | Type | Description |
| --- | --- | --- |
| auto | Boolean | Set to show grid lines.<br><br>Default: true |
| spacing | Integer | Defines the grid line spacing. Used when "auto": false. Can be one of:<br><br><ul><li><span>0</span>: no lines</li><li><span>1</span>: wide</li><li><span>2</span>: medium</li><li><span>3</span>: narrow</li></ul><br><br>Default: 2 |

### measureAxis

Type: Object

Measure axis settings.

measureAxis properties

| Name | Type | Description |
| --- | --- | --- |
| show | String | Set to display the labels and titles. Can be one of:<br><br><ul><li><span>all</span></li><li><span>labels</span></li><li><span>title</span></li><li><span>none</span></li></ul><br><br>Default: all |
| dock | String | Sets the axis docking position. Can be one of:<br><br><ul><li><span>near</span></li><li><span>far</span></li></ul><br><br>Default: near |
| spacing | Number | Set the axis scale:<br><br>Default: 1 |
| autoMinMax | Boolean | Set to use automatic min/max for measure color.<br><br>Default: true |
| minMax | String | Set custom max/min. Can be one of:<br><br><ul><li><span>min</span></li><li><span>max</span></li><li><span>minMax</span></li></ul><br><br>Default: min |
| min | ValueExpressionContainer | Set the min value for the range. |
| max | ValueExpressionContainer | Set the max value for the range. |

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

### refLine

Type: Object

Reference line settings.

#### refLines

Type: Array

refLines properties

| Name | Type | Description |
| --- | --- | --- |
| show | Boolean | Set to true to display this reference line.<br><br>Default: true |
| label | String | Reference line label. |
| color | Integer | Deprecated. Use paletteColor instead.<br><br>Color.<br><br>Default: 3 |
| paletteColor | Object | Description: Color information structure. Holds the actual color and index in palette.<br><br><ul><li><strong>color</strong>: <p><span>Type: String</span></p>Description: Color as hex string (mandatory if index: -1)</li><li><strong>index</strong>: <p><span>Type: Integer</span></p>Description: Index in palette. If a custom color, not in the palette, is being used, set index to <span>-1</span>.</li></ul> |

### sorting

Type: Object

sorting properties

| Name | Type | Description |
| --- | --- | --- |
| autoSort | Boolean | Set to sort automatically.<br><br>Default: true |
| elementId | String | Sorting preset. Can be one of:<br><br><ul><li><span>firstWhisker</span></li><li><span>boxStart</span></li><li><span>boxMiddle</span></li><li><span>boxEnd</span></li><li><span>lastWhisker</span></li></ul><br><br>Default: firstWhisker |
| expression | ValueExpressionContainer | Value expression container. |
| sortCriteria | Object | Sorting criteria. Can be one of the following Number values:<br><br><ul><li><span>sortByAscii</span></li><li><span>sortByExpression</span></li><li><span>sortByNumeric</span></li></ul> |

## Example using Visualization API

Tip noteFor more examples of how to create box plots on the fly, see [Mashups: Creating box plots](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/Mashups/Content/Sense_Mashups/Create/Visualizations/Boxplot/create-boxplot.htm).

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");
});
```