From 3d7502531d2ad6174dbc13cff6d6c4ef78219c2d Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Fri, 27 Oct 2023 14:24:59 -0500 Subject: [PATCH] CE-604 Remove redundant numeric value in pie labels --- .../widgets/charts/piechart/PieChartConfigs.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/qqq/components/widgets/charts/piechart/PieChartConfigs.ts b/src/qqq/components/widgets/charts/piechart/PieChartConfigs.ts index 1c9bf79..5981f76 100644 --- a/src/qqq/components/widgets/charts/piechart/PieChartConfigs.ts +++ b/src/qqq/components/widgets/charts/piechart/PieChartConfigs.ts @@ -67,6 +67,18 @@ function configs(labels: any, datasets: any) maintainAspectRatio: false, responsive: true, plugins: { + tooltip: { + callbacks: { + label: function(context: any) + { + //////////////////////////////////////////////////////////////////////////////// + // our labels already have the value in them - so just use the label in the // + // tooltip (lib by default puts label + value, so we were duplicating value!) // + //////////////////////////////////////////////////////////////////////////////// + return context.label; + } + } + }, legend: { position: "bottom", labels: {