[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 43ca4e0bc7)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2023-01-16 10:23:59 +00:00
committed by GitHub
co-authored by Victor Marin
parent 4db98cbc0f
commit ae78664449
@@ -56,7 +56,7 @@ export const PlotLegend: React.FC<PlotLegendProps> = 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 [];