Extensions

The Extension API consists of methods and properties used to create custom legacy visualization extensions. Consider leveraging nebula.js for new extension authoring.

Download specification

define(dependencies, cb) function

The extension as an AMD module.

Parameters

  • dependencies Array< string >
    Required
  • Required
    Show cb properties
    • ExtensionFn interface
      Required
      Parameters
      • libs Array< any >
        Required
      Returns

qext interface

The extension metadata file (QEXT) is a JSON file, and is used by Qlik Sense to identify the visualization extension. It contains the metadata used for the library or assets panel. When deployed to Qlik Sense, the visualization extension is displayed in the Charts section of the assets panel or library panel.

Properties

  • name string
    Required

    This is the name of the visualization extension and is displayed in the library as well as in the preview. It is recommended to use a unique name for the visualization to avoid interference with other visualizations that may have the same name.

  • type 'visualization'
    Required

    This defines the type of extension. It should always be 'visualization' for visualization extensions.

  • description string

    This defines the description visible in the preview of the visualization extension.

  • icon 'bar-chart-vertical'  |  'extension'  |  'filterpane'  |  'gauge-chart'  |  'line-chart'  |  'list'  |  'map'  |  'pie-chart'  |  'scatter-chart'  |  'table'  |  'text-image'  |  'treemap'

    This defines the icon displayed in the library.

  • preview string

    This defines which preview image is to be used. The preview image is displayed in a pop-up when you select the visualization extension in the library.

  • version string

    This defines your individual version handling of the visualization extension. This setting is manually defined. Semantic versioning is recommended.

  • author string

    This defines the author of the visualization extension. This setting is manually defined.

qext

```json
{
  "name": "Hello World",
  "description": "Hello world example",
  "preview": "helloworld.png",
  "type": "visualization",
  "version": 1,
  "author": "Qlik International"
}
```

new BackendAPI() class

Helper functions for Engine calls and access to Engine data. Available for extensions as this.backendApi.

BackendAPI abortSearch() function

Aborts the result of a search in a list object. Clears the existing search and returns the object to the state it was prior to the start of the search.

Returns

  • Promise < empty >
    Required

    A promise of a Qlik engine response.

abortSearch

this.backendApi.abortSearch();

BackendAPI acceptSearch(toggleMode) function

Accepts the result of a search in a list object and the search result is selected in the field.

Parameters

  • toggleMode boolean
    Required

    If true, toggle state for selected values.

Returns

  • Promise < empty >
    Required

    A promise of a Qlik engine response.

acceptSearch

this.backendApi.acceptSearch(false);

BackendAPI applyPatches(qPatches, qSoftPatch) function

Updates the properties for this object.

Parameters

  • qPatches Array< QAE.NxPatch >
    Required

    Array of patches to apply.

  • qSoftPatch boolean
    Required

    Set to true if properties should be soft, that is not persisted.

Returns

  • Promise < empty >
    Required

    A promise of a Qlik engine reply.

applyPatches

this.backendApi.applyPatches([
  {
    "qPath": "/qListObjectDef/qDef/qSortCriterias/0/qSortByLoadOrder",
    "qOp": "replace",
    "qValue": "-1"
  },
  {
    "qPath": "/meta",
    "qOp": "add",
    "qValue": "{ \"data\": \"this is the data\"}"
  }
], true);

BackendAPI clearSelections() function

Clears unconfirmed selections for this object.

Returns

  • Promise < empty >
    Required

    A promise of a Qlik engine reply.

clearSelections

this.backendApi.clearSelections();

BackendAPI clearSoftPatches() function

Clears all soft patches that have previously been applied to this object using the applyPatches method.

Returns

  • Promise < empty >
    Required

    A promise of a Qlik engine reply.

clearSoftPatches

this.backendApi.clearSoftPatches();

BackendAPI collapseLeft(qRow, qCol, qAll?) function

Collapses the left dimensions of a pivot table. Only works for HyperCubes with qMode = 'P' which are not always fully expanded.

Parameters

  • qRow number
    Required

    Row index.

  • qCol number
    Required

    Column index.

  • qAll boolean

    If set to true, qRow and qCol are ignored and all cells are collapsed.

Returns

  • Promise < empty >
    Required

    A promise of a Qlik engine reply.

