# linechart properties

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

linechart()

These are the properties used by Qlik Sense line charts.

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

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

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

#### auto

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

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

  Information notebyDimension 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

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

Type: Integer

Deprecated. Use paletteColor instead.

Set to use single color.

Default: 3

#### paletteColor

Type: Object

The paletteColor object is used to define the color when you color by single color ("mode": "primary"). It has the following properties:

paletteColor 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". |

#### persistent

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

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

Type: String

Defines the label on tool tips when using a coloring expression. Only applicable when "mode": "byExpression" and only used if "expressionIsColor": false

#### colorExpression

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

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

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

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

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

Type: Boolean

Set to true to reverse the color scheme.

#### autoMinMax

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

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

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

### 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/May2026/Subsystems/EngineJSONAPI/Content/models-hypercubedef.htm).

#### qDimensions

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

* **qAttributeExpressions**

  Type: Array

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

  * 

    **id**

    Type: String

    Description: All qAttributeExpressions IDs are 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.

    * customTooltipImages: An AttributeExpression with this ID sets the tooltip image.

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

Information noteThe maximum number of measures that can be set for this chart type is 15.

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

  Additional properties:

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

    Available modifiers

    | 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.<br><br>Properties:<br><br><ul> <li><strong>accumulationDimension</strong>: <span>Type: Integer</span>. 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.</li> <li><strong>crossAllDimensions</strong>: <span>Type: Boolean</span>. Only displayed when there are two dimensions. Continues accumulation across both dimensions.</li> <li><strong>fullAccumulation</strong>: <span>Type: Boolean</span>. Select whether the accumulation will happen on the <span>Full</span> range or <span>Custom</span> range.</li> <li> <p><strong>steps</strong>: <span>Type: Integer</span>. Only displayed when <span>Range</span> is set to <span>Custom</span>. The number of steps in the dimensions which form an accumulation range. Only zero and positive integers are accepted. <br>Note: Sorting order of dimension values (or step order) is important and affects results.</p> </li> <li><strong>outputExpression</strong>: <span>Type: String</span>. Shows the expression used by the modifier.</li> <li><strong>showExcludedValues</strong>: <span>Type: Boolean</span>. Shows the excluded values (values not in the current selection) in the accumulation.</li> <li><strong>disabled</strong>: <span>Type: Boolean</span>.</li> </ul> |
    | movingAverage | Object | Only displayed when **movingAverage** has been set as a modifier.<br><br>Properties:<br><br><ul> <li><strong>primaryDimension</strong>: <span>Type: Integer</span>. 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.</li> <li><strong>crossAllDimensions</strong>: <span>Type: Boolean</span>. Only displayed when there are two dimensions. Continues the moving average across both dimensions.</li> <li><strong>fullRange</strong>: <span>Type: Boolean</span>. Select whether the moving average will happen on the Full range or Custom range.</li> <li><strong>steps</strong>: <span>Type: Integer</span>. Only displayed when <span>Range</span> is set to <span>Custom</span>. 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.</li> <li> <p><strong>nullSuppression</strong>: <span>Type: Boolean</span>. Choose to have null values calculated by the moving average modifier.</p> </li> <li><strong>outputExpression</strong>: <span>Type: String</span>. Shows the expression used by the modifier.</li> <li><strong>showExcludedValues</strong>: <span>Type: Boolean</span>. Shows the excluded values (values not in the current selection) in the moving average.</li> <li><strong>disabled</strong>: <span>Type: Boolean</span>.</li> </ul> |
    | difference | Object | Only displayed when **difference** has been set as a modifier.<br><br>Properties:<br><br><ul> <li><strong>primaryDimension</strong>: <span>Type: Integer</span>. 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.</li> <li><strong>crossAllDimensions</strong>: <span>Type: Boolean</span>. Only displayed when there are two dimensions. Continues the difference across both dimensions.</li> <li><strong>outputExpression</strong>: <span>Type: String</span>. Shows the expression used by the modifier.</li> <li><strong>showExcludedValues</strong>: <span>Type: Boolean</span>. Shows the excluded values (values not in the current selection) in the difference.</li> <li><strong>disabled</strong>: <span>Type: Boolean</span>.</li> </ul> |
    | 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.<br><br>Properties:<br><br><ul> <li><strong>dimensionalScope</strong>: <span>Type: Integer</span>. 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:<ul><li><span>respectOneDimension</span>: Value: 0. Available when more than one dimensions are available. Calculates the subtotal for that dimension.</li><li><span>respectAllDimensions</span>: 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.</li><li><span>disregardDimension</span>: 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.</li><li><span>disregardAllDimensions</span>: 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.</li></ul></li> </ul><br><br><ul> <li><strong>selectionScope</strong>: <span>Type: Integer</span>. 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:<ul><li><span>currentSelection</span>: Value: 0. Uses current selection to calculate modifier.</li><li><span>selectFieldValue</span>: Value: 1. Uses a field to calculate the modifier.</li><li><span>disregardSelection</span>: Value: 2. Disregards any selections when calculating the modifier.</li></ul></li> </ul> |

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

  * **style**

    Type: Object

    Description: When enabled, can be used to change the line thickness, line type, and line curve for one of the lines.

    These style settings will override the components styling settings.

    Properties:

    * **dataPointSize**: Type: Number. Set to specify the size of the data point. Min: 3. Max: 20. Default: 6
    * **lineThickness**: Type: Number. Set to specify line thickness. Can be set from 1 to 5. Default: 1
    * **lineType**: Type: String. Line can set to solid or dashed. Default: solid
    * **lineCurve**: Type: String. Can be set to linear or monotone. Default: linear

  * **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](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.

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

* data

* hideBasic

  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

* chart

  Type: Object

  Description: The chart objects are used to define the chart that is displayed by the custom tooltip.

  * object

    Type: MasterVisualizationChartObject

    Description: Contains the master visualizations available to add to the tooltip.

    * refId

      Type: String

      Description: Input field containing the qExtendsId of the visualization, where qExtendsId is the unique id of the master visualization.

  * style

    Type: MasterVisualizationChartStyle

    Description: Determines the styling available for the chart in the tooltip.

    * size

      Type: String

      Description: Size of the chart when it is displayed. One of:

      * small
      * medium
      * large

      The small, medium, and large settings yield fixed pixel sizes for the chart container. The chart is scaled to fit the tooltip.

* imageComponents

  Type: Array

  Description: The imageComponents objects are used to define the images displayed by the custom tooltip.

  * type

    Type: String

    Description: Type of the image for the current selection. One of:

    * media library
    * url

  * size

    Type: String

    Description: Size of the image when it is displayed. One of:

    * small
    * medium
    * large
    * original

    The small, medium, and large settings yield fixed pixel sizes for the image container. Setting the value to original maintains the size unless it exceeds the limit of the tooltip max size. The image is scaled to fit the tooltip if it exceeds the limit.

  * ref

    Type: String, StringExpression, or MediaLibraryRef

    Description: The reference value of the image.

    * MediaLibraryRef

      Type: Object

      Description: Media Library Reference structure.

      * qStaticContentUrlDef

        Object

        Description: Media Library structure that is evaluated by the engine.

        * qUrl

          Type: String

          Description: Media library path for the image in the application. Used only when type is set to media library.

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

#### dimRefLines

Type: Array

dimRefLines properties

| Name | Type | Description |
| --- | --- | --- |
| show | String \| ValueExpression | Determines if the reference line is shown based on the result (of a ValueExpression) that is returned from the engine. If a condition is evaluated as true, the engine returns -1; if evaluated as false, the result is 0.<br><br>Default: "" |
| label | String \| StringExpression | Reference line label. |
| showLabel | Boolean | Set to true to display the label of the reference line.<br><br>Default: true |
| showValue | Boolean | Set to true to display the value of the reference line.<br><br>Default: true |
| 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)												<p></p><p>Default: <span>#333333</span></p><p></p></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>.<p>Default: <span>-1</span></p></li> </ul> |
| style | Object | Description: Style settings for the reference line.<br><br><ul> <li><strong>lineThickness</strong>: <p><span>Type: Integer</span></p>Description: Sets the thickness of the reference line.<p>Default: <span>2</span></p></li> <li><strong>lineType</strong>: <p><span>Type: String</span></p>Description: Sets the dash style of the reference line. Can be a pattern of dashes and gaps to paint a line. For example, "8 4" specifies that the length for the dash is 8 and the length for the empty space is 4.											<p>An empty string  means the line is solid.</p><p>Default: <span>""</span></p></li> </ul> |
| refLineExpr | Object | Description: Defines the value of the reference line to be displayed with an optional label.<br><br><ul> <li><strong>value</strong>: <p><span>Type:                                                         Integer \|                                                        ValueExpression</span></p>Description: Used when the dimensional axis is continuous. This can either be a “static” numerical value, like 5.5 or it can be a ValueExpression.<p>Default: <span>0</span></p></li> <li><strong>label</strong>: <p><span>Type:                                                         String \|                                                        StringExpression</span></p>Description: A  text representation of the value that can be displayed and attached to the reference line. For example, if the value is 4490, the label could be “4.49k”.<p>Default: <span>"0"</span></p></li> <li><strong>stringValue</strong> <p><span>Type: String \|                                                        StringExpression</span> </p>Description: Used when the dimensional axis has discrete values. This can either be static text or a StringExpression.<p>Default: <span>""</span></p></li> </ul> |
| align | String | Sets the alignment of the reference line. One of:<br><br><ul> <li>start</li> <li>center</li> <li>end</li> </ul><br><br>Default: center |
| coloredBackground | Boolean | Set to true to fill the label and/or value of this reference line with the specified color.<br><br>Default: false |

