We are currently on HighCharts 4.2.2
http://api.highcharts.com/highcharts/exporting
So while reading their exporting docs, I decided instead of using their default menu dropdown. I just needed access to the .exportChart()
function.
So what I do is once the chart is done rendering data, I store the chart object into a Factory.
When I click on a button in another component (chartHeaderComponent) to actually download the screenshot I simple retrieve the stored chart object and call exportChart
on it.
HighChartsComponent
return priceLine
.then(alertSeries)
.then(tagLine)
.then(renderChart(chart))
.then((chart) => {
ChartExport.setScreenshot(chart);
this.chartLoading = false;
return chart;
});
ChartHeaderComponent
this.screenshotChart = () => ChartExport.getScreenshot().exportChart();
This will download the chart for me, however the Navigator data is missing :(
First screenshot is what I see in our app:
2nd screenshot is what I see after downloading the screenshot.
I could post details about the chart object here, but it's huge so if anyone can tell me a specific key they need to see I can post it here.
Any help or tips are highly appreciated! :D
Or at least thoughts on how to hide the Navigator from the Screenshot feature.