-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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] Show reference colors in the gauge chart #13785
Comments
To add to this, I know I'm able to change the referenceArc color, so I'm wondering if I can conditionally set a fill color based on the position of the value arc? E.g. if arc is positioned between 75 - 100 fill with red.
|
I'm not sure about what you want to create
Yes, the code you provided is good. You just need to replace the https://codesandbox.io/p/sandbox/fragrant-microservice-zhnk9c?file=%2Fsrc%2FDemo.tsx%3A6%2C17 If you want to show the entire color mapping, it's not yet feasible. For the we would need to add the new colorMap threshold in the Gauge. I was hopping to do it with some gradients, but unfortunately the conic gradients are not yet available with SVG |
@alexfauquette we can always try with a foreignObject 😅 |
I want to create a gauge similar to the one on the right hand side of the image I provided in my first comment. Essentially to show multiple colours in the reference arc. But I'm not sure it's quite possible yet. |
It is my quick implementation if anyone needs it: https://codesandbox.io/p/sandbox/flamboyant-ganguly-hwnv6t?file=%2Fsrc%2Findex.tsx |
The problem in depth
I need a way to color my gauge. See the attached image, the gauge on the right. Is it possible to do something like this? With multiple colors.
Your environment
`npx @mui/envinfo`
Benchmarks
Search keywords: Gauge colors
Order ID:
The text was updated successfully, but these errors were encountered: