From b498d47ca9f01be986f8b2ab2fac5cf21828c33a Mon Sep 17 00:00:00 2001 From: Dima Arnautov Date: Fri, 4 Jun 2021 11:33:39 +0200 Subject: [PATCH] feat: apply value formatter to the default legend item label --- src/chart_types/heatmap/state/selectors/compute_legend.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chart_types/heatmap/state/selectors/compute_legend.ts b/src/chart_types/heatmap/state/selectors/compute_legend.ts index e8d878af9b..2c6ac6340f 100644 --- a/src/chart_types/heatmap/state/selectors/compute_legend.ts +++ b/src/chart_types/heatmap/state/selectors/compute_legend.ts @@ -44,7 +44,7 @@ export const computeLegendSelector = createCachedSelector( return { color, - label: `> ${tick}`, + label: `> ${spec.valueFormatter ? spec.valueFormatter(tick) : tick}`, seriesIdentifiers: [seriesIdentifier], isSeriesHidden: deselectedDataSeries.some((dataSeries) => dataSeries.key === seriesIdentifier.key), isToggleable: true,