Skip to content

Commit

Permalink
Merge pull request #779 from scottdickerson/fix-tooltip-valueformatter
Browse files Browse the repository at this point in the history
  • Loading branch information
scottdickerson authored Sep 1, 2020
1 parent 77dfc40 commit 8883672
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/core/src/components/essentials/tooltip-axis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,15 @@ export class AxisChartsTooltip extends Tooltip {
rangeLabel = "x-value";
}
}
let rangeValue = datum[rangeIdentifier];
if (rangeAxisScaleType === ScaleTypes.LINEAR) {
rangeValue = rangeValue.toLocaleString();
}

items = [
{
label: domainLabel,
value: domainValue
},
{
label: rangeLabel,
value: rangeValue
value: this.valueFormatter(datum[rangeIdentifier])
},
{
label: "Group",
Expand All @@ -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])
Expand Down

0 comments on commit 8883672

Please sign in to comment.