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][docs] Document sparkline color modification #11707

Closed
alexfauquette opened this issue Jan 16, 2024 · 4 comments · Fixed by #16477
Closed

[charts][docs] Document sparkline color modification #11707

alexfauquette opened this issue Jan 16, 2024 · 4 comments · Fixed by #16477
Assignees
Labels
component: charts This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation

Comments

@alexfauquette
Copy link
Member

alexfauquette commented Jan 16, 2024

Feedback received:

how to change line chart color?

from https://mui.com/x/react-charts/sparkline/#

Search keywords:

@alexfauquette alexfauquette added the component: charts This is the name of the generic UI component, not the React module! label Jan 16, 2024
@alexfauquette alexfauquette added the docs Improvements or additions to the documentation label Feb 2, 2024
@alexfauquette alexfauquette changed the title [charts][docs] Answer user feedback [charts][docs] Document sparkline color modification Feb 26, 2024
@alexfauquette
Copy link
Member Author

Posiible options:

@bernardobelchior
Copy link
Member

Given that using the colors prop is possible, does it make sense to also have a color prop? It seems that it would allow us to achieve the same result through two different paths.

From my investigation, it seems the colors prop makes sense in the context of non-sparkline charts because they can have more than one series. However, since sparkline only supports a single series, does it make sense to allow a colors prop at all?

My suggestion would be adding a color prop, but remove (or at least deprecate) the colors prop to ensure there is no confusion. What are your thoughts? Is there any downside that I might be missing?

@alexfauquette
Copy link
Member Author

The proposal looks good. We can start by deprecating. having both is not a big issue.

To deprecate a props in the TypeScript JSDocs you can add @deprecated you will find other example in the codebase

Copy link

github-actions bot commented Feb 6, 2025

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

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! docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants