diff --git a/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx b/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx index aea2de666f314..02d7418af986e 100644 --- a/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx +++ b/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx @@ -226,11 +226,13 @@ export function XYChart({ const isTimeViz = Boolean(dataLayers.every((l) => l.xScaleType === 'time')); const isHistogramViz = dataLayers.every((l) => l.isHistogram); - const { baseDomain: rawXDomain, extendedDomain: xDomain } = useMemo( + const domains = useMemo( () => getXDomain(dataLayers, minInterval, isTimeViz, isHistogramViz), [dataLayers, minInterval, isTimeViz, isHistogramViz] ); + const { baseDomain: rawXDomain, extendedDomain: xDomain } = domains; + const yAxesMap = { left: yAxesConfiguration.find(({ groupId }) => groupId === 'left'), right: yAxesConfiguration.find(({ groupId }) => groupId === 'right'),