From 64412b119597b8d1364ac153d5ecec157bb9de89 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Wed, 1 Mar 2023 18:28:14 -0500 Subject: [PATCH] [v9.4.x] BarChart: Only apply radius to topmost bar segment when stacking (#63986) BarChart: Only apply radius to topmost bar segment when stacking (#63906) (cherry picked from commit 9314fe1056aea8254ced2ea325f35085c68855b8) Co-authored-by: Leon Sorokin --- public/app/plugins/panel/barchart/bars.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/public/app/plugins/panel/barchart/bars.ts b/public/app/plugins/panel/barchart/bars.ts index b1ec44cc195..54793ddd422 100644 --- a/public/app/plugins/panel/barchart/bars.ts +++ b/public/app/plugins/panel/barchart/bars.ts @@ -286,7 +286,14 @@ export function getConfig(opts: BarsOptions, theme: GrafanaTheme2) { : {}; let barsBuilder = uPlot.paths.bars!({ - radius: barRadius, + radius: pctStacked + ? 0 + : !isStacked + ? barRadius + : (u: uPlot, seriesIdx: number) => { + let isTopmostSeries = seriesIdx === u.data.length - 1; + return isTopmostSeries ? [barRadius, 0] : [0, 0]; + }, disp: { x0: { unit: 2,