Reputation: 1316
Tired out the following configurations but they dont seem to work.
import * as Highcharts from 'highcharts/highstock';
/*import * as HighchartsExporting from 'highcharts/modules/exporting';
HighchartsExporting(Highcharts);*/
require('highcharts/modules/offline-exporting')(Highcharts);
get the following error: Cannot invoke an expression whose type lacks a call signature. Type '{}' has no compatible call signatures.
anyone knows how to get this working.
Upvotes: 5
Views: 4406
Reputation: 49
offline export highcharts:
import * as Highcharts from 'highcharts';
import exporting from 'highcharts/modules/exporting';
import offline from 'highcharts/modules/offline-exporting';
exporting(Highcharts);
offline(Highcharts);
Upvotes: 4
Reputation: 1316
here is a solution
import * as Highcharts from 'highcharts/highstock';
import * as HighchartsExporting from 'highcharts/modules/exporting';
HighchartsExporting(Highcharts);
this is good enough to work, a separate require command is not required.
Upvotes: 3
Reputation: 2076
import Highcharts from 'highcharts';
import exporting from 'highcharts/modules/exporting';
exporting(Highcharts);
The above code worked for me.
To export, use chartName.exportChart()
.
Upvotes: 1