There are 2 ways you can create dynamic charts in QlikView. One way is to use 'Fast Change Type' in the General tab of the chart properties.
The other way that we will cover next is to setup dynamic dimensions and expressions in the loadscript. This can be a very useful technique to implement to save on space on your sheet and allow users to select which type of chart they wish to view especially when there are many potential charts different users require.
Using the same loadscript for the data as in the line chart example which is:
This table will be used to change the dimensions, expression of the chart.
3. Create a new bar chart and make the following changes:
Check the 'Show title in Char' option and set the text to:
Select the Chart Type of Bar chart.
Add the 2 calculated dimensions to use the dimension1 and dimension2 fields in the inline table setup in the loadscript:
Expressions -Add the following expression:
Caption - Uncheck the option 'Show Caption'.
Click OK to display the chart.
Right click on the sheet and in the Fields tab add the field 'Graph Name' to the fields to be displayed in listboxes. Select an option in the Graph Name listbox, it will change the dimensions and expressions in the chart as you can see from the following 2 screenshots: