Skip to content

Conversation

@bernardobelchior
Copy link
Member

Context: #20033 (comment).

Add barLabel to bar series. Deprecate barLabel in BarPlot.

@bernardobelchior bernardobelchior added type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. scope: charts Changes related to the charts. labels Nov 3, 2025
@mui-bot
Copy link

mui-bot commented Nov 3, 2025

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

Updated pages:

Bundle size report

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 🔺+82B(+0.02%) 🔺+24B(+0.02%)
@mui/x-charts-pro 🔺+82B(+0.02%) 🔺+21B(+0.02%)
@mui/x-charts-premium 🔺+78B(+0.02%) 🔺+26B(+0.02%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against 4814fe0

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 3, 2025

CodSpeed Performance Report

Merging #20184 will not alter performance

Comparing bernardobelchior:series-bar-label (4814fe0) with master (002c2fa)1

Summary

✅ 13 untouched

Footnotes

  1. No successful run was found on master (76b6fb7) during the generation of this report, so 002c2fa was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

const { seriesId, data } = processedSeries;
const classes = useUtilityClasses();

const barLabel = processedSeries.barLabel ?? props.barLabel;
Copy link
Member

Choose a reason for hiding this comment

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

This is to allow composition?

Copy link
Member

Choose a reason for hiding this comment

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

If not, we probably need to have a test for users that are currently passing barLabel in the composition of the BarPlot

Copy link
Member Author

Choose a reason for hiding this comment

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

This is to allow composition?

No, the goal is to maintain the current API without breaking changes.

If not, we probably need to have a test for users that are currently passing barLabel in the composition of the BarPlot

We're indirectly testing this through the BarChart tests that I added. Do you think it makes sense to test it separately for the BarPlot?

Copy link
Member

Choose a reason for hiding this comment

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

My point is that we should keep compatibility for users providing this through composition to the BarPlot, so it would be good to have a test of the composition working to ensure we don't create a regression.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done 👍

@bernardobelchior bernardobelchior merged commit 8ed3490 into mui:master Nov 5, 2025
22 checks passed
@bernardobelchior bernardobelchior deleted the series-bar-label branch November 5, 2025 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: charts Changes related to the charts. type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants