UNPKG

@mui/x-charts

Version:

The community edition of MUI X Charts components.

38 lines 1.83 kB
import * as React from 'react'; import { type BarChartProps, type BarSeries } from "./BarChart.js"; import { type ChartContainerProps } from "../ChartContainer/index.js"; import { type BarPlotProps } from "./BarPlot.js"; import { type ChartsGridProps } from "../ChartsGrid/index.js"; import { type ChartsClipPathProps } from "../ChartsClipPath/index.js"; import { type ChartsOverlayProps } from "../ChartsOverlay/index.js"; import { type ChartsAxisProps } from "../ChartsAxis/index.js"; import { type ChartsAxisHighlightProps } from "../ChartsAxisHighlight/index.js"; import { type ChartsLegendSlotExtension } from "../ChartsLegend/index.js"; import type { ChartsWrapperProps } from "../ChartsWrapper/index.js"; import { type BarChartPluginSignatures } from "./BarChart.plugins.js"; export interface UseBarChartPropsExtensions {} export type UseBarChartProps = Omit<BarChartProps, 'series'> & Omit<{ series: ReadonlyArray<BarSeries>; }, keyof UseBarChartPropsExtensions> & UseBarChartPropsExtensions; /** * A helper function that extracts BarChartProps from the input props * and returns an object with props for the children components of BarChart. * * @param props The input props for BarChart * @returns An object with props for the children components of BarChart */ export declare const useBarChartProps: (props: UseBarChartProps) => { chartsWrapperProps: Omit<ChartsWrapperProps, "children">; chartContainerProps: ChartContainerProps<"bar", BarChartPluginSignatures>; barPlotProps: BarPlotProps; gridProps: ChartsGridProps; clipPathProps: ChartsClipPathProps; clipPathGroupProps: { clipPath: string; }; overlayProps: ChartsOverlayProps; chartsAxisProps: ChartsAxisProps; axisHighlightProps: ChartsAxisHighlightProps; legendProps: ChartsLegendSlotExtension; children: React.ReactNode; };