[Lens] displays custom bounds error for right axis when lower bound is above 0 (#124037)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Stratoula Kalafateli 2022-01-31 11:52:51 +02:00 committed by GitHub
parent 702bd9b7ec
commit 7afae17948
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -314,7 +314,7 @@ export const XyToolbar = memo(function XyToolbar(
);
const hasBarOrAreaOnRightAxis = Boolean(
axisGroups
.find((group) => group.groupId === 'left')
.find((group) => group.groupId === 'right')
?.series?.some((series) => {
const seriesType = state.layers.find((l) => l.layerId === series.layer)?.seriesType;
return seriesType?.includes('bar') || seriesType?.includes('area');