collapseLeft

this.backendApi.collapseLeft(0, 0, true);

BackendAPI collapseTop(qRow, qCol, qAll?) function

Collapses the top dimensions of a pivot table. Only works for hypercubes with qMode = 'P' which are not always fully expanded.

Parameters

  • qRow number
    Required

    Row index.

  • qCol number
    Required

    Column index.

  • qAll boolean

    If set to true, qRow and qCol are ignored and all cells are collapsed.

Returns

  • Promise < empty >
    Required

    A promise of a Qlik engine reply.

collapseTop

this.backendApi.collapseTop(0, 1);

BackendAPI eachDataRow(callback) function

Loops through data rows for this object. Only rows that are available client side will be used.

Parameters

  • callback eachRow
    Required

    Function to call for each row. Parameters are row number and row data as an array of QAE.NxCell objects. The loop is terminated if the function returns false.

    Show callback properties
    • eachRow interface
      Required
      Parameters

eachDataRow

this.backendApi.eachDataRow(function(rownum, row) {
  html += '<li class="state-' + row[0].qState + '" data-value="'
  + row[0].qElemNumber + '">' + row[0].qText;
    if(row[0].qFrequency) {
      html += '<span>' + row[0].qFrequency + '</span>';
    }
  html += '</li>';
});

BackendAPI expandLeft(qRow, qCol, qAll?) function

Expands the left dimensions of a pivot table. Only works for hypercubes with qMode = 'P' which are not always fully expanded.

Parameters

  • qRow number
    Required

    Row index.

  • qCol number
    Required

    Column index.

  • qAll boolean

    If set to true, ignore qRow and qCol and expands all cells.

Returns

  • Promise < empty >
    Required

    A promise of a Qlik engine reply.

expandLeft

this.backendApi.expandLeft(0, 0, true);

BackendAPI expandTop(qRow, qCol, qAll?) function

Expands the top dimensions of a pivot table. Only works for hypercubes with qMode = 'P' which are not always fully expanded.

Parameters

  • qRow number
    Required

    Row index.

  • qCol number
    Required

    Column index.

  • qAll boolean

    If set to true, qRow and qCol are ignored and all cells are expanded.

Returns

  • Promise < empty >
    Required

    A promise of a Qlik engine reply.

expandTop

this.backendApi.expandTop(0, 1);

BackendAPI getData(qPages) function

Gets data from Qlik engine for this object.

Parameters

  • qPages Array< QAE.NxPage >
    Required

    An array of QAE.NxPage objects.

Returns

  • Promise < Array< QAE.NxDataPage > >
    Required

    A promise of Array<QAE.NxDataPage>.

getData

var self = this;
var requestPage = [{
  qTop: i + this.currpos,
  qLeft: 0,
  qWidth: 10,
  qHeight: this.displayrows
}];

this.backendApi.getData(requestPage).then(function(dataPages) {
  self.paint($element);
});

BackendAPI getDataRow(rownum) function

Gets a data row for this object.

Parameters

  • rownum number
    Required

    The row number.

Returns

  • Array< QAE.NxCell >
    Required

    An array of QAE.NxCell or null if the row is not available client side and need to be fetched with getData.

getDataRow

var cells = this.backendApi.getDataRow(row);
if(cells) {
  cells.each(function(cell) {
    console.log('cell text: ', cell.qText);
  });
}

BackendAPI getDimensionInfos() function

Gets qDimensionInfo for this object.

Returns

getDimensionInfos

this.backendApi.getDimensionInfos().forEach(function(dimInfo){
  console.log('title: ', dimInfo.qFallbackTitle);
});

BackendAPI getMeasureInfos() function

Get qMeasureInfo for this object.

Returns

getMeasureInfos

this.backendApi.getMeasureInfos().forEach(function(measureInfo){
  console.log('title: ', measureInfo.qFallbackTitle);
});

BackendAPI getPivotData(qPages) function

Gets pivot data from the Qlik engine for this object. Only works for hypercubes with qMode = 'P'.

Parameters

  • qPages Array< QAE.NxPage >
    Required

    An array of request page objects.

Returns

getPivotData

var requestPage = {
  qTop : 0,
  qLeft : 0,
  qWidth : 10,
  qHeight : count
};

