Skip to main content Skip to complementary content

Defining custom properties

You can define your own properties for your visualization. Qlik Sense automatically adds them to the property panel and takes care of persistence. You then find the selected values in the layout parameter.

For every property, you define a JavaScript object with different fields depending on what custom property type you are defining.

Field Description
type

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

This field is mandatory for all custom property type definitions.

label Used for defining the label that is displayed in the property panel.
ref Name or Id used to reference a property.
defaultValue Used for defining the default value of your custom property.
component Used for defining how the property is visualized in the property panel. Used to override the default component that comes with the type setting. Can be either dropdown, radiobuttons, switch or slider.
min Used for defining the minimum value of the property.
max Used for defining the maximum value of the property.
step Used for defining the step value of the property.
expression

Used for defining if values starting with = will be treated as expressions which are evaluated by the Qlik Sense Engine. Can be either "always", "optional" or "" (empty).

  • "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)".
options Array of options to use for dropdown, radiobuttons or switch.
show Function returning true if property should be displayed.
maxlength The maximum number of characters the string can consist of.
Information noteCustomization of properties always start with items:.

Custom property type definitions

The following property type definitions can be used:

  • String definitions

  • Integer definitions

  • Number definitions

  • Check box definitions

  • Drop down definitions

  • Radio button definitions

  • Switch definitions

  • Slider definitions

  • Range slider definitions

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!