@mui/x-charts
Version:
The community edition of MUI X Charts components.
20 lines • 1.74 kB
text/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.mjs";
import { type UseChartBaseProps } from "./useCharts.types.mjs";
/**
* 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.mjs").UseChartElementRefSignature, import("../index.mjs").UseChartIdSignature, import("../index.mjs").UseChartSeriesConfigSignature<keyof import("../index.mjs").ChartsSeriesConfig>, import("../plugins/corePlugins/useChartExperimentalFeature/index.mjs").UseChartExperimentalFeaturesSignature<keyof import("../index.mjs").ChartsSeriesConfig>, import("../index.mjs").UseChartDimensionsSignature, import("../index.mjs").UseChartSeriesSignature<keyof import("../index.mjs").ChartsSeriesConfig>, import("../plugins/corePlugins/useChartAnimation/index.mjs").UseChartAnimationSignature, import("../index.mjs").UseChartInteractionListenerSignature, ...TSignatures]>>;
publicAPI: ChartPublicAPI<TSignatures>;
instance: ChartInstance<TSignatures>;
};
};
export declare function useChartApiInitialization<T>(inputApiRef: React.RefObject<T | undefined> | undefined): React.RefObject<T>;