ADL
ADL

Reputation: 2856

Highcharts Export to CSV No Data Grouping

https://github.com/highslide-software/export-csv

Using this plugin, is there any way to export the data from highcharts prior to it data grouping my data?

Data grouping or Data Approximation.

If I bring a lot of data back from the database, it is data grouping my dates so that there is a datapoint every couple hours, however when I download the data, i want it to download all of the data.

Is this possible?

Thank you!

Upvotes: 0

Views: 363

Answers (2)

Paweł Fus
Paweł Fus

Reputation: 45079

When you take a look into to source code at line #38 you will see each() for series.points which are actually rendered points. Try to use series.options.data to export all points from series.

Upvotes: 1

ADL
ADL

Reputation: 2856

    // Loop the series and index values
    i = 0;
    each(this.series, function (series) {
        if (series.options.includeInCSVExport !== false) {
            names.push(series.name);


            each(series.options.data, function (point) {   //each(series.points, function (point) {
                if (!rows[point[0]]) {
                    rows[point[0]] = [];
                }
                rows[point[0]].x = point[0];

                rows[point[0]][i] = point[1];
            });
            i += 1;
        }
    })

This is what I changed that loop to, based on Pawels Answer.

Upvotes: 0

Related Questions