UNPKG

@mui/x-charts

Version:

The community edition of MUI X Charts components.

37 lines 1.72 kB
import * as React from 'react'; import { type ChartSeriesType } from "../models/seriesType/config.mjs"; import { type ChartsDataProviderProps, type ChartsDataProviderSlotProps, type ChartsDataProviderSlots } from "../ChartsDataProvider/index.mjs"; import { type ChartsSurfaceProps } from "../ChartsSurface/index.mjs"; import { type AllPluginSignatures } from "../internals/plugins/allPlugins.mjs"; import { type ChartAnyPluginSignature } from "../internals/plugins/models/plugin.mjs"; export interface ChartsContainerSlots extends ChartsDataProviderSlots {} export interface ChartsContainerSlotProps extends ChartsDataProviderSlotProps {} export type ChartsContainerProps<SeriesType extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<SeriesType>> = Omit<ChartsDataProviderProps<SeriesType, TSignatures>, 'children'> & ChartsSurfaceProps; /** * It sets up the data providers as well as the `<svg>` for the chart. * * This is a combination of both the `ChartsDataProvider` and `ChartsSurface` components. * * Demos: * * - [Composition](https://mui.com/x/api/charts/composition/) * * API: * * - [ChartsContainer API](https://mui.com/x/api/charts/charts-container/) * * @example * ```jsx * <ChartsContainer * series={[{ label: "Label", type: "bar", data: [10, 20] }]} * xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]} * > * <BarPlot /> * <ChartsXAxis axisId="x-axis" /> * </ChartsContainer> * ``` */ declare const ChartsContainer: <SeriesType extends ChartSeriesType>(props: ChartsContainerProps<SeriesType> & { ref?: React.ForwardedRef<HTMLDivElement>; }) => React.JSX.Element; export { ChartsContainer };