Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of ICE-6: Rendering Marks and Channels with React & D3

Public visualization

Viewing a saved revision (read-only)

2d52b481d9464420bd55b512aa1f0764

Fork of ICE-6: Rendering Marks and Channels with React & D3

0 stars0🌍 Public
Bblikitha
Last edited Mar 7, 2022
Created on Mar 7, 2022

This visualization displays the population of 20 cities in Andhra Pradesh as a horizontal bar chart rendered in SVG using React and D3. The code imports specific D3 functions including `scaleBand`, `scaleLinear`, and `max` via ES modules, while also using React hooks like `useState` and `useEffect` to load data asynchronously from a CSV file fetched with `d3.csv`. The bar chart encodes city names on the y-axis and population values on the x-axis, with gridlines and axis ticks generated manually through D3 scales. A "Loading..." message appears until the dataset is fully parsed.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.