Fork of ICE-6: Rendering Marks and Channels with React & D3
✓ Published1🌍 Public
SSaiipriiya
Last edited Mar 4, 2023
Created on Mar 4, 2023
This example displays a bar chart of office supply sales data for fifteen countries, with economic cost on the x-axis and country names on the y-axis. It combines React hooks (`useState`, `useEffect`) for data loading and D3 v5 utilities `csv`, `scaleBand`, and `scaleLinear` to fetch and scale the data, rendering bars and axis ticks as SVG elements. The visualization uses React’s declarative rendering to generate each rectangle and text label, with axes drawn manually via `scale.ticks()` and gridlines.
AI-generated descriptionA bare minimum HTML page.
MIT Licensed