Skip to content

Commit

Permalink
fix(pieModel) : Unable to view model and export CSV while using value…
Browse files Browse the repository at this point in the history
…MapsTo (#1698)
  • Loading branch information
RiyaJethwa authored Dec 18, 2023
1 parent 0ecc194 commit 24cb898
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/model/pie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ export class PieChartModel extends ChartModel {
const displayData = this.getDisplayData()
const options = this.getOptions()
const { groupMapsTo } = options.data
const { valueMapsTo } = options.pie

const result = [
['Group', 'Value'],
...displayData.map((datum: any) => [
datum[groupMapsTo],
datum['value'] === null ? '–' : datum['value'].toLocaleString()
datum[valueMapsTo] === null ? '–' : datum[valueMapsTo].toLocaleString()
])
]

Expand Down

0 comments on commit 24cb898

Please sign in to comment.