From 43ca4e0bc7baecd4069ced99789fe72beeb6bad7 Mon Sep 17 00:00:00 2001 From: Victor Marin <36818606+mdvictor@users.noreply.github.com> Date: Mon, 16 Jan 2023 12:09:20 +0200 Subject: [PATCH] Fix Barchart legend aligning right when orientation is horizontal (#61451) --- packages/grafana-ui/src/components/uPlot/PlotLegend.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/grafana-ui/src/components/uPlot/PlotLegend.tsx b/packages/grafana-ui/src/components/uPlot/PlotLegend.tsx index 12dbefd7d04..5e498152762 100644 --- a/packages/grafana-ui/src/components/uPlot/PlotLegend.tsx +++ b/packages/grafana-ui/src/components/uPlot/PlotLegend.tsx @@ -56,7 +56,7 @@ export const PlotLegend: React.FC = React.memo( fieldIndex, color: seriesColor, label, - yAxis: axisPlacement === AxisPlacement.Left ? 1 : 2, + yAxis: axisPlacement === AxisPlacement.Left || axisPlacement === AxisPlacement.Bottom ? 1 : 2, getDisplayValues: () => { if (!calcs?.length) { return [];