mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!

Home Page:https://mui.com/x/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[charts] Setting baseline for Area Chart

wildcat-cs opened this issue · comments

The problem in depth

I am trying to create an area chart that has a configurable baseline below 0 such that everything above the configured baseline will be shaded in as part of the "area". I've searched the documentation and cannot find any way to set the baseline.

Your environment

Search keywords: Area Chart baseline
Order ID: 85440

@JCQuintas can you take a look at this please?
Can we handle this as a feature request or maybe provide a workaround with combined charts?

Yup this seems to be a bug 😅

Hum, maybe it is a feature request instead. Having negative values is supposed to show something like:

Screenshot 2024-08-09 at 13 44 16

So we should probably add a baseline prop instead to control this. 🤔

Want to thank you both for getting on this so quickly. And agree it's a feature not a bug, but I think a very useful feature in a few certain cases.

Thanks again.

⚠️ 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.

@wildcat-cs: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.