From 20108bb6938f1bdb7cd72e8c36820d5b35385bfa Mon Sep 17 00:00:00 2001 From: Dima Arnautov Date: Fri, 4 Jun 2021 12:04:43 +0200 Subject: [PATCH] feat: apply value formatter to the default legend item label (#1190) --- .../src/chart_types/heatmap/state/selectors/compute_legend.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/osd-charts/src/chart_types/heatmap/state/selectors/compute_legend.ts b/packages/osd-charts/src/chart_types/heatmap/state/selectors/compute_legend.ts index e8d878af9b75..2c6ac6340f81 100644 --- a/packages/osd-charts/src/chart_types/heatmap/state/selectors/compute_legend.ts +++ b/packages/osd-charts/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,