Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@bernardobelchior
Copy link
Member

@bernardobelchior bernardobelchior commented Oct 10, 2025

Related to #19869.

Add scatter chart with linear regression demo.

@bernardobelchior bernardobelchior added docs Improvements or additions to the documentation. 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 Oct 10, 2025
@bernardobelchior bernardobelchior force-pushed the scatter-linear-regression-demo branch from e75e9d7 to 017ab99 Compare October 10, 2025 15:15
@mui-bot
Copy link

mui-bot commented Oct 10, 2025

Deploy preview: https://deploy-preview-19900--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 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@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 cdc32fd

See the [Composition—clipping](/x/react-charts/composition/#clipping) for more info.
:::

### Regression line
Copy link
Member Author

Choose a reason for hiding this comment

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

Placed this under composition because it requires composition, but not sure if it's the best place.

Copy link
Member

Choose a reason for hiding this comment

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

Another option is to move it into the scatter-demo page. You might get more space to describe the different feature you used

Copy link
Member Author

Choose a reason for hiding this comment

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

I was under the impression we wanted to remove the demo pages, isn't that right? That's why I placed it here

Copy link
Member

Choose a reason for hiding this comment

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

We're not removing individual demo pages. I think this demo placed under Composition is fine, any new demo can go in the demo page.

maximumFractionDigits: 0,
});

export default function ScatterRegressionLine() {
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 looking very bland 😅 any improvement suggestions would be gladly accepted!

Image

Copy link
Member

Choose a reason for hiding this comment

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

Maybe a softer red or decreased opacity.
Maybe add a vertical dashed line where the line exits the chart?

Copy link
Member

Choose a reason for hiding this comment

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

If you want a better red, you can pick the one from rainbowSurgePalette:

isLightTheme ? '#FA4F58' : '#F35865'

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 👍

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 10, 2025

CodSpeed Performance Report

Merging #19900 will not alter performance

Comparing bernardobelchior:scatter-linear-regression-demo (cdc32fd) with master (ae64f95)1

Summary

✅ 12 untouched

Footnotes

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

@bernardobelchior bernardobelchior marked this pull request as ready for review October 13, 2025 13:13
@bernardobelchior bernardobelchior merged commit fee46a1 into mui:master Oct 13, 2025
22 checks passed
@bernardobelchior bernardobelchior deleted the scatter-linear-regression-demo branch October 13, 2025 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to the documentation. 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.

5 participants