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] Add color prop to Sparkline and deprecate colors #16477

Merged
merged 6 commits into from
Feb 6, 2025

Conversation

bernardobelchior
Copy link
Member

@bernardobelchior bernardobelchior commented Feb 5, 2025

Add color prop to SparkLineChart and deprecate colors. The reasoning is explained in this comment.

Fixes #11707.

@bernardobelchior bernardobelchior added component: charts This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature labels Feb 5, 2025
@mui-bot
Copy link

mui-bot commented Feb 5, 2025

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

Updated pages:

Generated by 🚫 dangerJS against c855839

Copy link

codspeed-hq bot commented Feb 5, 2025

CodSpeed Performance Report

Merging #16477 will not alter performance

Comparing bernardobelchior:sparkline-color (c855839) with master (dd5cde3)

Summary

✅ 6 untouched benchmarks

@bernardobelchior bernardobelchior changed the title [charts] Add color prop to Sparkline. Deprecated colors. Update colors defaults. [charts] Add color prop to Sparkline and deprecate colors Feb 6, 2025
@bernardobelchior bernardobelchior marked this pull request as ready for review February 6, 2025 09:58
@@ -82,7 +82,7 @@ ChartDataProviderPro.propTypes = {
children: PropTypes.node,
/**
* Color palette used to colorize multiple series.
* @default rainbowSurgePalette
* @default blueberryTwilightPalette
Copy link
Member

Choose a reason for hiding this comment

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

Why was this changed from rainbowSurgePalette to blueberryTwilightPalette? Rainbow surge is the new one and should be the default

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure, it wasn't intended.

Before I had the update to the default color in this PR as well, but when I moved it into a different one I must have messed something up. It's fixed now!

@@ -17,7 +17,7 @@ export interface UseChartSeriesParameters<T extends ChartSeriesType = ChartSerie
series?: AllSeriesType<T>[];
/**
* Color palette used to colorize multiple series.
* @default rainbowSurgePalette
* @default blueberryTwilightPalette
Copy link
Member

Choose a reason for hiding this comment

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

Here is the change 😄

@bernardobelchior bernardobelchior merged commit 1ffe360 into mui:master Feb 6, 2025
19 checks passed
@bernardobelchior bernardobelchior deleted the sparkline-color branch February 6, 2025 12:46
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! enhancement This is not a bug, nor a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[charts][docs] Document sparkline color modification
3 participants