Fork of Fork of ICE-6: Rendering Marks and Channels with React & D3
✓ Published1🌍 Public
TTharun2022
Last edited Mar 4, 2022
Created on Mar 4, 2022
This example presents a horizontal bar chart ranking the top 10 most populous countries in 2019, loaded from a CSV file using d3.csv. The React component renders SVG marks (rectangles) whose widths and positions are scaled by d3.scaleLinear and d3.scaleBand, with custom tick labels and gridlines drawn manually. The code uses React hooks like useState and useEffect to manage asynchronous data loading, and d3.scaleLinear, d3.scaleBand, d3.max, and d3.format for scales and formatting.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed