export-csv
export-csv copied to clipboard
DateFormat chart option can be a variable or function
for globalization support chart.exporting.csv.dateFormat should be either a variable or a function, therefore, custom dateFormat may be provided for parsing dates using function.
In this regard following code changes are requested.
if (series.xAxis.isDatetimeAxis) {
xData = Highcharts.map(xData, function (x) {
if (typeof dateFormat == 'function') {
return dateFormat(x);
} else {
return Highcharts.dateFormat(dateFormat, x)
}
});
xTitle = 'DateTime';
}