this.backendApi.getPivotData([requestPage]).then(function(dataPages) {
  ...
});

BackendAPI getProperties() function

Get Properties for this object.

Returns

getProperties

var me = this;
this.backendApi.getProperties().then(function(reply){
  reply.title = 'New title';
  me.backendApi.setProperties(reply);
});

BackendAPI getReducedData(qPages, qZoomFactor, qReductionMode) function

Get reduced data from Qlik engine for this object. This method is intended for preserving the shape of the data, not for viewing the actual data points.

Parameters

  • qPages Array< QAE.NxPage >
    Required

    An array of QAE.NxPage objects.

  • qZoomFactor number
    Required

    If set to -1, the Qlik engine decides the zoom factor. If qReductionMode is 'D1' or 'S', the zoom factor is 2ⁿ. If the zoom factor is 5, the data is reduced by a factor 32. If qReductionMode is 'C', the zoom factor defines the number of centroids.

  • qReductionMode string
    Required

    Reduction mode. One of:

    • 'N' for no data reduction.
    • 'D1' to reduce a bar chart or line chart. The profile of the chart is reduced whatever the number of dimensions in the chart.
    • 'S' to reduce the resolution of a scatter plot.
    • 'C' to reduce the data of a scatter plot chart.
    • 'ST' to reduce the data of a stacked pivot table.

Returns

getReducedData

var requestPage = [{
  qTop : 0,
  qLeft : 0,
  qWidth : 10,
  qHeight : count
}];

this.backendApi.getReducedData(requestPage, -1, "D1").then(function(dataPages) {
  ...
});

BackendAPI getRowCount() function

Gets the total number of data rows for this object.

Returns

  • number
    Required

    The total number of data rows.

getRowCount

if (this.backendApi.getRowCount() > lastrow + 1) {
  morebutton = true;
}

BackendAPI getStackData(qPages, qMaxNbrCells?) function

Gets stacked data from the Qlik engine for this object. Only works for hypercubes with qMode = 'S'.

Parameters

  • qPages Array< QAE.NxPage >
    Required

    An array of request page objects.

  • qMaxNbrCells number

    Maximum number of cells at outer level.

Returns

getStackData

var requestPage = {
  qTop : 0,
  qLeft : 0,
  qWidth : 10,
  qHeight : count
};

this.backendApi.getStackData([requestPage], 1000).then(function(dataPages) {
  ...
});

BackendAPI hasSelections() function

Returns true if there are unconfirmed selections for this object.

Returns

  • boolean
    Required

    true if there are unconfirmed selections.

hasSelections

this.backendApi.hasSelections();

BackendAPI save() function

Deprecated

Save this object.

Returns

  • Promise < empty >
    Required

    A promise of a Qlik engine reply.

Search for a term in a list object. Results in an updated layout, containing only matching records.

Parameters

  • term string
    Required

    Term to search for.

Returns

  • Promise < successful >
    Required

    A promise of a Qlik engine response. Note that the response will show if the search operation was successful or not. It will not contain the matching results.

search

this.backendApi.search("A");

BackendAPI selectRange(qRanges, qOrMode) function

Select values in this object using ranges. Only applicable to hypercubes.

Parameters

  • qRanges Array< QAE.NxRangeSelectionInfo >
    Required

    Array of ranges to select.

  • qOrMode boolean
    Required

    If true, only one of the measures needs to be in range.

Returns

  • Promise < successful >
    Required

    A promise of a Qlik engine response with the status of the operation, i.e. if it was successful or not, and details on which objects were updated following the selections.

selectRange

