Skip to content

[charts-pro] Fix initial render for zoom slider selection #18208

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

Conversation

bernardobelchior
Copy link
Member

@bernardobelchior bernardobelchior commented Jun 3, 2025

First part of #18018:

Implementation detail: pointer down does "nothing" and pointer move set the zoom to the closest valid state

Screen.Recording.2025-06-03.at.16.16.21.mov

This PR changes the zoom slider to only update the chart's zoom when making a selection on pointer move, instead of pointer down.

@mui-bot
Copy link

mui-bot commented Jun 3, 2025

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

Bundle size report

Total Size Change:${\tiny{\color{green}▼}}$-1.13KB(-0.01%) - Total Gzip Change:${\tiny{\color{green}▼}}$-242B(-0.01%)
Files: 120 total (0 added, 0 removed, 5 changed)

Show 5 more bundle changes

@mui/x-charts-proparsed:${\tiny{\color{green}▼}}$-227B(-0.07%) gzip:${\tiny{\color{green}▼}}$-58B(-0.06%)
@mui/x-charts-pro/BarChartProparsed:${\tiny{\color{green}▼}}$-225B(-0.10%) gzip:${\tiny{\color{green}▼}}$-44B(-0.06%)
@mui/x-charts-pro/ChartZoomSliderparsed:${\tiny{\color{green}▼}}$-225B(-0.33%) gzip:${\tiny{\color{green}▼}}$-51B(-0.21%)
@mui/x-charts-pro/LineChartProparsed:${\tiny{\color{green}▼}}$-225B(-0.10%) gzip:${\tiny{\color{green}▼}}$-40B(-0.05%)
@mui/x-charts-pro/ScatterChartProparsed:${\tiny{\color{green}▼}}$-225B(-0.11%) gzip:${\tiny{\color{green}▼}}$-49B(-0.07%)

Details of bundle changes

Generated by 🚫 dangerJS against 8c36c10

@bernardobelchior bernardobelchior added type: bug A bug or unintended behavior in the components. scope: charts Changes or issues related to the charts product labels Jun 3, 2025
Copy link

codspeed-hq bot commented Jun 3, 2025

CodSpeed Performance Report

Merging #18208 will not alter performance

Comparing bernardobelchior:charts-zoom-slider-range-selection-improv (f03c0e8) with master (4f5baba)

Summary

✅ 9 untouched benchmarks

@bernardobelchior bernardobelchior marked this pull request as ready for review June 4, 2025 10:57
Copy link
Member

@alexfauquette alexfauquette left a comment

Choose a reason for hiding this comment

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

Looks like it simplifies the code 🙃

image

@bernardobelchior bernardobelchior force-pushed the charts-zoom-slider-range-selection-improv branch from f03c0e8 to 8c36c10 Compare June 4, 2025 14:03
@bernardobelchior
Copy link
Member Author

Looks like it simplifies the code 🙃

image

Yes, it does 😄

@bernardobelchior bernardobelchior merged commit 386a5b9 into mui:master Jun 5, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: charts Changes or issues related to the charts product type: bug A bug or unintended behavior in the components.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants