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] Add a PolarProvider to manage polar axes #14642

Merged
merged 6 commits into from
Sep 18, 2024

Conversation

alexfauquette
Copy link
Member

@alexfauquette alexfauquette commented Sep 16, 2024

Follow-up of #14641

It introduces a PolarProvider which has similar behavior has the cartesian one. The main differences:

  • The range computation:
    • The rotation goes from startAngle to endAngle
    • The radius goes from minRadius to maxRadius
  • No Zoom
  • Of course the naming rotation/radius instead of x/y axes

Note the provider is not exported. So this is still internal code

@alexfauquette alexfauquette added the component: charts This is the name of the generic UI component, not the React module! label Sep 16, 2024
@mui-bot
Copy link

mui-bot commented Sep 16, 2024

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

Generated by 🚫 dangerJS against 68a729e

Copy link

codspeed-hq bot commented Sep 17, 2024

CodSpeed Performance Report

Merging #14642 will not alter performance

Comparing alexfauquette:add-polar-coordinate (68a729e) with master (c93f76b)

Summary

✅ 3 untouched benchmarks

@alexfauquette alexfauquette marked this pull request as ready for review September 17, 2024 07:48
Copy link
Member

@JCQuintas JCQuintas left a comment

Choose a reason for hiding this comment

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

Nice work 👍, left a comment in code plus the observation below

There is an empty file at packages/x-charts/src/context/PolarProvider/defaultizeAxis.ts

@alexfauquette
Copy link
Member Author

I merged the two computeValue in one. It's not supper coherent because the function is use in cartesian and polar context, plus exported as a cartesian axis utils. But should be good enough for now. I'm not sure about how much we will use this PolarProvider outside of the radar

@JCQuintas
Copy link
Member

I merged the two computeValue in one. It's not supper coherent because the function is use in cartesian and polar context, plus exported as a cartesian axis utils. But should be good enough for now. I'm not sure about how much we will use this PolarProvider outside of the radar

I think the changes are small enough that makes sense to have a single logic.

In regards to where to put it, we could move it into the internals folder maybe?

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!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants