I. Overview
You can control which series are not displayed through js.
II. Example
You can get the chart object through FR.Chart.WebUtils.getChart("chartID").getChartWithIndex(chartIndex).setSeriesVisible() and control whether to display this object.
Note: This is not supported in the report block chart in dashboards.
2.1 Report design
Add a column chart to the report, and add another tab of line chart. Bind data and set chart styles for these two tabs. (You can refer to the attached template.)
And drag the corresponding buttons to the bottom.
2.2 Add buttons and click events
Add the following click events for the first button, this is to set series 1&2 of the column chart to be invisible:
var vanchart=FR.Chart.WebUtils.getChart("chart0").getChartWithIndex(0);//get first chart(Column Chart) from "chart0" component
vanchart.setSeriesVisible([0,1]);//Set series 1&2 invisible
Add the following click events for the second button, this is to set series 3&4 of the line chart to be invisible:
var vanchart=FR.Chart.WebUtils.getChart("chart0").getChartWithIndex(1);
//get second chart(Column Chart) from "chart0" component
vanchart.setSeriesVisible([2,3]);////Set series 3&4 invisible
2.3 Preview effect
Click preview, and you will see the effect as shown at the beginning.