UNPKG

@mui/x-charts

Version:

The community edition of MUI X Charts components.

30 lines 1.14 kB
import type { SeriesId } from "../../../../../models/seriesType/common.js"; import type { ChartSeriesType } from "../../../../../models/seriesType/config.js"; import type { ProcessedSeries } from "../../../corePlugins/useChartSeries/useChartSeries.types.js"; /** * Walk forward (or backward) from `startIndex` and return the first dataIndex * whose data point is visible. Returns `null` if every traversed index is hidden. * * Series-level hidden flags are filtered upstream (see `getNonEmptySeriesArray`), * so only per-data-point hidden flags are relevant here. Today only Pie sets a * `hidden` flag on individual data items; for other series types the data * elements are scalars or objects without that field, and this helper returns * the proposed index unchanged. */ export declare function findVisibleDataIndex({ processedSeries, type, seriesId, startIndex, dataLength, direction, allowCycles }: { processedSeries: ProcessedSeries<ChartSeriesType>; type: ChartSeriesType; seriesId: SeriesId; startIndex: number; dataLength: number; direction: 1 | -1; allowCycles: boolean; }): number | null;