Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

question2(task-1)

Public visualization

Viewing a saved revision (read-only)

49db5f5769624a0dbcfd250bd3cfe5d9

question2(task-1)

0 stars0🌍 Public
MMahimaChowdaryKasthala@my.unt.edu
Last edited Mar 31, 2025
Created on Mar 31, 2025
Forked from Hello VizHub

This horizontal bar chart displays the populations of 20 countries in 2010, with each bar labeled by country name and population value, sorted in descending order from China to France. The visualization uses D3.js v7 with an SVG rendering approach, employing `d3.scaleLinear` for the x-axis population scale and `d3.scaleBand` for the categorical y-axis of country names. The code draws axis ticks via `d3.axisLeft` and `d3.axisBottom`, formats population labels with `d3.format('.2s')`, and includes hover effects that change bar colors through CSS.

AI-generated description