From 5ae520bbd2b357e6ce8774443705d2e23b9577d2 Mon Sep 17 00:00:00 2001 From: Griffin Jones Date: Sat, 14 Sep 2024 12:28:08 +0800 Subject: [PATCH 1/2] fix: chart props to take partials --- packages/@mantine/charts/src/BubbleChart/BubbleChart.tsx | 2 +- packages/@mantine/charts/src/DonutChart/DonutChart.tsx | 2 +- packages/@mantine/charts/src/PieChart/PieChart.tsx | 2 +- packages/@mantine/charts/src/RadarChart/RadarChart.tsx | 2 +- packages/@mantine/charts/src/ScatterChart/ScatterChart.tsx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/@mantine/charts/src/BubbleChart/BubbleChart.tsx b/packages/@mantine/charts/src/BubbleChart/BubbleChart.tsx index 209f0245a9e..1aefdf1268c 100644 --- a/packages/@mantine/charts/src/BubbleChart/BubbleChart.tsx +++ b/packages/@mantine/charts/src/BubbleChart/BubbleChart.tsx @@ -107,7 +107,7 @@ export interface BubbleChartProps tooltipProps?: Omit, 'ref'>; /** Props passed down to the `Scatter` component */ - scatterProps?: Omit; + scatterProps?: Partial>; /** Color of the text displayed inside the chart, `'dimmed'` by default */ textColor?: MantineColor; diff --git a/packages/@mantine/charts/src/DonutChart/DonutChart.tsx b/packages/@mantine/charts/src/DonutChart/DonutChart.tsx index 5340a46c5f2..dd8279b058e 100644 --- a/packages/@mantine/charts/src/DonutChart/DonutChart.tsx +++ b/packages/@mantine/charts/src/DonutChart/DonutChart.tsx @@ -54,7 +54,7 @@ export interface DonutChartProps tooltipProps?: Omit, 'ref'>; /** Props passed down to recharts `Pie` component */ - pieProps?: Omit; + pieProps?: Partial>; /** Controls color of the segments stroke, by default depends on color scheme */ strokeColor?: MantineColor; diff --git a/packages/@mantine/charts/src/PieChart/PieChart.tsx b/packages/@mantine/charts/src/PieChart/PieChart.tsx index 8b555738d8f..2dc8211cf20 100644 --- a/packages/@mantine/charts/src/PieChart/PieChart.tsx +++ b/packages/@mantine/charts/src/PieChart/PieChart.tsx @@ -56,7 +56,7 @@ export interface PieChartProps tooltipProps?: Omit, 'ref'>; /** Props passed down to recharts `Pie` component */ - pieProps?: Omit; + pieProps?: Partial>; /** Controls color of the segments stroke, by default depends on color scheme */ strokeColor?: MantineColor; diff --git a/packages/@mantine/charts/src/RadarChart/RadarChart.tsx b/packages/@mantine/charts/src/RadarChart/RadarChart.tsx index 3b129781601..bd2790c980c 100644 --- a/packages/@mantine/charts/src/RadarChart/RadarChart.tsx +++ b/packages/@mantine/charts/src/RadarChart/RadarChart.tsx @@ -72,7 +72,7 @@ export interface RadarChartProps withPolarRadiusAxis?: boolean; /** Props passed down to recharts Radar component */ - radarProps?: ((series: RadarChartSeries) => Omit) | Omit; + radarProps?: ((series: RadarChartSeries) => Partial>) | Partial>; /** Props passed down to recharts RadarChart component */ radarChartProps?: React.ComponentPropsWithoutRef; diff --git a/packages/@mantine/charts/src/ScatterChart/ScatterChart.tsx b/packages/@mantine/charts/src/ScatterChart/ScatterChart.tsx index 3671a87f51f..7b54f4ae321 100644 --- a/packages/@mantine/charts/src/ScatterChart/ScatterChart.tsx +++ b/packages/@mantine/charts/src/ScatterChart/ScatterChart.tsx @@ -74,7 +74,7 @@ export interface ScatterChartProps scatterChartProps?: React.ComponentPropsWithoutRef; /** Props passed down to recharts `Scatter` component */ - scatterProps?: Omit; + scatterProps?: Partial>; } function getAxis(key: string, dataKey: { x: string; y: string }) { From 275be64cb403eb46234318178d33b0a04baa6b15 Mon Sep 17 00:00:00 2001 From: Griffin Jones Date: Sat, 14 Sep 2024 14:53:11 +0800 Subject: [PATCH 2/2] fix: linting --- packages/@mantine/charts/src/RadarChart/RadarChart.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/@mantine/charts/src/RadarChart/RadarChart.tsx b/packages/@mantine/charts/src/RadarChart/RadarChart.tsx index bd2790c980c..bdc85328a0f 100644 --- a/packages/@mantine/charts/src/RadarChart/RadarChart.tsx +++ b/packages/@mantine/charts/src/RadarChart/RadarChart.tsx @@ -72,7 +72,9 @@ export interface RadarChartProps withPolarRadiusAxis?: boolean; /** Props passed down to recharts Radar component */ - radarProps?: ((series: RadarChartSeries) => Partial>) | Partial>; + radarProps?: + | ((series: RadarChartSeries) => Partial>) + | Partial>; /** Props passed down to recharts RadarChart component */ radarChartProps?: React.ComponentPropsWithoutRef;