Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
MalcolmCICWF
Creator III
Creator III

Condition Show Text Box if Chart Active

I have some text boxes to overlay on a line chart, but they are only relevant to that chart. Is there a conditional show expression to make a text box only show it a specific chart is active or maximized?

1 Solution

Accepted Solutions
chematos
Specialist II
Specialist II

Set a variable vShowHide = -1

Create a text object and create an action in the properties of the text object. There you will find an action called Set variable, so you can use the variable to switch the value from -1 to 1 every time you click on the object:

define the value as =$(vShowHide)*-1

Then, for each object you want to show/hide, go to the Layout menu in the properties and set the Conditional as vShowHide=1

You may need to play with more variables if you add more charts to the same tab, so just explore this option, I think it will be useful

View solution in original post

11 Replies
chematos
Specialist II
Specialist II

If you create in some way an action to activate or maximize the chart (a button for example), then you can set a variable in this same action and use the variable as a condition to show/hide the text box and the chart as well if needed.

Hope this helps

vishsaggi
Champion III
Champion III

Can you give an example and a snapshot. I believe you cannot capture Char minimized and maximized without using a Macro. Read here: Is this object minimized???? | Qlik Community

If you can give us little more information on what you are trying to achieve, may be we can have a solution.

MalcolmCICWF
Creator III
Creator III
Author

The "Collections Timeline" on the left is what lines up to the text boxes at the bottom. I only want them visible if that chart is active.

Capture.PNG

chematos
Specialist II
Specialist II

Instead of using the minimized object on the left, you can use Text Objects or Buttons with the title of the chart and add actions when you click on the button. In the action you can set a value to a variable and use it to show/hide the chart and the text objects as I mentioned in my previous answer.

Regards

MalcolmCICWF
Creator III
Creator III
Author

Ok, I think I understand what you are saying. I have used something similar to hide/show expressions and such, but not sure I have done this for an object, much less multiple. Can you point me in the direction of the syntax or command to show/hide a chart/text box?

chematos
Specialist II
Specialist II

Set a variable vShowHide = -1

Create a text object and create an action in the properties of the text object. There you will find an action called Set variable, so you can use the variable to switch the value from -1 to 1 every time you click on the object:

define the value as =$(vShowHide)*-1

Then, for each object you want to show/hide, go to the Layout menu in the properties and set the Conditional as vShowHide=1

You may need to play with more variables if you add more charts to the same tab, so just explore this option, I think it will be useful

vadim_grab
Creator
Creator

Jose, hello

Missed understand - "define the value as =$(vShowHide)*-1"... There at the Object СH81 (Chart) i have to define this value?


Chart Properties [АКБ-TO] - 2 linked objects 2018-05-11 11.28.01.png


My example:

QlikView x64 Personal Edition - [D__Cloud Data Storage_OneDrive_QlikView Development_TA.qvw_] 2018-05-11 11.19.54.png

and show this object (inbox)

QlikView x64 Personal Edition - [D__Cloud Data Storage_OneDrive_QlikView Development_TA.qvw_] 2018-05-11 11.27.13.png

inbox Conditional

Input Box Properties [] 2018-05-11 11.18.09.png

Set variable vShowHide

Variable Overview 2018-05-11 11.18.58.png

Many thanks for your answer!

chematos
Specialist II
Specialist II

Let's see.

You defined the initial state of the variable as -1

And your show condition is vShowHide=1


What I see is that you have a container, but as far as I know, you cannot add a trigger when you change from one chart to the other. So, in my example, instead of having a container, I would use buttons or text objects to show/hide the charts. In a button or a text object you can add Actions, and one of them is Set Variable, there you would use the =$(vShowHide)*-1 to change the variable value when you click on the button/text object.


Hope this helps, regards.

Jose

vadim_grab
Creator
Creator

Thanks Jose!

With button or text  don't have a problem.

My task - do it  use container. May be you have more idea how i can do it?