Qlik Community

Qlik Education Discussions

Discussion Board for collaboration related to Qlik Education.

Not applicable

Text in chart - getting it to disappear when clicking chart

Hi all,

I have put text in a bar chart at the end of the bars (its horizontal), but the problem is when I click on a bar, all the stays in place and ruins the look of the chart. I am just wondering if there is a way to get rid of the text in chart when I click on a bar, but bring it back when I clear my selections?

1 Solution

Accepted Solutions
datanibbler
Esteemed Contributor

Re: Text in chart - getting it to disappear when clicking chart

Hi,

sure. Your chart follows some dimension surely. That is a field you can refer to. So in the edit_field for your text, just insert an IF_construct with the GetselectedCount() function to identify whether that field has been selected on - which is the case when the bar has been clicked on.

=> Sth like >> IF(Getselectedcount([dimension_field]) >= 1,' ', '[text]') <<

=> That way, when one of the bar in your chart has been clicked, that text would be empty. (don't forget to put a transparent background to your text)

HTH

Best regards,

DataNibbler

1 Reply
datanibbler
Esteemed Contributor

Re: Text in chart - getting it to disappear when clicking chart

Hi,

sure. Your chart follows some dimension surely. That is a field you can refer to. So in the edit_field for your text, just insert an IF_construct with the GetselectedCount() function to identify whether that field has been selected on - which is the case when the bar has been clicked on.

=> Sth like >> IF(Getselectedcount([dimension_field]) >= 1,' ', '[text]') <<

=> That way, when one of the bar in your chart has been clicked, that text would be empty. (don't forget to put a transparent background to your text)

HTH

Best regards,

DataNibbler

Community Browser