UNPKG

@mui/x-charts

Version:

The community edition of MUI X Charts components.

40 lines (34 loc) 1.11 kB
'use client'; import { useSeriesOfType, useAllSeriesOfType } from "../internals/seriesSelectorOfType.mjs"; /** * Get access to the internal state of scatter series. * * @param {SeriesId} seriesId The id of the series to get. * @returns {UseScatterSeriesReturnValue} the scatter series */ /** * Get access to the internal state of scatter series. * * When called without arguments, it returns all scatter series. * * @returns {UseScatterSeriesReturnValue[]} the scatter series */ /** * Get access to the internal state of scatter series. * * @param {SeriesId[]} seriesIds The ids of the series to get. Order is preserved. * @returns {UseScatterSeriesReturnValue[]} the scatter series */ export function useScatterSeries(seriesIds) { return useSeriesOfType('scatter', seriesIds); } /** * Get access to the internal state of scatter series. * The returned object contains: * - series: a mapping from ids to series attributes. * - seriesOrder: the array of series ids. * @returns the scatter series */ export function useScatterSeriesContext() { return useAllSeriesOfType('scatter'); }