Week-6: In Class Exercise: Rendering Marks and Channels with React & D3
✓ Published0🌍 Public
Bbindusreeja
Last edited Jun 26, 2022
Created on Jun 25, 2022
A horizontal bar chart displays carbon dioxide emissions in thousand metric tonnes for ten states during 2019 electricity generation, sourced from a CSV file via `d3.csv`. Built with React and D3 v5, it renders SVG rectangles using `scaleBand` for the y-axis states and `scaleLinear` for the x-axis emission values, with custom tick marks and labels. The chart’s axes and bars are generated declaratively through React’s `map` over the data array, while D3’s `max` and scale functions handle the domain calculations.
AI-generated descriptionA whole smiley face
MIT Licensed