### lineType

Type: String

Set the type of line chart. Can be one of:

* line
* area

Default: line

### stackedArea

Type: Boolean

Set to true to use stacked areas. Applicable if "lineType": "area".

Default: false

### separateStacking

Type: Boolean

Set to stack positive and negative values separately. Applicable if "lineType": "area".

Default: true

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

### scrollStartPos

Type: Number

Scroll Alignment. Generally decides if the scroll starts at the beginning or end of the data.

* 0: the scroll bar starts at the left/top of the chart
* 1: the scroll bar starts at the right/bottom of the chart

### nullMode

Type: String

Sets the null value presentation mode. Can be one of:

* gap
* connect
* zero

Default: gap

### orientation

Type: String

Orientation settings. Can be:

* horizontal
* vertical

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

Default: horizontal

### dataPoint

Type: Object

Data point settings.

dataPoint properties

| Name | Type | Description |
| --- | --- | --- |
| show | Boolean | Set to display data points on line series. Only used if there is at least one measure with type set to line. |
| showLabels | Boolean | Set to show labels on data points.<br><br>Default: false |

### gridLine

Type: Object

Grid line settings.

gridLine properties

| Name | Type | Description |
| --- | --- | --- |
| auto | Boolean | Set to use automatic grid line spacing.<br><br>Default: true |
| spacing | Integer | Grid line spacing. Used only when "auto": false. 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 |

