# gauge properties

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

gauge()

These are the properties used by Qlik Sense gauges.

## Version history

Version history

| Version state | Details |
| --- | --- |
| Introduced | 2.2 |

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

Properties

#### qMeasures

Type: Array

Description: Extends NxMeasure, see [Engine API: NxMeasure](https://help.qlik.com/en-US/sense-developer/November2025/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/November2025/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/November2025/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.

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

### 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 |
| spacing | Number | Set the axis scale:<br><br>Default: 1 |
| min | ValueExpressionContainer | Set the min value for the range. |
| max | ValueExpressionContainer | Set the max value for the range. |

### gaugetype

Type: String

Sets the visual representation of the gauge. Can be one of:

* radial
* bar

Default: radial

### autoOrientation

Type: Boolean

Sets auto orientation.

Default: true

### orientation

Type: String

Orientation settings. Applicable if "autoOrientation": false. Can be:

* horizontal
* vertical

Default: horizontal

### angle

Type: Number

Sets the arc size of a radial gauge. All gauges created with Qlik Sense by default sets "angle": 0.7 which means that 70 per cent of the arc is displayed. If you set "angle": 0.5, half of the arc is displayed.

Default: 0.7

### useSegments

Type: Boolean

Set to use color segments.

### progressColor

Type: Integer

Deprecated. Use paletteProgressColor instead.

Set single color to use. Only used if useSegments is false.

Default: 3

### paletteProgressColor

Type: Object

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

paletteProgressColor properties

| Name | Type | Description |
| --- | --- | --- |
| index | Integer | Index in the palette.<br><br>The default Qlik Sense color palette:<br><br><ul> <li><span>-1</span>: set to use custom color that is not in the palette.</li> <li><span>0</span>: No color</li> <li><span>1</span>: White, HEX: <span>#ffffff</span></li> <li><span>2</span>: Light green, HEX: <span>#46c646</span></li> <li><span>3</span>: Green, HEX: <span>#276e27</span></li> <li><span>4</span>: Light blue, HEX: <span>#b6d7ea</span></li> <li><span>5</span>: Blue, HEX: <span>#7db8da</span></li> <li><span>6</span>: Dark blue, HEX: <span>#4477aa</span></li> <li><span>7</span>: Purple, HEX: <span>#8e477d</span></li> <li><span>8</span>: Yellow, HEX: <span>#ffcf02</span></li> <li><span>9</span>: Orange, HEX: <span>#f8981d</span></li> <li><span>10</span>: Red, HEX: <span>#f93f17</span></li> <li><span>11</span>: Brown, HEX: <span>#633d0c</span></li> <li><span>12</span>: Light gray, HEX: <span>#b0afae</span></li> <li><span>13</span>: Gray, HEX: <span>#7b7a78</span></li> <li><span>14</span>: Dark gray, HEX: <span>#545352</span></li> <li><span>15</span>: Black, HEX: <span>#000000</span></li> </ul><br><br>Default: 6 |
| color | String | Color as HEX string.<br><br>Mandatory if "index": "-1". |

### valueMode

Type: String

Defines if the gauge should display absolute values or relative values. Can be one of:

* absolute
* relative

Default: absolute

### maxSegments

Type: Integer

Sets the maximum number of color segments.

Default: 6

### segmentInfo

Type: Object

Defines segment information. Applicable if "useSegments": true.

segmentInfo properties

| Name | Type | Description |
| --- | --- | --- |
| limits | Array | Color gradient limitations.<br><br><ul> <li><strong>value</strong>: <p><span>Type: ValueExpressionContainer</span></p>Description: Value expression container.</li> <li><strong>gradient</strong>: <p><span>Type: Boolean</span></p>Description: Set to use gradient between segments.</li> </ul> |
| paletteColors | Object | Replaces segment colors and provides ability to set custom colors. Overrides segment.colors when set.<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. Default: <span>6</span></li> </ul> |
| colors | String | Color value for individual segment.<br><br><ul> <li><strong>color</strong>: <br><span>Type: Integer</span><!--[CDATA[]]--><br>Color of segment. Default: <span>3</span></li> </ul> |

### disclaimerClosed

Type: Boolean

Set to true if you do not want to show a disclaimer on gauge objects.

Default: true

### color

Type: Object

Controls if colors encoded in master items should be used.

color properties

| Name | Type | Description |
| --- | --- | --- |
| useBaseColors | String | Use colors encoded in master items. One of:<br><br><ul> <li><span>off</span> </li> <li><span>measure</span> </li> </ul><br><br>Default: measure |

## Example using Visualization API

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

In this example we create a basic radial gauge, containing one measure, with the titles switched off and a custom range.

```
app.visualization.create(
  'gauge',
  [
    {
      "qDef": {
        "qLabel": "Fairway hits",
        "qDef": "Avg(FwHit)",
        "qNumFormat": {
            "qType": "F",
            "qnDec": 2,
            "qUseThou": 0,
            "qFmt": "0.0%",
            "qDec": ".",
            "qThou": ","
          }
      }
    }
  ],
  {
    "showTitles": false,
    "measureAxis": {
      "min": 0,
      "max": 1
    },
    "gaugetype": "radial"
  }
).then(function(vis){
  vis.show("QV01");
});
```