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