Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
rjn
Employee
Employee

How to dispaly/hide a chart based on selection of another chart in a container

Dear Team,

Is there any way to hide or display a straight table chart based on the selection of a another chart present in the container (the container has 6 chart objects). The chart outside the container should be displayed only when Chart 3 is selected in the container. Please help

Regards,

J. Ravichandra Kumar

10 Replies
tresesco
MVP
MVP

No such inbuilt feature so far to get active chart in container, however, you could try with macro - something like:

Set ContainerObj= ActiveDocument.GetSheetObject("CT01")

Set ContProp=ContainerObj.GetProperties     

vActiveIndex="CT01-" & ContProp.SingleObjectActiveIndex

ActiveDocument.Variables("vActiveIndex").SetContent vActiveIndex, true

been discussed here:

Active Container Object

Get Active object in a Container

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

Hi Ravi Chandra,

Can you share one sample file and expected output.

Can explain it little more ?

rjn
Employee
Employee
Author

!Hi Nagarjuna,

Please find the attached test.qvw file, the container has two charts (Test1 and Test2) and a separate chart (Legend). On selection of chart 'Test1', the Legend chart should show up otherwise the Legend chart should be hidden.

Please let me know if it makes sense.

Regards,

J. Ravichandra Kumar

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

Means If u click on Test 1 it shd show up Test 1 Legend , if u select Test 2 do dont wont to see Test 2 Legend  .Is that correct ?

rjn
Employee
Employee
Author

Yes, you are correct. when I select test 2 chart the Legend chart should be hidden.

Regards,

J. Ravichandra Kumar

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

Like this U want?

Check and Let me know.

rjn
Employee
Employee
Author

Hi Nagarjuna,

The Legend Chart is always showing up. its not getting hidden.

Regards,

J. Ravichandra Kumar

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

PFAContainer.PNG

rjn
Employee
Employee
Author

Hi Nagarjuna,

Sorry to say this, the above attachment is still not working.

Regards,

J. Ravichandra Kumar