-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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] Can we have horizontal Gauge Chart? #13084
Comments
Seems like a nice to have. But I'm concerned by your example. A gauge is assumed to show one value that can evolve into a fixed range. In your screenshot, the range is respected (from 0 to 100) but it displays 3 values. For me this looks like a hack based on an horizontal bar chart with a special component displaying the current value. Here is an example about how to do it https://codesandbox.io/p/sandbox/nifty-wilbur-65mnhr?file=%2Fsrc%2FDemo.js%3A23%2C37 |
Thanks for this. This hack worked with my use cases. This is link to what worked https://stackblitz.com/edit/react-zitvgz-beeo2y?file=Demo.js However, I am now trying to achieve a responsive chart using same code and I am facing a challenge. I have tried adding ResponsiveChartContainer but my solution has not worked. https://stackblitz.com/edit/react-w8kgna-fz7kdz?file=Demo.js Anything that I am missing? |
It's because with composition your series need a https://stackblitz.com/edit/react-w8kgna-8ihauf?file=Demo.js |
Now it works fine for all use cases. Thanks |
@alexfauquette Is there a way I can add a custom Tooltip to this kind of chart? https://stackblitz.com/edit/react-hrg6hu?file=Demo.js |
Yes you can. The props of the item content gives you From Here is the demo https://stackblitz.com/edit/react-hrg6hu-nyfuf7?file=Demo.js |
Steps to reproduce
Link to live example: (required)
https://mui.com/x/react-charts/gauge/#system-CompositionExample.js
Steps:
Note: I am looking for a similar gauge that can show the value but in a straight line.
Current behavior
Currently, all the existing gauge charts are circular. I am looking for a horizontal one.
Expected behavior
I am expecting a gauge that looks like the attached image.
Context
I am trying to have a similar horizontal gauge chart that can be used to show a point with a marker for a value, but on a horizontal bar. It is currently impossible for me to get a horizontal gauge from the existing circular ones.
Your environment
npx @mui/envinfo
Search keywords: gauge charts muix charts
The text was updated successfully, but these errors were encountered: