Skip to content
This repository has been archived by the owner on May 29, 2018. It is now read-only.

export-csv.js - error with column, line and pie graph - Cannot read property '0' of undefined #63

Open
maboalim opened this issue Aug 26, 2015 · 0 comments

Comments

@maboalim
Copy link

When I used export-csv.js to export csv or excel file for highChart graph "column, line and pie graph", I was getting javascript error in "Transform the rows to CSV" part in this line "Highcharts.pick(xAxis.names[row.x], xAxis.categories[row.x], row.x)".
This error happened because I do not have xAxis names in my case (xAxis.names was undefined).

I Fixed in locally by adding the below if condition.

                if ( xAxis.names === undefined || xAxis.names === null) {
                    category = Highcharts.pick(xAxis.categories[row.x], row.x)
                } else {
                    category = Highcharts.pick(xAxis.names[row.x], xAxis.categories[row.x], row.x)
                }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant