Skip to content

Commit

Permalink
proptypes func
Browse files Browse the repository at this point in the history
  • Loading branch information
yaredtsy committed Oct 25, 2023
1 parent 0fc8c4a commit 9e23f8d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/x-charts/src/BarChart/BarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion packages/x-charts/src/LineChart/LineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ const LineChart = React.forwardRef(function LineChart(props: LineChartProps, ref
<ChartsLegend {...legend} slots={slots} slotProps={slotProps} />
<OnClickHandler trigger={tooltip?.trigger} onClick={onClick} />
<ChartsTooltip {...tooltip} slots={slots} slotProps={slotProps} />

<ChartsClipPath id={clipPathId} />
{children}
</ResponsiveChartContainer>
Expand Down Expand Up @@ -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`.
Expand Down
1 change: 1 addition & 0 deletions packages/x-charts/src/ScatterChart/ScatterChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion packages/x-charts/src/SparkLineChart/SparkLineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ const SparkLineChart = React.forwardRef(function SparkLineChart(props: SparkLine
}
>
<OnClickHandler trigger={tooltip?.trigger} onClick={onClick} />

{plotType === 'bar' && (
<BarPlot slots={slots} slotProps={slotProps} sx={{ shapeRendering: 'auto' }} />
)}
Expand Down Expand Up @@ -239,6 +238,7 @@ SparkLineChart.propTypes = {
right: PropTypes.number,
top: PropTypes.number,
}),
onClick: PropTypes.func,
/**
* Type of plot used.
* @default 'line'
Expand Down

0 comments on commit 9e23f8d

Please sign in to comment.