Skip to content

v6 resolve issue with missed item on the itemData.dataIndex index in series.data #17411

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

Open
wants to merge 2 commits into
base: v6.x
Choose a base branch
from

Conversation

Knyazik01
Copy link

@Knyazik01 Knyazik01 commented Apr 16, 2025

Fix #17412

When the data updates - this may be a case when item on the itemData.dataIndex index in series.data is missed
Example:
image
image

To resolve this issue I've added additional condition for this case and return null (same when itemData.dataIndex is missed)

@mui-bot
Copy link

mui-bot commented Apr 16, 2025

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

Generated by 🚫 dangerJS against 7f8ebfe

@alexfauquette
Copy link
Member

Is there any reason you do not migrate to v7? The breaking changes are nearly empty. https://mui.com/x/migration/migration-charts-v6/

Less than 10% of the weekly downloads are for v6. So except for critical issue, we will got through the release process

@Knyazik01
Copy link
Author

Knyazik01 commented Apr 17, 2025

Regarding migration: We need to change many places in the project, apply new styles (overwrite, add/change selectors if needed), test all of them to update to the v7.

In addition this issue looks like as issue with the chart's core functionality: we cannot update data dynamically in a chart if user interacts with it, as we'll get an error

@zannager zannager added v6.x component: charts This is the name of the generic UI component, not the React module! labels Apr 17, 2025
@alexfauquette
Copy link
Member

Regarding migration: We need to change many places in the project, apply new styles (overwrite, add/change selectors if needed), test all of them to update to the v7.

You can update the charts library independently from the other mui packages. Exeption for @mui/material which needs to be to ^5.15.14 but that's a stable bump from v5 to another v5.

In addition this issue looks like as issue with the chart's core functionality

Yes, but we support bug fixes for the latest version https://mui.com/x/introduction/support/#supported-versions

In addition, you have a workaround. This component is exposed by slots. From what I remember, the slot itemContent. You can copy paste the default with your fix in your codebase and use it as a quick fix the time to update to v7

@alexfauquette
Copy link
Member

In addition, you have a workaround. This component is exposed by slots. From what I remember, the slot itemContent. You can copy paste the default with your fix in your codebase and use it as a quick fix the time to update to v7

I'm wrong on that point, there is no easy workaround because slots for item customisation got added later in v7. To fix that just update to v7

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

Successfully merging this pull request may close these issues.

4 participants