[charts] Explanation of tooltip value formatting #12442
Labels
docs
Improvements or additions to the documentation
enhancement
This is not a bug, nor a new feature
recipe
support: docs-feedback
Feedback from documentation page
Related page
https://next.mui.com/x/react-charts/tooltip/
Kind of issue
Missing information
Issue description
Use case:
I have a chart, and I have axis values, and I want to embellish those values in the tooltip, which seems like a pretty common use case. I achieved this via
axisContent.axis
inslotProps
.Example sandbox here
Screenshot
Issue:
What I haven't seen is any information in the docs explaining how to do exactly this, or even if the approach in the sandbox example is correct (As an aside, I get a type error when doing this in my dev env, and the object it expects for the axis seems incorrectly typed). The information around overriding/customizing tooltips in general is pretty opaque, but I'm pretty certain this is a very common use case.
I think a simple demo around this and some docs would be really helpful.
Context
Add a documentation snippet for customizing/embellishing axis content in the tooltip in MUI Chart Tooltip docs without overriding the whole tooltip component, ALA Sandbox
Search keywords: charts tooltip
The text was updated successfully, but these errors were encountered: