Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Week-6: In Class Exercise: Rendering Marks and Channels with React & D3

Public visualization

Viewing a saved revision (read-only)

cb31d9a9ac364f0b8ec2a97dbb943bec

Week-6: In Class Exercise: Rendering Marks and Channels with React & D3

0 stars0🌍 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 description

A whole smiley face