Working with properties
The property panel of a visualization will render itself using a property definition. This definition describes what the property panel should look like and how it is connected to the data.
Some parts of the properties are reusable but you can also define your own properties for your visualization.
Reusable properties
The following accordion items on the property panel can be reused when creating a property panel for your visualization:
- Dimensions
- Measures
- Sorting
- Add-ons
- Appearance
Examples
This is the most basic example of a properties JavaScript file containing all reusable property panel accordion items.
define( [], function ( ) {
return {
type: "items",
component: "accordion",
items: {
dimensions: {
uses: "dimensions"
},
measures: {
uses: "measures"
},
sorting: {
uses: "sorting"
},
addons: {
uses: "addons"
},
settings: {
uses: "settings"
}
}
};
});
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.