Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
vcanale
Partner - Creator II
Partner - Creator II

Values On/Off for Chart

Hi All,

I have a chart with an available option to switch ON and OFF the Values on Data Points

To do it I have 2 expressions in the Chart Properties (Same expression but the second with a condition to activate the Values on Data Points)

img1.png

1st expression for the Values OFF (Visible, Symbol and Line Off, Values on Data Points Deactivated)


img2.png

2nd expression for the Values ON (Invisible, Symbol and Line Off, Values on Data Points Activated)

img3.png

When the Values are set on ON everything looks good, but when on OFF I have the “– “appearing on the chart instead of nothing:

img4.png

Note: there is a condition to return  “Data 1” only for specific selections.

If I add any “else” to the condition, eg: IF(Values='On',   $(vExpressionChart), ' ')

The null symbol on the chart disappear and the Line for Data 1 only is fine (and this is what I want!), but the legend lists all the Data instead of Only Data 1.

img5.png

Any idea on how can I fix this?

1 Solution

Accepted Solutions
stigchel
Partner - Master
Partner - Master

9 Replies
Clever_Anjos
Employee
Employee

Which version do you use?

Why don´t you just disable the expression using "Conditional"?

Clever_Anjos
Employee
Employee

Capturar.PNG

vcanale
Partner - Creator II
Partner - Creator II
Author

I'm using QV10 and unfortunately the "Conditional" option is not available in QV10.

Thanks for your help

Clever_Anjos
Employee
Employee

Is an upgrade out of question?

stigchel
Partner - Master
Partner - Master

Instead of using the condition in the expression, use it for the text color attribute(Click on the plus sign before the expression to expand) of the expression and use

=If(Values='On',rgb(0,0,0),argb(0,0,0,0))

and use the the normal expression for calculating the values, they will become invisible when the show values option is set to off.

One thing I noticed testing this was that in my version the text color attribute did not function when the display line property for this expression was not on. If so turn the line property on, it wont be visible because you set that property to off anyway

stigchel
Partner - Master
Partner - Master

And a screenshot

ToggleValues.png

vcanale
Partner - Creator II
Partner - Creator II
Author

yes for the moment! ..thx!

vcanale
Partner - Creator II
Partner - Creator II
Author

Hi Piet,
It works perfectly!..
Great solution.. and using one expression only! (Invisible option unchecked)
Thanks a lot for your help!

stigchel
Partner - Master
Partner - Master

You're welcome, glad to be of help