From 3fa517a49627739aa042e1779a3a4de54f8045f4 Mon Sep 17 00:00:00 2001 From: Kamil Gabryjelski Date: Fri, 28 Jan 2022 14:17:20 +0100 Subject: [PATCH] fix(explore): Pie chart label formatting when series is temporal --- .../plugins/plugin-chart-echarts/src/utils/series.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts b/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts index d4c53d9df0f89..a262251b541e8 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts @@ -88,9 +88,6 @@ export function formatSeriesName( if (name === undefined || name === null) { return NULL_STRING; } - if (typeof name === 'number') { - return numberFormatter ? numberFormatter(name) : name.toString(); - } if (typeof name === 'boolean') { return name.toString(); } @@ -99,6 +96,9 @@ export function formatSeriesName( return timeFormatter ? timeFormatter(d) : d.toISOString(); } + if (typeof name === 'number') { + return numberFormatter ? numberFormatter(name) : name.toString(); + } return name; }