Skip to content

Commit

Permalink
Added export.csv.numberFormatter
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrote committed Jun 19, 2024
1 parent ba04a8d commit be2d207
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/modules/Exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,8 @@ class Exports {
)

for (let ci = 0; ci < w.globals.series.length; ci++) {
if (dataFormat.isFormatXY()) {
columns.push(series[ci].data[i]?.y)
} else {
columns.push(gSeries[ci][i])
}
const value = dataFormat.isFormatXY() ? series[ci].data[i]?.y : gSeries[ci][i];
columns.push(Utils.isNumber(value) ? w.config.chart.toolbar.export.csv.numberFormatter(value) : value)
}
}

Expand Down
1 change: 1 addition & 0 deletions types/apexcharts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ type ApexChart = {
headerCategory?: string
headerValue?: string
dateFormatter?(timestamp?: number): any
numberFormatter?(value?: number): any
},
svg?: {
filename?: undefined | string
Expand Down

0 comments on commit be2d207

Please sign in to comment.