Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to get an activated object id

Hi ,

I have a set of charts and a button.

I need to get the object Id of the activated chart and use it in a macro to maximise the activated chart.

I am trying to run the macro on button click to enlarge the chart.

First i ll try to select a chart ,afer that if i click on the button the selected chart should be maximised.

Please suggest.

Thanks,

Srihari

8 Replies
Not applicable
Author

Hi Srihari,

1. Create a variable and set it with value 1

2. Use the variable in the conditional show of a chart: Variable_name = 1

3 Create a macro to set the value of the variable to 1 or 0
using activedocument.variables("Variable_name").setcontent

4. Use a button action to call the macro.

With kind regards, Rik Speijers

Not applicable
Author

Does this hold good for multiple charts. at anypoint of time I need to enlarge a single chart.

Not applicable
Author

Hi Shihari,

Yes you can use the variable within multiple charts as conditional show or just for one chart.

The only thing is you need to define is wich charts you want to open with a specific button, by using the conditional show in one or more charts.

So you probably and up using multiple buttons, one for each collection of charts or tables.

With kind regards, Rik Speijers

Not applicable
Author

Hi ,

I have attached a sample application.

Can you try to implement the logic you have suggested in this sample app.

Thanks,

Srihari.

suniljain
Master
Master

Srihari,

Pls Go through API Guide. You will get it in different flavours.

There are lots of features covered in API.

Not applicable
Author

Hi Srihari,

I included the modified sample.
If you want to view both charts for alignment or so you need to set the value of both variables to 1.

With kind regards,

Rik Speijers

Not applicable
Author

Hi Srihari,

If the example was the solution to your question, please set the reply to "sugested answer" and change the status of the question to solved.

With Kind Regards,

Rik Speijers

Not applicable
Author

Hi Rik,

Thanks for the reply.

Srihari