highcharts-export-csv v1.4.8
export-csv
This plugin allows the user to export the chart data to various formats and views.
The contents of the plugin is located in the JavaScript file "export-csv.js". This plugin is published under the MIT license, and the license document is included in the repository.
Deprecation notice
Given the popularity of this plugin, it has been taken in as a Highcharts module since v5.0.11 (2017-05-04), and development will continue in the official Highcharts repo. This means it can be loaded from https://code.highcharts.com/modules/export-data.js and is available with the https://www.npmjs.com/package/highcharts(Highcharts npm package). Issues should now be reported in the Highcharts repo.
Demos
Options
exporting.csv.columnHeaderFormatterFormatter callback for the column headers. Parameters areitem(the series or axis object),key(the point key, for exampleyorz), andkeyLength. By default it returns the series name, followed by the key if there is more than one key. For the axis it returns the axis title or "Category" or "DateTime" by default.exporting.csv.dateFormatWhich date format to use for exported dates on a datetime X axis. See Highcharts.dateFormat.exporting.csv.itemDelimiterThe item delimiter, defaults to,. Use;for direct import to Excel.exporting.csv.lineDelimiterThe line delimiter, defaults to\\n.series.includeInCSVExportSet this to false to prevent an individual series from being exported. To prevent the navigator in a stock chart, setnavigator.series.includeInCSVExportto false.
Methods
Chart.getCSV()Returns the current chart data as a CSV stringChart.getTable()Returns the current chart data as a HTML table string, ready to be inserted into the DOM usinginnerHTML.Chart.getDataRows()Returns the current chart data as a two dimensional array.Chart.viewData()Inserts a data table below the chart container.