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

[charts] Allow circular grid on radar chart #16870

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexfauquette
Copy link
Member

Follow up on #16406

@alexfauquette alexfauquette added enhancement This is not a bug, nor a new feature component: charts This is the name of the generic UI component, not the React module! labels Mar 7, 2025
@mui-bot
Copy link

mui-bot commented Mar 7, 2025

Deploy preview: https://deploy-preview-16870--material-ui-x.netlify.app/

Updated pages:

Generated by 🚫 dangerJS against 13115d6

Copy link

codspeed-hq bot commented Mar 7, 2025

CodSpeed Performance Report

Merging #16870 will not alter performance

Comparing alexfauquette:radar-rounded (13115d6) with master (3adf6cf)

Summary

✅ 7 untouched benchmarks

@@ -49,6 +55,7 @@ export default function DemoRadar() {
'',
`<RadarChart`,
' {/** ... */}',
` shape={${props.shape}}`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
` 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`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `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;
Copy link
Member

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 {
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: charts This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants