Skip to main content
100%

Horizontal category Barchart

✓ Published0🌍 Public
AAnimesh Nautiyal
Last edited May 26, 2021
Created on May 26, 2021

This horizontal category barchart displays percentages across demographic subgroups, with bars colored in translucent green and interactive tooltips revealing subgroup details on hover. The visualization uses React for component state management and D3.js v6’s `scaleLinear`, `axisLeft`, and `axisBottom` to map data values to bar lengths. Data comes from a local JSON file containing subgroup categories like Sex, Location, Caste, and Wealth Index. Tooltips are implemented as HTML divs positioned via D3’s selection interface. The chart renders as an SVG with a light gray axis grid, and bars animate in response to state changes from React’s `useEffect` hooks.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes