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] Experiment with plugins for series+axes #15865

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

alexfauquette
Copy link
Member

@alexfauquette alexfauquette commented Dec 12, 2024

This PR is an attempt to migrate the axes, series and zoom to the plugin framework.

Modifications

The plugins props which was an array of configuration objects, defining for each series how to compute the extremums, preprocess the data, ... is now an object called seriesConfig. That's only sementic modification

- plugins={[ barConfig, lineConfig ]}
+ seriesConfig={{ bar: barConfig, line: lineConfig }}

I did not yet implemented the colorGetter management. Which causes tootltip colors to be black.

The data modification is now done in selectors. We have 3 states: series, cartesianAxes, and zoom which describe the state of the chart.

One issue with this strategy is that useXAxis() is defined in the MIT package. And I we want to have the BarPlot that supports zoom, we need to have the zoom selectors that support zoom. The workaround is to put typing, and selectors for zoom in the MIT package, but populate and manage the state in the pro package.

Unsolved issue

I do not manage to have the controlled/uncontroled zoom working fluently.

I noticed that the actual onZoomChange is not really a control callback, because it returns the updater and not the new value

@mui-bot
Copy link

mui-bot commented Dec 12, 2024

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

Generated by 🚫 dangerJS against d17f173

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants