BarChart: Only apply radius to topmost bar segment when stacking (#63906)

pull/57657/head^2
Leon Sorokin 2 years ago committed by GitHub
parent afc9925dbf
commit 9314fe1056
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      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,

Loading…
Cancel
Save