Skip to content

Export data methods not found on chart reference #430

Description

@mtinnes

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:

<div highchartsChart
     [options]="chartOptions"
     (chartInstance)="chartInstance($event)"></div>

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",

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions