Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone.
I'm trying to extend the workbench table template. I'm attempting to add a user modifiable cColWidth property for every dimension.
I have been able to add the cColWidth property to qDimensions in qHyperCubDef, and I can add the property to the dimension properties panel, but I'm not sure how to formulate the reference syntax, i.e. ref = "...".
Any help appreciated.
You don't need it on the HyperCube.
Instead just define it in your definition and it will be available on the layout.
For example this item in a definition,
positive: {
ref: "waterfall.positivecolor",
label: "Positive",
type: "string",
expression: "optional",
defaultValue: "rgb(68,119,170)"
}
would be available on layout.waterfall.positivecolor in your paint function or on $scope if you are doing an angular extension.
It's generally a good idea to prefix your custom properties with something, in this case waterfall, to avoid clashing with any properties we might add in the future.
Oh just to answer your question also
When you are messing with the standard dialog there is most likely a top-level reference.
The references are cascading so for example the dimension panel already has a ref value of qHyperCube.qDimensions
so any child of that component does not need to reference the full path.
So the Limitation component would have a ref of qOtherTotalSpec.qOtherMode and since its parent has a ref of qHyperCube.qDimensions we will just figure that out for you and build the entire chain.
The problem I'm facing is that the number of dimensions are dynamic, and I don't know how to access the n-th property.
Ideally I'd like to use: qHyperCube.qDimensions
Alternatively, if I don't leverage off the Hypercube's dimensions, how do I build a property panel with a dynamic number of properties.
For example, if I have only 2 dimensions, I would like to see only 2 sliders for ColWidth.
If I have 4 dimensions, I would like to see 4 sliders.
etc.
Old, but I have the same question. Bump.
Hi,
Ref should be something like 'qDef.whatever'. The actual (evaluated) value will then be available in the qDimensionInfo array.
Hope this helps
Erik Wetterberg
Thanks Erik,
I also found the answer here: Qliksense custom measure property for extension with expression value
colorExpression:{
type: "string",
label: "Enter color expression",
ref:"qHyperCubeDef.qDimensions.0.qAttributeExpressions.0.qExpression",
expression:"optional"
}
how do I call this ref: qHyperCubeDef.qDimensions.0.qAttributeExpressions.0.qExpression", in function