Skip to main content
100%

Activity6_Question2 Khushi

✓ Published0🌍 Public
KKhushi Desai
Last edited Oct 19, 2024
Created on Oct 19, 2024
Forked from Activity6_Task1

This bar chart displays the population of 20 countries in 2010, sorted by country name along the vertical axis with horizontal bars indicating population size. The visualization uses React with D3 v5 to load CSV data from GitHub, scale bands and linear scales to position marks, and SVG rectangles for rendering. The code imports d3.csv, scaleBand, scaleLinear, max, and format from the D3 library, while custom Axis components generate tick marks and labels. Population values are formatted using the SI prefix notation, converting gigabytes to billions via the xAxisTickFormat function.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes