35 lines
1.4 KiB
TypeScript
35 lines
1.4 KiB
TypeScript
import * as React from 'react';
|
|
import { ChartSeriesType } from "../models/seriesType/config.js";
|
|
import { ChartDataProviderProps } from "../ChartDataProvider/index.js";
|
|
import { ChartsSurfaceProps } from "../ChartsSurface/index.js";
|
|
import { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
import { ChartAnyPluginSignature } from "../internals/plugins/models/plugin.js";
|
|
export type ChartContainerProps<SeriesType extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<SeriesType>> = Omit<ChartDataProviderProps<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 `ChartDataProvider` and `ChartsSurface` components.
|
|
*
|
|
* Demos:
|
|
*
|
|
* - [Composition](https://mui.com/x/api/charts/composition/)
|
|
*
|
|
* API:
|
|
*
|
|
* - [ChartContainer API](https://mui.com/x/api/charts/chart-container/)
|
|
*
|
|
* @example
|
|
* ```jsx
|
|
* <ChartContainer
|
|
* series={[{ label: "Label", type: "bar", data: [10, 20] }]}
|
|
* xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
|
|
* >
|
|
* <BarPlot />
|
|
* <ChartsXAxis axisId="x-axis" />
|
|
* </ChartContainer>
|
|
* ```
|
|
*/
|
|
declare const ChartContainer: <TSeries extends ChartSeriesType>(props: ChartContainerProps<TSeries> & {
|
|
ref?: React.ForwardedRef<SVGSVGElement>;
|
|
}) => React.JSX.Element;
|
|
export { ChartContainer }; |