ICE-6: Rendering Marks and Channels with React & D3
✓ Published0🌍 Public
Ggeethikal
Last edited Mar 11, 2023
Created on Mar 11, 2023
This visualization shows the ages of the world’s top 10 richest people as horizontal bars on an SVG chart, using a React component that loads CSV data from a GitHub gist. The code uses `d3.csv`, `d3.scaleBand`, `d3.scaleLinear`, and `d3.max` to map names to y-positions and ages to bar widths, with manually drawn axes via `xScale.ticks()` and `yScale.domain()`. React’s `useState` and `useEffect` manage the asynchronous data loading, while D3 v5’s selection and scale APIs render the marks directly in the JSX.
AI-generated descriptionA bare minimum HTML page.
MIT Licensed