@mui/x-charts
Version:
The community edition of MUI X Charts components.
20 lines • 1.73 kB
TypeScript
import * as React from 'react';
import { Store } from '@mui/x-internals/store';
import { type ChartAnyPluginSignature, type ChartInstance, type ChartPublicAPI, type ChartState, type ConvertSignaturesIntoPlugins } from "../plugins/models/index.js";
import { type UseChartBaseProps } from "./useCharts.types.js";
/**
* This is the main hook that setups the plugin system for the chart.
*
* It manages the data used to create the charts.
*
* @param inPlugins All the plugins that will be used in the chart.
* @param props The props passed to the chart.
*/
export declare function useCharts<TSignatures extends readonly ChartAnyPluginSignature[] = []>(inPlugins: ConvertSignaturesIntoPlugins<TSignatures>, props: Partial<UseChartBaseProps<TSignatures>>): {
contextValue: {
store: Store<ChartState<readonly [import("../plugins/corePlugins/index.js").UseChartElementRefSignature, import("../index.js").UseChartIdSignature, import("../index.js").UseChartSeriesConfigSignature<keyof import("../index.js").ChartsSeriesConfig>, import("../plugins/corePlugins/useChartExperimentalFeature/index.js").UseChartExperimentalFeaturesSignature<keyof import("../index.js").ChartsSeriesConfig>, import("../index.js").UseChartDimensionsSignature, import("../index.js").UseChartSeriesSignature<keyof import("../index.js").ChartsSeriesConfig>, import("../plugins/corePlugins/useChartAnimation/index.js").UseChartAnimationSignature, import("../index.js").UseChartInteractionListenerSignature, ...TSignatures]>>;
publicAPI: ChartPublicAPI<TSignatures>;
instance: ChartInstance<TSignatures>;
};
};
export declare function useChartApiInitialization<T>(inputApiRef: React.RefObject<T | undefined> | undefined): React.RefObject<T>;