Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to create a custom property fro each measure in the extension.
I have created a switch which appears in the accordion for each measure and I can set them separately
I am now trying to read there values in the .qHyperCube object. Should I see this as a property of each measure and if so why do I not see it?
My code is below
measures : {
uses : "measures",
min : 0,
items: {
MySwitchProp: {
type: "boolean",
component: "switch",
label: "Colour using Heatmap",
ref: "MySwitchProp",
options: [{
value: true,
label: "On"
}, {
value: false,
label: "Off"
}],
defaultValue: false
}
}
you find a solution?
here is your mistake use qDef or qAttributeExpressions.0.qExpression
measures: {
uses: "measures",
min: 1,
max: 2,
items: {
// instead of " MySwitchProp " use " qDef.MySwitchProp "
MySwitchProp: {
type: "boolean",
component: "switch",
label: "Colour using Heatmap",
ref: "qDef.MySwitchProp",
options: [{ value: true, label: "On" }, { value: false, label: "Off" }],
defaultValue: false
}
// end
}
}