Closed leongaban closed 7 years ago
Not a bug, needed to set the dateFormat
on a new csv
key for exporting
exporting.csv.dateFormat Which date format to use for exported dates on a datetime X axis. See Highcharts.dateFormat.
exporting: {
allowHTML: true,
enabled: false,
sourceWidth: 640,
sourceHeight: 400,
csv: {
dateFormat: '%Y-%m-%d'
},
chartOptions: {
title: {
text: null
}
}
},
Here is a function that explicitly changes the dateFormat on the chart object before it gets the
downloadCSV
method called on it.Next in the first screenshot, you can see that
this.options.exporting
has the newdateFormat
I added.However by line
48
options.dateFormat is still undefined so then it always defaults to'%Y-%m-%d %H:%M:%S'
Love the plugin btw! Just working out the final kinks in formatting the CSV.