highcharts / highcharts/highcharts-angular

Export data methods not found on chart reference

Open
#430 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
444
Forks
121
PR merge metrics
No merged PRs in 30d

Description

Is it possible to call the exporting methods (ie: toCSV()) from the chart reference? I'm capturing the instance using the callback method on the highchartsChart directive, however there is no toCSV() method available. I'm importing the export libraries and can perform the export via the chart hamburger menu, but not from code.

Relevant code is as follows:

```

chartInstance(chart: Highcharts.Chart) {
console.log(chart.toCSV());
}

provideHighcharts({
modules: () => {
return [
import('highcharts/esm/modules/exporting'),
import('highcharts/esm/modules/export-data'),
import('highcharts/esm/modules/map'),
]
}
})
```
Using:

```
"@angular/core": "^20.3.0",
"highcharts": "^12.4.0",
"highcharts-angular": "5.1.0",
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.