From aa7f9e93f1ce51c4b802d516ee1a075196a924b6 Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Thu, 16 Nov 2023 16:20:11 -0600 Subject: [PATCH] CE-740 Border & tooltip for the current use-case --- .../widgets/charts/StackedBarChart.tsx | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/src/qqq/components/widgets/charts/StackedBarChart.tsx b/src/qqq/components/widgets/charts/StackedBarChart.tsx index 0e449b5..d134222 100644 --- a/src/qqq/components/widgets/charts/StackedBarChart.tsx +++ b/src/qqq/components/widgets/charts/StackedBarChart.tsx @@ -45,18 +45,39 @@ export const options = { animation: { duration: 0 }, + elements: { + bar: { + borderRadius: 4 + } + }, plugins: { tooltip: { // todo - some configs around this - enabled: false + callbacks: { + title: function(context: any) + { + return (""); + }, + label: function(context: any) + { + if(context.dataset.label.startsWith(context.label)) + { + return `${context.label} (${context.formattedValue})`; + } + else + { + return (""); + } + } + } }, legend: { position: "bottom", labels: { usePointStyle: true, pointStyle: "circle", - boxHeight: 8, - boxWidth: 8, + boxHeight: 6, + boxWidth: 6, padding: 12, font: { size: 14