Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[@mantine/chart] fix: typing on chart props #6820

Merged
merged 3 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/@mantine/charts/src/BubbleChart/BubbleChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export interface BubbleChartProps
tooltipProps?: Omit<TooltipProps<any, any>, 'ref'>;

/** Props passed down to the `Scatter` component */
scatterProps?: Omit<ScatterProps, 'ref'>;
scatterProps?: Partial<Omit<ScatterProps, 'ref'>>;

/** Color of the text displayed inside the chart, `'dimmed'` by default */
textColor?: MantineColor;
Expand Down
2 changes: 1 addition & 1 deletion packages/@mantine/charts/src/DonutChart/DonutChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export interface DonutChartProps
tooltipProps?: Omit<TooltipProps<any, any>, 'ref'>;

/** Props passed down to recharts `Pie` component */
pieProps?: Omit<PieProps, 'ref'>;
pieProps?: Partial<Omit<PieProps, 'ref'>>;

/** Controls color of the segments stroke, by default depends on color scheme */
strokeColor?: MantineColor;
Expand Down
2 changes: 1 addition & 1 deletion packages/@mantine/charts/src/PieChart/PieChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export interface PieChartProps
tooltipProps?: Omit<TooltipProps<any, any>, 'ref'>;

/** Props passed down to recharts `Pie` component */
pieProps?: Omit<PieProps, 'ref'>;
pieProps?: Partial<Omit<PieProps, 'ref'>>;

/** Controls color of the segments stroke, by default depends on color scheme */
strokeColor?: MantineColor;
Expand Down
4 changes: 3 additions & 1 deletion packages/@mantine/charts/src/RadarChart/RadarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ export interface RadarChartProps
withPolarRadiusAxis?: boolean;

/** Props passed down to recharts Radar component */
radarProps?: ((series: RadarChartSeries) => Omit<RadarProps, 'ref'>) | Omit<RadarProps, 'ref'>;
radarProps?:
| ((series: RadarChartSeries) => Partial<Omit<RadarProps, 'ref'>>)
| Partial<Omit<RadarProps, 'ref'>>;

/** Props passed down to recharts RadarChart component */
radarChartProps?: React.ComponentPropsWithoutRef<typeof ReChartsRadarChart>;
Expand Down
2 changes: 1 addition & 1 deletion packages/@mantine/charts/src/ScatterChart/ScatterChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export interface ScatterChartProps
scatterChartProps?: React.ComponentPropsWithoutRef<typeof ReChartsScatterChart>;

/** Props passed down to recharts `Scatter` component */
scatterProps?: Omit<ScatterProps, 'ref'>;
scatterProps?: Partial<Omit<ScatterProps, 'ref'>>;

/** If set, displays labels next to points for the given axis */
pointLabels?: 'x' | 'y';
Expand Down
Loading