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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
MauriceLudo
Creator II
Creator II

change chart type

Hello,
I would like to please whether we can change the chart type from an external button.
thank you.
Thanks,
Maurice

3 Replies
marcus_sommer

This would be only with the use of macros possible which aren't recommended within the gui. An alternative could be to create several different charts and toggle with a button per variable their visibility (option within the tab layout).

- Marcus

Not applicable

In addition to Marcus Sommer;

Example: create a button (text: bar chart). Add an action to it: Actions > External > Set variable

Variable name for example 'vChart_Type', with value: Bar_Chart

Now in your bar chart go to the layout tab > Show - Conditional > vChart_Type='Bar_Chart'

This should do the trick; your chart is only visible when the variable vChart_Type is equal to 'Bar_Chart'

You can now create a second button with the same action, but with another value. E.g. Line_Chart

Now in your line chart go to the layout tab > Show - Conditional > vChart_Type='Line_Chart'

This should do the trick; your chart is only visible when the variable vChart_Type is equal to 'Line_Chart'

There are some more options you can use, for example a 'switch button' which evaluates the value of the variable first before changing it. This is done with an IF-function; plenty of examples here on the forum.

el_aprendiz111
Specialist
Specialist

Hi,

chartt.gif