Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
My query:
usually we can change our chart setting in its property.
eg. I can add values on data points in the chart-property-expressions
I wonder whether it is possible to add such a button
when I press it, the values show on the data.
when I press it again, the values disappear.
You can use a variable to change the text color of the values, effectively hiding or showing them. See attached example.
Dear,
kindly find the attachment .
i hope it will help you.
Thanks,
Mukram.
You can use a variable to change the text color of the values, effectively hiding or showing them. See attached example.
Hi,
The way I usually do is that I actually create 2 charts and a list box.
Say you want to view the values on data point:
Show_Values:
LOAD * INLINE [
ShowVal
Show values
]
;
If you're using Qlikview 11, no need to have 2 charts. Just us the conditional expressions.
That would work
dear,
did you attach it?
Thanks!
it works and really thought-provoking
Hi Gysbert,
I downloaded your examplea and tried to understand how you achieved it. Can you explain a bit about how did the trigger on button connected with the chart. ? and also what does "=(not vShowValues)*-255" mean ?
Thanks
Angad
The button has an action assigned to it to change the value of the vShowValues variable. The chart uses the value of the variable for the text color of the values. So if the button changes the value it's immediatly changed in the chart too. There's no document or sheet trigger involved.
The expression for the text color is black($(vShowValues)). The variable vShowValues is used for the alpha parameter of the black() color function. It determines how solid the color is. black(0) is totally transparant, black(255) is solid black.
The formula =(not vShowValues)*-255 flips the value of the variable between 0 and 255. It treats vShowValues as a boolean. If it has the value 0 then not vShowValues returns -1, if it has a value other than 0 it returns 0. By multiplying the result of not vShowValues (0 or -1) with -255 I get either 0 or 255.
Thanks Gysbert. That really made sense and thank you once again for the detailed explanation.
hi gysbert,
thanks for the tip, but how do you create the variable?
i'm trying to make a button that changes currency in a table, but i cant form the variable to control the currency presented.
thanks again
Avner