From 9e23f8d633d4f1e234c2233648f7c0cbd82c3c53 Mon Sep 17 00:00:00 2001 From: yaredtsyg Date: Wed, 25 Oct 2023 10:27:53 +0300 Subject: [PATCH] proptypes func --- packages/x-charts/src/BarChart/BarChart.tsx | 1 + packages/x-charts/src/LineChart/LineChart.tsx | 2 +- packages/x-charts/src/ScatterChart/ScatterChart.tsx | 1 + packages/x-charts/src/SparkLineChart/SparkLineChart.tsx | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/x-charts/src/BarChart/BarChart.tsx b/packages/x-charts/src/BarChart/BarChart.tsx index ea13e5a0dd9b8..132a40f058789 100644 --- a/packages/x-charts/src/BarChart/BarChart.tsx +++ b/packages/x-charts/src/BarChart/BarChart.tsx @@ -245,6 +245,7 @@ BarChart.propTypes = { right: PropTypes.number, top: PropTypes.number, }), + onClick: PropTypes.func, /** * Indicate which axis to display the right of the charts. * Can be a string (the id of the axis) or an object `ChartsYAxisProps`. diff --git a/packages/x-charts/src/LineChart/LineChart.tsx b/packages/x-charts/src/LineChart/LineChart.tsx index 3294733cd0da6..47fe6e91367d1 100644 --- a/packages/x-charts/src/LineChart/LineChart.tsx +++ b/packages/x-charts/src/LineChart/LineChart.tsx @@ -154,7 +154,6 @@ const LineChart = React.forwardRef(function LineChart(props: LineChartProps, ref - {children} @@ -256,6 +255,7 @@ LineChart.propTypes = { right: PropTypes.number, top: PropTypes.number, }), + onClick: PropTypes.func, /** * Indicate which axis to display the right of the charts. * Can be a string (the id of the axis) or an object `ChartsYAxisProps`. diff --git a/packages/x-charts/src/ScatterChart/ScatterChart.tsx b/packages/x-charts/src/ScatterChart/ScatterChart.tsx index 13cbd5be22e44..f970e08c53918 100644 --- a/packages/x-charts/src/ScatterChart/ScatterChart.tsx +++ b/packages/x-charts/src/ScatterChart/ScatterChart.tsx @@ -205,6 +205,7 @@ ScatterChart.propTypes = { right: PropTypes.number, top: PropTypes.number, }), + onClick: PropTypes.func, /** * Indicate which axis to display the right of the charts. * Can be a string (the id of the axis) or an object `ChartsYAxisProps`. diff --git a/packages/x-charts/src/SparkLineChart/SparkLineChart.tsx b/packages/x-charts/src/SparkLineChart/SparkLineChart.tsx index 1e965124ea4f6..db145b64c9554 100644 --- a/packages/x-charts/src/SparkLineChart/SparkLineChart.tsx +++ b/packages/x-charts/src/SparkLineChart/SparkLineChart.tsx @@ -170,7 +170,6 @@ const SparkLineChart = React.forwardRef(function SparkLineChart(props: SparkLine } > - {plotType === 'bar' && ( )} @@ -239,6 +238,7 @@ SparkLineChart.propTypes = { right: PropTypes.number, top: PropTypes.number, }), + onClick: PropTypes.func, /** * Type of plot used. * @default 'line'