UNPKG

@mui/x-charts

Version:

The community edition of MUI X Charts components.

14 lines 476 B
export const getAxisDomainLimit = (axis, axisDirection, axisIndex, formattedSeries) => { if (axis.domainLimit !== undefined) { return axis.domainLimit; } if (axisDirection === 'x') { for (const seriesId of formattedSeries.line?.seriesOrder ?? []) { const series = formattedSeries.line.series[seriesId]; if (series.xAxisId === axis.id || series.xAxisId === undefined && axisIndex === 0) { return 'strict'; } } } return 'nice'; };