-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[charts] Allow circular grid on radar chart #16870
base: master
Are you sure you want to change the base?
Conversation
Deploy preview: https://deploy-preview-16870--material-ui-x.netlify.app/ Updated pages: |
CodSpeed Performance ReportMerging #16870 will not alter performanceComparing Summary
|
@@ -49,6 +55,7 @@ export default function DemoRadar() { | |||
'', | |||
`<RadarChart`, | |||
' {/** ... */}', | |||
` shape={${props.shape}}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
` shape={${props.shape}}`, | |
` shape="${props.shape}"`, |
- `divisions` The number of divisions of the grid | ||
- `startAngle` The rotation angle of the entire chart in degrees. | ||
- `divisions` The number of divisions of the grid. | ||
- `shape` The gird shape that can be `circular` or `sharp`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `shape` The gird shape that can be `circular` or `sharp`. | |
- `shape` The grid shape that can be `circular` or `sharp`. |
import { RadarGridRenderProps } from './RadarGrid.types'; | ||
|
||
export function CircularRadarGrid(props: RadarGridRenderProps) { | ||
const { center, corners, divisions, radius } = props; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is divisions
verified not to be below 1? Not sure if it would create issues when dividing by 0 or a negative number.
import { useTheme } from '@mui/material/styles'; | ||
import { RadarGridRenderProps } from './RadarGrid.types'; | ||
|
||
export interface RadarGridProps { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this type since it's already defined in RadarGrid.types.ts
?
Follow up on #16406