Fix Barchart legend aligning right when orientation is horizontal (#61451)

This commit is contained in:
Victor Marin 2023-01-16 12:09:20 +02:00 committed by GitHub
parent b8b08ea292
commit 43ca4e0bc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 [];