Using Angular 8.2.4, angular-highcharts 8.0.3 and highcharts 7.2.0.
I've followed the Client side export section of the docs as well as their jsFiddle to include an offline export feature in my app; everything works fine until I export the chart.
After that the site just breaks, navigation stops working and the console floods with errors, I have to refresh the page for it to work again. I'm almost certain this is more an angular/highcharts compatibility than highcharts issue but then again, I'm pretty new to both so.
Module import as per the github repo
//shared.module.ts
import { ChartModule, HIGHCHARTS_MODULES } from "angular-highcharts";
import * as more from "highcharts/highcharts-more.src";
import * as HighchartsExporting from "highcharts/modules/exporting";
import * as HighchartsExportingOffline from "highcharts/modules/offline-exporting";
@NgModule({
imports: [ChartModule],
exports: [ChartModule],
providers: [
{ provide: HIGHCHARTS_MODULES, useFactory: () => [more, HighchartsExporting, HighchartsExportingOffline] }
]
})
export class SharedModule {}
Chart
//chart.component.ts
chart = new Chart({
chart: {
type: "line",
zoomType: "x"
},
xAxis: {
type: "datetime",
dateTimeLabelFormats: {
minute: "%I:%M %p"
}
},
yAxis: {
title: {
text: "Title"
}
},
credits: {
enabled: false
},
tooltip: {
positioner: function() {
return { x: 0, y: 0 };
},
shadow: false,
borderWidth: 0,
backgroundColor: "rgba(255,255,255,0.8)"
},
navigation: {
buttonOptions: {
enabled: true
}
},
exporting: {
fallbackToExportServer: false
}
});
Template
chart.component.html
<div [chart]="chart"></div>
This is a sample of the errors I'm getting by simply trying to navigate back to home (or wherever) after exporting once.
Insights appreciated.