Fork of ICE-6: Rendering Marks and Channels with React & D3
✓ Published0🌍 Public
This example visualizes the number of books written by nine popular novelists using a horizontal bar chart. It loads data from a CSV file and renders the chart with React components, while D3’s `scaleBand` and `scaleLinear` compute the bar positions and sizes. The code uses React’s `useState` and `useEffect` hooks to fetch the data asynchronously, then maps the loaded values to SVG `<rect>` marks and axis tick labels drawn with `<line>` and `<text>` elements. D3’s `d3.csv` handles parsing, and the chart is rendered inside an SVG container.
AI-generated descriptionA demonstration of how to start using D3 version 6.
MIT Licensed