Last active
October 23, 2018 07:20
-
-
Save julianschmuckli/10d1358c3267e3d50f1b43c58851a187 to your computer and use it in GitHub Desktop.
This is a code snippet for the following QlikSense Discussion: https://community.qlik.com/thread/317568
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//The props get loaded via "define" | |
return { | |
initialProperties: { | |
qHyperCubeDef: { | |
qDimensions: [], | |
qMeasures: [], | |
qVariables: [], | |
qInitialDataFetch: [{ | |
qWidth: 10, | |
qHeight: 50 | |
}] | |
}, | |
qVariableListDef: { | |
qType: "variable", | |
qShowReserved: true, | |
qShowConfig: true | |
}, | |
listItems: [] | |
}, | |
definition: props, | |
support: { | |
snapshot: true, | |
export: true, | |
exportData: true | |
}, | |
paint: function ($element, layout) { | |
//My visualisation code | |
return qlik.Promise.resolve(); | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var appearanceSection = { | |
uses: "settings", | |
items: { | |
colors: colors, | |
images: images, | |
MyList: { | |
type: "array", | |
ref: "listItems", | |
label: "List Items", | |
itemTitleRef: "label", | |
allowAdd: true, | |
allowRemove: true, | |
addTranslation: "Add Item", | |
items: { | |
button: { | |
label: "Click me", | |
component: "button", | |
action: function (data) { | |
alert("click!"); | |
} | |
}, | |
label: { | |
type: "string", | |
ref: "label", | |
label: "Label", | |
expression: "optional" | |
}, | |
textarea: { | |
label: "My textarea", | |
component: "textarea", | |
maxlength: 100,//you shouldn't write too much | |
ref: "myTextarea" | |
} | |
} | |
} | |
} | |
}; | |
// ***************************************************************************** | |
// Main properties panel definition | |
// Only what is defined here is returned from properties.js | |
// ***************************************************************************** | |
return { | |
type: "items", | |
component: "accordion", | |
items: { | |
dimensions: dimensions, | |
measures: measures, | |
sorting: sorting, | |
appearance: appearanceSection | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment