I display multiple charts on a page. How do I export only the charts that are selected(checked) and displayed on screen.
Fiddle:https://jsfiddle.net/v1ncrywb/39/
For eg: out of five charts, If I only select, chart1 and chart2, only those 2 charts need to be exported. Other charts should not be included.
In the below example,
- If I had selected only chartEp0, chartEp1, it still prints chartEp2 along.
function exportCharts() {
console.log("entered func export");
Highcharts.exportCharts([chartEp0, chartEp1, chartEp2]);
}
- Wheras, adding chartEp3, chartEp4 does not allow exporting. Since chartEp3, chartEp4 does not satisfy if condition if (chart4 === "chart44"){}, says "Failed to get SVG" on console.
function exportCharts() {
console.log("entered func export");
Highcharts.exportCharts([chartEp0, chartEp1, chartEp2, chartEp3, chartEp4]);
}
Thank you.