fix(explore): Pie chart label formatting when series is temporal (#18216)

This commit is contained in:
Kamil Gabryjelski
2022-01-28 15:14:40 +01:00
committed by GitHub
parent 9671384efe
commit 37430d4044

View File

@@ -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;
}