{"version":"1.0","type":"rich","title":"[07] Gauge Chart - Using React Hooks with D3","description":"A gauge chart shows a single dynamic value as a two-part donut arc, with the current proportion displayed as a text label. The chart responds to controls that adjust, filter, or append to the data array. The code uses React hooks (`useRef`, `useEffect`) to manage the D3.js SVG rendering, with D3's `arc` and `pie` functions calculating the arc paths. Animated updates are handled via `transition.attrTween`, interpolating between previous and new arc data. The `d3.drag` API allows the user to horizontally drag a button to resize the container, triggering the gauge to update reactively.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/e0f2a7a7844e4592afbe7cf0e192b566?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}