Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of ICE-6: Rendering Marks and Channels (Bar Chart)

Public visualization

Fork of ICE-6: Rendering Marks and Channels (Bar Chart)

0 stars0🌍 Public
Mmanishcheruku
Last edited Mar 11, 2023
Created on Mar 11, 2023

This visualization displays a horizontal bar chart of 2022 population figures for the top three countries from a CSV file, using React to render SVG elements and D3 scales for positioning. The code defines a band scale for country names on the y-axis and a linear scale for population values on the x-axis, with purple grid lines and tick labels generated via `d3.scaleBand`, `d3.scaleLinear`, and `d3.max`. Bars are drawn as `<rect>` elements with widths proportional to population, and the data is loaded asynchronously using `d3.csv`. The chart is rendered inside a React component using `ReactDOM.render`.

AI-generated description

A bare minimum HTML page.

Comments

Sign in to join the discussion.

MIT Licensed