### scrollbar

Type: String

Set the styling of the scroll bar. Can be one of:

* bar
* none
* miniChart

Default: miniChart

### components

Type: Array

Component settings.

#### key

Type: String

Determines which component the settings apply to.

Default: line

#### style

Type: Object

style properties

| Name | Type | Description |
| --- | --- | --- |
| dataPointSize | Number | Set to specify the size of the data point.<br><br>Min: 3<br><br>Max: 20<br><br>Default: 6 |
| lineThickness | Number | Set to specify line thickness.<br><br>Can be set from 1 to 5.<br><br>Default: 1 |
| lineType | String | Line can set to solid or dashed.<br><br>Default: solid |
| lineCurve | String | Can be set to linear or monotone.<br><br>Default: linear |

### legend

Type: Object

Legend settings.

legend properties

| Name | Type | Description |
| --- | --- | --- |
| show | Boolean | Set to show the legend.<br><br>Default: true |
| dock | String | Sets the legend position. Can be one of:<br><br><ul> <li><span>auto</span> </li> <li><span>right</span> </li> <li><span>left</span> </li> <li><span>bottom</span> </li> <li><span>top</span> </li> </ul><br><br>Default: auto |
| showTitle | Boolean | Show the legend title.<br><br>Default: true |

### dimensionAxis

Type: Object

Dimension axis settings.

dimensionAxis 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 |
| label | String | Set 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 | 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 |
| continuousAuto | Boolean | Continuous setting used for toggling between auto and custom setting.<br><br>Default: true |
| axisDisplayMode | String | Set to specify axis display mode (number of bars). Can be one of:<br><br><ul> <li><span>auto</span> </li> <li><span>max</span> </li> <li><span>custom</span> </li> </ul><br><br>Default: auto |
| maxVisibleItems | Expression | Only visible when axisDisplayMode is custom.<br><br>Accepts integers or expressions.<br><br>Max = 10000 / (numDims+numMeasures) |

### measureAxis

Type: Object

Measure axis settings.

measureAxis properties

| Name | Type | Description |
| --- | --- | --- |
| logarithmic | Boolean | Logarithmic scale. |
| 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. |

## Example using Visualization API

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

In this example we create a basic line chart, containing one dimension and one measure, and with a custom title.

```
app.visualization.create(
  'linechart',
  [
    {
      "qDef": {
        "qGrouping": "N",
        "qFieldDefs": [
          "=Dual([Date.autoCalendar.Date],ID)"
        ],
        "qFieldLabels": [
          "Date"
        ]
      },
      "qNullSuppression": true
    },
    {
      "qDef": {
        "qLabel": "Pts",
        "qGrouping": "N",
        "qDef": "Avg(Stableford)",
        "qNumFormat": {
          "qType": "U",
          "qnDec": 10,
          "qUseThou": 0
        }
      }
    }
  ],
  {
    "showTitles": true,
    "title": "Stableford point trend"
  }
).then(function(vis){
  vis.show("QV01");
});
```