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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[charts] Add z-axis to colorize scatter charts #12738

Merged
merged 11 commits into from Apr 19, 2024

Conversation

alexfauquette
Copy link
Member

@alexfauquette alexfauquette commented Apr 10, 2024

A followup of #12490

TODO:

  • Write documentation
  • Look at other charts that could be interesting to support it
  • Update the tooltip
  • Clarify the notion of z-axis data/dataset. Maybe a notion of getter will be needed
    • The current state make sens for me. It's a mix between having a z value the same way x and y are currently handled by the scatter series. And a zAxis.data that will simplify the work with other charts such as the bar chart

I'm not a big fan of exporting the ZAxisProvider but it's the only way I see to le it available for composition

Changelog

  • 馃巵 Scatter Charts get a z-axis to allow coloring data points independently from their coordinate.

@alexfauquette alexfauquette marked this pull request as draft April 10, 2024 15:16
@alexfauquette alexfauquette added the component: charts This is the name of the generic UI component, not the React module! label Apr 10, 2024
@mui-bot
Copy link

mui-bot commented Apr 10, 2024

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

Updated pages:

Generated by 馃毇 dangerJS against 2950d50

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Apr 15, 2024
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Apr 15, 2024
@alexfauquette alexfauquette marked this pull request as ready for review April 16, 2024 13:00
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.

Small details left out, but overall nice work 馃憤

@alexfauquette
Copy link
Member Author

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

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

Copy link
Member Author

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

@alexfauquette alexfauquette merged commit bdcf079 into mui:master Apr 19, 2024
17 checks passed
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.

None yet

4 participants