Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Right now, in all of my extensions (and all of the extensions that I can find from other people), the labels for my expressions are just the expression itself. Is there a way to have the user define a label for the expression? I know I would need to put some type of input box in the .qvpp file, but I'm not quite sure how to go about doing this. Any help would be greatly appreciated. Thanks!
The easiest way would be to use Text properties for labels.
Erik
I'm sorry Erik, I'm not quite sure what you mean, and maybe I'm not explaining myself properly.
Currently, what I am able to do in my script.js is to use this.Data.HeaderRows[0]
Yes, I do understand what you mean. The easiest way to let your users enter a label would be to add a Text tag to your definition.xml:
<Text Label="Label:" Initial=""/>
In your javascript you can then find the label at this.Layout.Text0.text (if it is your fist Text tag).
Erik
Thank you, Erik. Your posts are always very helpful.
However, you mentioned that this is the easiest way to do it. Is there another way (although possibly harder) that would allow labels for a dynamic number of expressions?
I'm also interested in being able to create a dynamic number of labels for expressions as well ! Anyone have any ideas ?
Thanks )
Is there a way to have dynamic legends/labels for expression on the chart?
Suppose, per tutorial, we have quantity and revenue as a cyclic group in two expression. When I change the expression, I would like to see Quantity as the label or legend in the chart, and ditto for Revenue, so I know whether I am looking at Quantity or Revenue. But the chart only shows the chart title set in the general tab, for example, Quantity, and it does not vary dynamically, and this is not correct.
I have asked this question before and have not obtained an answer. I have been playing with this and don't know how to get around this.
Seems like a flaw.
Is there a way to have dynamic legends/labels for expression on the chart?
Suppose, per tutorial, we have quantity and revenue as a cyclic group in two expression. When I change the expression, I would like to see Quantity as the label or legend in the chart, and ditto for Revenue, so I know whether I am looking at Quantity or Revenue. But the chart only shows the chart title set in the general tab, for example, Quantity, and it does not vary dynamically, and this is not correct.
I have asked this question before and have not obtained an answer. I have been playing with this and don't know how to get around this.
Seems like a flaw.
Hi Nicole,
I am also looking for the same solution for the problem being discussed in this thread. Were you able to figure out a way for adding the dynamic labels for extension objects ?
Thanks,
Puneet.
Hi Puneet
I interpret Erik’s answer that a Dynamic label is something that you can handle yourself, by using a Text tag. Then just use this text instead of the name of the expression.
Ideally, you would like to have this dynamic, so that the number of label input fields is the same as the number of expressions, but this may be complicated to solve (maybe use Document Extensions?). An easier path is to have one input field that takes all labels (comma separated). Not so nice, but a possible way forward.
Have a look at Stefan Walthers excellent example to see how he solved the labeling (although not dynamic number of expressions):
http://www.qlikblog.at/2574/qlikview-extension-animated-scatter-chart/
Br Patrik