-
-
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] Add z-axis to colorize scatter charts #12738
Conversation
Deploy preview: https://deploy-preview-12738--material-ui-x.netlify.app/ Updated pages: |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
833b304
to
63763b5
Compare
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.
Small details left out, but overall nice work 👍
docs/translations/api-docs/charts/scatter-chart/scatter-chart.json
Outdated
Show resolved
Hide resolved
packages/x-charts/src/ChartsTooltip/ChartsAxisTooltipContent.tsx
Outdated
Show resolved
Hide resolved
packages/x-charts/src/ChartsTooltip/ChartsItemTooltipContent.tsx
Outdated
Show resolved
Hide resolved
Thanks for your careful look. I added one commit per suggestion |
4. The series color | ||
|
||
:::info | ||
The z-axis is a third axis that allows to customize scatter points independently from their position. |
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 this an API you saw on another library?
It's clearly a valid use-case, but I'm curious to know if this is the classic way of solving it
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.
The naming is used in Rechart
https://recharts.org/en-US/examples/BubbleChart
<ZAxis type="number" dataKey="value" domain={domain} range={range} />
For Echart, they have a similar idea called visualMap
A followup of #12490
TODO:
z
value the same wayx
andy
are currently handled by the scatter series. And azAxis.data
that will simplify the work with other charts such as the bar chartI'm not a big fan of exporting the
ZAxisProvider
but it's the only way I see to le it available for compositionChangelog