var range = {
  qMeasureIx: 1,
  qRange: {
  qMin: 10,
  qMax: 100,
  qMinInclEq: true,
  qMaxInclEq: true
};
this.backendApi.selectRange([range], false);

BackendAPI selectValues(qDimNo, qValues, qToggleMode) function

Selects values in this object with a Qlik engine call that triggers a repaint of the object.

Parameters

  • qDimNo number
    Required

    Dimension number. 0 is the first dimension.

  • qValues Array< number >
    Required

    Array of values (qElemNumber in the matrix from engine) to select or deselect.

  • qToggleMode boolean
    Required

    If true, values in the field are selected in addition to any previously selected items. If false, values in the field are selected while previously selected items are deselected.

selectValues

$element.find('li').on('qv-activate', function() {
  if(this.hasAttribute("data-value")) {
    var value = parseInt(this.getAttribute("data-value"), 10), dim = 0;
    self.backendApi.selectValues(dim, [value], true);
  }
});

BackendAPI setCacheOptions(opts) function

Sets caching of page requests.

When enabled, calls to getData are throttled and new requests are created based on internal cache settings. If you want full control of requests to getData, set enabled = false.

Parameters

  • opts object
    Required
    Show opts properties
    • enabled boolean
      Required

      Set to true to enable caching.

setCacheOptions

this.backendApi.setCacheOptions({
  enabled: false // disable cache
})

BackendAPI setProperties(props) function

Set properties for this object.

Parameters

Returns

  • Promise < empty >
    Required

    A promise of a Qlik engine reply.

setProperties

var me = this;
this.backendApi.getProperties().then(function(reply){
  reply.title = 'New title';
  me.backendApi.setProperties(reply);
});

Extension interface

Interface for a Qlik Sense Extension

Properties

Extension mounted($element) function

Parameters

  • $element jqLiteElement
    Required

Extension paint($element, layout) function

Parameters

Returns

  • Promise < void >
    Required

Extension updateData(layout) function

Parameters

Returns

  • Promise < void >
    Required

Extension resize($element, layout) function

Parameters

Returns

  • Promise < void >
    Required

Extension beforeDestroy() function

ExtensionContext interface

Properties

  • backendApi BackendAPI
    Required
    Show backendApi properties
    • abortSearch() function
      Required

      Aborts the result of a search in a list object. Clears the existing search and returns the object to the state it was prior to the start of the search.

      Returns
      • Promise < empty >
        Required

        A promise of a Qlik engine response.

    • acceptSearch() function
      Required

      Accepts the result of a search in a list object and the search result is selected in the field.

      Parameters
      • toggleMode boolean
        Required

        If true, toggle state for selected values.

      Returns
      • Promise < empty >
        Required

        A promise of a Qlik engine response.

    • applyPatches() function
      Required

      Updates the properties for this object.

      Parameters
      • qPatches Array< QAE.NxPatch >
        Required

        Array of patches to apply.

      • qSoftPatch boolean
        Required

        Set to true if properties should be soft, that is not persisted.

      Returns
      • Promise < empty >
        Required

        A promise of a Qlik engine reply.

    • clearSelections() function
      Required

      Clears unconfirmed selections for this object.

      Returns
      • Promise < empty >
        Required

        A promise of a Qlik engine reply.

    • clearSoftPatches() function
      Required

      Clears all soft patches that have previously been applied to this object using the applyPatches method.

      Returns
      • Promise < empty >
        Required

        A promise of a Qlik engine reply.

    • collapseLeft() function
      Required

      Collapses the left dimensions of a pivot table. Only works for HyperCubes with qMode = 'P' which are not always fully expanded.

      Parameters
      • qRow number
        Required

        Row index.

      • qCol number
        Required

        Column index.

      • qAll boolean

        If set to true, qRow and qCol are ignored and all cells are collapsed.

      Returns
      • Promise < empty >
        Required

        A promise of a Qlik engine reply.

    • collapseTop() function
      Required

      Collapses the top dimensions of a pivot table. Only works for hypercubes with qMode = 'P' which are not always fully expanded.

      Parameters
      • qRow number
        Required

        Row index.

      • qCol number
        Required

        Column index.

      • qAll boolean

        If set to true, qRow and qCol are ignored and all cells are collapsed.

      Returns
      • Promise < empty >
        Required

        A promise of a Qlik engine reply.

    • eachDataRow() function
      Required

      Loops through data rows for this object. Only rows that are available client side will be used.

      Parameters
      • callback eachRow
        Required

        Function to call for each row. Parameters are row number and row data as an array of QAE.NxCell objects. The loop is terminated if the function returns false.

        Show callback properties
        • eachRow interface
          Required
          Parameters
    • expandLeft() function
      Required

      Expands the left dimensions of a pivot table. Only works for hypercubes with qMode = 'P' which are not always fully expanded.

      Parameters
      • qRow number
        Required

        Row index.

      • qCol number
        Required

        Column index.

      • qAll boolean

        If set to true, ignore qRow and qCol and expands all cells.

      Returns
      • Promise < empty >
        Required

        A promise of a Qlik engine reply.

    • expandTop() function
      Required

      Expands the top dimensions of a pivot table. Only works for hypercubes with qMode = 'P' which are not always fully expanded.

      Parameters
      • qRow number
        Required

        Row index.

      • qCol number
        Required

        Column index.

      • qAll boolean

        If set to true, qRow and qCol are ignored and all cells are expanded.

      Returns
      • Promise < empty >
        Required

        A promise of a Qlik engine reply.

    • getData() function
      Required

      Gets data from Qlik engine for this object.

      Parameters
      • qPages Array< QAE.NxPage >
        Required

        An array of QAE.NxPage objects.

      Returns
      • Promise < Array< QAE.NxDataPage > >
        Required

        A promise of Array<QAE.NxDataPage>.

    • getDataRow() function
      Required

      Gets a data row for this object.

      Parameters
      • rownum number
        Required

        The row number.

      Returns
      • Array< QAE.NxCell >
        Required

        An array of QAE.NxCell or null if the row is not available client side and need to be fetched with getData.

    • getDimensionInfos() function
      Required

      Gets qDimensionInfo for this object.

      Returns
    • getMeasureInfos() function
      Required

      Get qMeasureInfo for this object.

      Returns
    • getPivotData() function
      Required

      Gets pivot data from the Qlik engine for this object. Only works for hypercubes with qMode = 'P'.

      Parameters
      • qPages Array< QAE.NxPage >
        Required

        An array of request page objects.

      Returns
    • getProperties() function
      Required

      Get Properties for this object.

      Returns
    • getReducedData() function
      Required

      Get reduced data from Qlik engine for this object. This method is intended for preserving the shape of the data, not for viewing the actual data points.

      Parameters
      • qPages Array< QAE.NxPage >
        Required

        An array of QAE.NxPage objects.

      • qZoomFactor number
        Required

        If set to -1, the Qlik engine decides the zoom factor. If qReductionMode is 'D1' or 'S', the zoom factor is 2ⁿ. If the zoom factor is 5, the data is reduced by a factor 32. If qReductionMode is 'C', the zoom factor defines the number of centroids.

      • qReductionMode string
        Required

        Reduction mode. One of:

        • 'N' for no data reduction.
        • 'D1' to reduce a bar chart or line chart. The profile of the chart is reduced whatever the number of dimensions in the chart.
        • 'S' to reduce the resolution of a scatter plot.
        • 'C' to reduce the data of a scatter plot chart.
        • 'ST' to reduce the data of a stacked pivot table.
      Returns
    • getRowCount() function
      Required

      Gets the total number of data rows for this object.

      Returns
      • number
        Required

        The total number of data rows.

    • getStackData() function
      Required

      Gets stacked data from the Qlik engine for this object. Only works for hypercubes with qMode = 'S'.

      Parameters
      • qPages Array< QAE.NxPage >
        Required

        An array of request page objects.

      • qMaxNbrCells number

        Maximum number of cells at outer level.

      Returns
    • hasSelections() function
      Required

      Returns true if there are unconfirmed selections for this object.

      Returns
      • boolean
        Required

        true if there are unconfirmed selections.

    • save() function Deprecated
      Required

      Save this object.

      Returns
      • Promise < empty >
        Required

        A promise of a Qlik engine reply.

    • search() function
      Required

      Search for a term in a list object. Results in an updated layout, containing only matching records.

      Parameters
      • term string
        Required

        Term to search for.

      Returns
      • Promise < successful >
        Required

        A promise of a Qlik engine response. Note that the response will show if the search operation was successful or not. It will not contain the matching results.

    • selectRange() function
      Required

      Select values in this object using ranges. Only applicable to hypercubes.

      Parameters
      • qRanges Array< QAE.NxRangeSelectionInfo >
        Required

        Array of ranges to select.

      • qOrMode boolean
        Required

        If true, only one of the measures needs to be in range.

      Returns
      • Promise < successful >
        Required

        A promise of a Qlik engine response with the status of the operation, i.e. if it was successful or not, and details on which objects were updated following the selections.

    • selectValues() function
      Required

      Selects values in this object with a Qlik engine call that triggers a repaint of the object.

      Parameters
      • qDimNo number
        Required

        Dimension number. 0 is the first dimension.

      • qValues Array< number >
        Required

        Array of values (qElemNumber in the matrix from engine) to select or deselect.

      • qToggleMode boolean
        Required

        If true, values in the field are selected in addition to any previously selected items. If false, values in the field are selected while previously selected items are deselected.

    • setCacheOptions() function
      Required

      Sets caching of page requests.

      When enabled, calls to getData are throttled and new requests are created based on internal cache settings. If you want full control of requests to getData, set enabled = false.

      Parameters
      • opts object
        Required
        Show opts properties
        • enabled boolean
          Required

          Set to true to enable caching.

    • setProperties() function
      Required

      Set properties for this object.

      Parameters
      Returns
      • Promise < empty >
        Required

        A promise of a Qlik engine reply.

ExtensionContext selectValues(qDimNo, qValues, qToggleMode) function

Selects or deselects a value. If not in selection mode, it is initialized and the selection toolbar is displayed.

Parameters

  • qDimNo number
    Required

    Dimension number 0 = first dimension.

  • qValues Array< number >
    Required

    Array of values (qElemNumber in the matrix from engine) to select or deselect.

  • qToggleMode boolean
    Required

    Toggle mode.

selectValues

$element.find('.selectable').on('qv-activate', function() {
	if(this.hasAttribute("data-value")) {
		var value = parseInt(this.getAttribute("data-value"), 10), dim = 0;
			self.selectValues(dim, [value], true);
			$(this).toggleClass("selected");
		}
	});

ExtensionContext paint($element, layout) function

Parameters

Returns

  • Promise < void >
    Required

ExtensionContext updateData(layout) function

Parameters

Returns

  • Promise < void >
    Required

ExtensionFn interface

Parameters

  • libs Array< any >
    Required

Returns

PP namespace

PP Accordion interface

The accordion definition property template can be used to add a custom accordion.

Properties

  • type 'items'
    Required
  • component 'accordion'
    Required
  • items object
    Required
  • label string

    Defines the label that is displayed in the property panel.

PP Button interface

The button definition property template can be used to add a custom property of button type.

Properties

  • label string

    The label that is displayed on the button.

  • component 'button'
    Required

    Defines how the property is visualized in the property panel. Used to override the default component that comes with the type setting.

  • ref string

    Name or ID used to reference a property.

  • type 'string'  |  'integer'  |  'number'  |  'array'  |  'boolean'

    Used for all custom property type definitions. Can be 'string', 'integer', 'number', 'array' or 'boolean'.

  • Defines the action when clicking the button.

    Show action properties

PP Buttongroup interface

The button group definition property template can be used to add a custom property of radio button type.

Properties

  • type 'string'
    Required
  • component 'buttongroup'
    Required

    Defines how the property is visualized in the property panel. Used to override the default component that comes with the type setting.

  • ref string

    Name or ID used to reference a property.

  • options Array< option >  |  optionFn
    Required
  • defaultValue any
    Required

    Defines the default value of your custom property.

  • label string

    Defines the label that is displayed in the property panel.

PP Checkbox interface

The check box definition property template can be used to add a custom property of check box type.

Properties

  • type 'boolean'
    Required
  • component 'checkbox'
    Required
  • ref string

    Name or ID used to reference a property.

  • defaultValue boolean

    Used for defining the default value of your custom property.

  • label string

    Defines the label that is displayed in the property panel.

PP ColorPicker interface

Experimental

The color-picker definition property template can be used to add a custom color-picker property.

Properties

  • type 'integer'
    Required
  • component 'color-picker'
    Required
  • ref string

    Name or ID used to reference a property.

  • defaultValue integer
    Required

    Used for defining the default value of your custom property.

  • label string

    Defines the label that is displayed in the property panel.

PP DefaultAddons interface

Properties

  • uses 'addons'
    Required

DefaultAddons

```js
{
  uses: 'addons',
}

PP DefaultDimensions interface

Properties

  • uses 'dimensions'
    Required
  • min number

    Defines the minimum number of dimensions.

  • max number

    Defines the maximum number of dimensions.

DefaultDimensions

```js
{
  uses: 'dimensions',
  min: 1,
  max: 2
}

PP DefaultMeasures interface

Properties

  • uses 'measures'
    Required
  • min number

    Defines the minimum number of measures.

  • max number

    Defines the maximum number of measures.

DefaultMeasures

```js
{
  uses: 'measures',
  min: 1,
  max: 2
}

PP DefaultSettings interface

Properties

  • uses 'settings'
    Required

DefaultSettings

```js
{
  uses: 'settings',
}

PP DefaultSorting interface

Properties

  • uses 'sorting'
    Required

DefaultSorting

```js
{
  uses: 'sorting',
}

PP Dropdown interface

The drop down list definition property template can be used to add a custom property of drop down list type.

Properties

  • type 'string'
    Required
  • component 'dropwdown'
    Required

    Defines how the property is visualized in the property panel. Used to override the default component that comes with the type setting.

  • ref string

    Name or ID used to reference a property.

  • defaultValue any

    Defines the default value of your custom property.

  • options Array< option >  |  optionFn
    Required
  • label string

    Defines the label that is displayed in the property panel.

PP Integer interface

The integer definition property template can be used to add a custom property of integer type.

Properties

  • type 'integer'
    Required
  • component 'integer'
    Required

    Defines how the property is visualized in the property panel. Used to override the default component that comes with the type setting.

  • min number

    Used for defining the minimum value of the property.

  • max number

    Used for defining the maximum value of the property.

  • defaultValue any
    Required

    Defines the default value of your custom property.

  • label string

    Defines the label that is displayed in the property panel.

  • ref string

    Name or ID used to reference a property.

Integer

```js
{
  type: 'integer',
  label: 'Minimum',
  ref: 'myProperties.min',
  defaultValue: '15',
  min: '10',
  max: '20'
}
```

PP Items interface

Properties

  • component 'items'
  • items object
    Required

The link definition property template can be used to add a custom property of link type.

Properties

  • component 'link'
    Required
  • label string

    Defines the label that is displayed in the property panel.

  • url string
    Required

    Defines the web address used in the link.

  • type 'string'  |  'integer'  |  'number'  |  'array'  |  'boolean'
    Required

    Used for all custom property type definitions. Can be 'string', 'integer', 'number', 'array' or 'boolean'.

PP List interface

Experimental

The list definition property template can be used to add a custom property of list type.

Properties

  • type 'array'
    Required
  • component 'list'
    Required
  • ref string

    Name or ID used to reference a property.

  • items object
    Required
  • itemTitleRef string

    Defines the title of the section items.

  • addTranslation string

    Defines a label of the button used to add new items.

  • allowAdd boolean

    true adds a button for adding new items.

  • allowMove boolean

    true enables the ability to move the item in the properties panel.

  • label string

    Defines the label that is displayed in the property panel.

PP Media interface

Experimental

The media definition property template can be used to add a custom property of media type.

Properties

  • component 'media'
    Required
  • type 'string'
    Required
  • label string

    Defines the label that is displayed in the property panel.

  • layoutRef string
    Required

    Name or Id used to reference the layout.

Media

```js
{
  label:"My media",
  component: "media",
  ref: "myMedia",
  layoutRef: "myMedia",
  type: "string"
}
```

PP Number interface

The number definition property template can be used to add a custom property of number type.

Properties

  • type 'number'
    Required
  • component 'number'
    Required

    Defines how the property is visualized in the property panel. Used to override the default component that comes with the type setting.

  • min number

    Used for defining the minimum value of the property.

  • max number

    Used for defining the maximum value of the property.

  • defaultValue any
    Required

    Defines the default value of your custom property.

  • label string

    Defines the label that is displayed in the property panel.

  • ref string

    Name or ID used to reference a property.

PP Radiobuttons interface

The radio button definition property template can be used to add a custom property of radio button type.

Properties

  • type 'string'
    Required
  • component 'radiobuttons'
    Required

    Defines how the property is visualized in the property panel. Used to override the default component that comes with the type setting.

  • ref string

    Name or ID used to reference a property.

  • options Array< option >  |  optionFn
    Required
  • defaultValue any
    Required

    Defines the default value of your custom property.

  • label string

    Defines the label that is displayed in the property panel.

PP RangeSlider interface

The range-slider definition property template can be used to add a custom property of range-slider type.

Properties

  • type 'array'
    Required
  • component 'slider'
    Required

    Defines how the property is visualized in the property panel. Used to override the default component that comes with the type setting.

  • defaultValue Array< number , number >
    Required

    Defines the default value of your custom property.

  • min number

    Defines the minimum value of the property.

  • max number

    Defines the maximum value of the property.

  • step number

    Defines the step value of the property.

  • label string

    Defines the label that is displayed in the property panel.

  • ref string

    Name or ID used to reference a property.

PP Slider interface

The slider definition property template can be used to add a custom property of range-slider type.

Properties

  • type 'number'
    Required

    This field is mandatory and should always be "number" for a slider property type definition.

    The slider effect is achieved by defining the component field to 'slider'.

  • component 'slider'
    Required

    Defines how the property is visualized in the property panel. Used to override the default component that comes with the type setting.

  • min number

    Defines the minimum value of the property.

  • max number

    Defines the maximum value of the property.

  • step number

    Defines the step value of the property.

  • defaultValue any
    Required

    Defines the default value of your custom property.

  • label string

    Defines the label that is displayed in the property panel.

  • ref string

    Name or ID used to reference a property.

PP String interface

The string definition property template can be used to add a custom property of string type.

Properties

  • type 'string'
    Required
  • component 'string'
    Required
  • expression ''  |  'always'  |  'optional'

    Defines if values starting with = will be treated as expressions that are evaluated by the Qlik Sense Engine.

    • "always": the property will always be evaluated as an expression meaning that the property will be the value of for example "Avg(Sales)".
    • "optional": the property will only be evaluated as an expression if a = sign is leading the expression. For example "Avg(Sales)" will be presented as the string "Avg(Sales)" while "=Avg(Sales)" will be evaluated as an expression and presented as either 5 or "5" depending on if it is used in a Number/Integer component or in a String component.
    • "": If the setting is left empty or not defined at all, the property will not be evaluated as an expression meaning that the property will be the string "Avg(Sales)".
  • show boolean  |  showFn
  • maxLength number

    The maximum number of characters the string can consist of.

  • defaultValue any
    Required

    Defines the default value of your custom property.

  • label string

    Defines the label that is displayed in the property panel.

  • ref string

    Name or ID used to reference a property.

PP Switch interface

The switch definition property template can be used to add a custom property of switch type.

Properties

  • type 'boolean'
    Required
  • component 'switch'
    Required
  • defaultValue boolean
    Required

    Used for defining the default value of your custom property.

  • options Array< option , option >
    Required
  • label string

    Defines the label that is displayed in the property panel.

  • ref string

    Name or ID used to reference a property.

PP Text interface

The text definition property template can be used to add a custom property of text type.

Properties

  • type 'string'  |  'integer'  |  'number'  |  'array'  |  'boolean'

    Used for all custom property type definitions. Can be 'string', 'integer', 'number', 'array' or 'boolean'.

  • component 'text'
    Required
  • label string

    Defines the label that is displayed in the property panel.

PP Textarea interface

The text area definition property template can be used to add a custom property of text area type.

Properties

  • type 'textarea'
    Required
  • component 'textarea'
    Required
  • rows number

    The amount of rows in the text area component.

  • maxLength number

    Defines the maximum number of characters in the text.

  • show boolean  |  showFn
  • defaultValue any
    Required

    Defines the default value of your custom property.

  • label string

    Defines the label that is displayed in the property panel.

  • ref string

    Name or ID used to reference a property.

eachRow interface

Parameters

empty object

successful object

Properties

  • qSuccess boolean
    Required

supportFn interface

Parameters

Returns

  • boolean
    Required

actionFn interface

Parameters

option interface

Properties

  • value any
    Required
  • label string
  • tooltip string

optionFn interface

Returns

option interface

Properties

  • value any
    Required
  • label string
    Required

optionFn interface

Returns

option interface

Properties

  • value string
    Required
  • label string
    Required

optionFn interface

Returns

showFn interface

Returns

  • boolean
    Required

option interface

Properties

  • value boolean
    Required
  • label string
    Required

showFn interface

Returns

  • boolean
    Required