From c11cd237372a0a773b06215544a312e5d41f6a8d Mon Sep 17 00:00:00 2001 From: Scott Dickerson Date: Mon, 31 Aug 2020 11:50:38 -0500 Subject: [PATCH] fix(tooltip): should use valueFormatter for single values --- packages/core/src/components/essentials/tooltip-axis.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/core/src/components/essentials/tooltip-axis.ts b/packages/core/src/components/essentials/tooltip-axis.ts index 43f0a46ccb..95fbb8c25e 100644 --- a/packages/core/src/components/essentials/tooltip-axis.ts +++ b/packages/core/src/components/essentials/tooltip-axis.ts @@ -65,10 +65,7 @@ export class AxisChartsTooltip extends Tooltip { rangeLabel = "x-value"; } } - let rangeValue = datum[rangeIdentifier]; - if (rangeAxisScaleType === ScaleTypes.LINEAR) { - rangeValue = rangeValue.toLocaleString(); - } + items = [ { label: domainLabel, @@ -76,7 +73,7 @@ export class AxisChartsTooltip extends Tooltip { }, { label: rangeLabel, - value: rangeValue + value: this.valueFormatter(datum[rangeIdentifier]) }, { label: "Group", @@ -94,7 +91,7 @@ export class AxisChartsTooltip extends Tooltip { items = items.concat( data - .map((datum) => ({ + .map(datum => ({ label: datum[groupMapsTo], value: this.valueFormatter(datum[rangeIdentifier]), color: this.model.getStrokeColor(datum[groupMapsTo])