Radial Gauge Chart (Speedometer)
Responsive half-circle speedometer gauge for KPI monitoring. Dynamic needle, colored health zones, and score toggles.
◆Centering Responsive Speedometer Gauges
Use cx='50%' and cy='80%' on <Pie> so the half-circle gauge centers dynamically regardless of card width on mobile and desktop viewports.
<Pie dataKey="value" startAngle={180} endAngle={0} data={data} cx="50%" cy="80%" innerRadius={90} outerRadius={135} stroke="none" />A Radial Gauge Chart (Speedometer) is ideal for developers and designers who need to display data clearly and effectively. Use this chart type when:
- ✓Displaying a single KPI value against a target (e.g. 78% of goal)
- ✓Performance scores and health metrics
- ✓Real-time monitoring dashboards
- ✓Showing progress toward a goal in a compact format
How do you set up performance thresholds in a radial gauge chart?
Segment the data array into qualitative bands (e.g. Critical 25%, Fair 25%, Good 25%, Optimal 25%) and apply distinct colors (#ff6b6b, #ffd166, #4a9eff, #00e5a0) via <Cell> components.
How do you center and animate a needle in Recharts?
Set cx='50%' and cy='80%' on both the track Pie and the needle Pie component. Pass the active metric score into a trigonometric function that rotates the SVG needle path between 180 degrees (0%) and 0 degrees (100%).