From ae786644495d7fc05d4c3f6c2fbb726fa3ac9e32 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Mon, 16 Jan 2023 11:23:59 +0100 Subject: [PATCH] [v9.3.x] Fix Barchart legend aligning right when orientation is horizontal (#61543) Fix Barchart legend aligning right when orientation is horizontal (#61451) (cherry picked from commit 43ca4e0bc7baecd4069ced99789fe72beeb6bad7) Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com> --- 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 5f465b4c597..c59ca4c6dc3 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 [];