Dynamically Change RS ChartType
- federicolevis
- May 22, 2015
- 1 min read
ABSTRACT (by Federico Levis ) Category: RS
RS Tip: Dynamically change Chart Type. E.g. :
Bar Chart
Line Chart
Pie Chart
1. Goal
Select Chart Type with a Prompt, to allow to the user selecting different Chart Type:

Same QueryResult displayed with Bar Chart and Pie Chart

Chart Type Prompt
2. RS Implementation Steps
Add a Value prompt with parameter=ChartType and following Static Choice to select the possible BarChart Size:

Add 3 Boolean Variable bBarChart, bLineChart, bPieChart, each one True depending on the relative ChartType ParamValue. For exampe for bChartType:

In your Report Insert the 3 Charts (Bar, Line, Pie), each one in a Block with Style Variable = ChartBooleanVar defined in previous Step; then with Conditional Explorer Set BoxType=none for the "No" Value. For example the BarChart is following Block:

That's All: depending on the ChartType selected only the relative Block will be displayed
Commentaires