Fork of ICE-6: Rendering Marks and Channels with React & D3
✓ Published1🌍 Public
KKolliTeja
Last edited Mar 6, 2022
Created on Mar 6, 2022
This example shows a horizontal bar chart of the top 20 countries by COVID-19 cases, using data from a CSV file loaded via `d3.csv`. The visualization maps country names to the y-axis with `d3.scaleBand` and case counts to the x-axis with `d3.scaleLinear`, rendering blue bars as SVG `<rect>` elements. The React component manages state with `useState` and `useEffect`, while D3 handles scaling and tick generation for both axes. The code demonstrates a hybrid approach where React renders marks and channels, and D3 provides the underlying scales and data processing.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed