Skip to main content
100%

Activity6_Task1

✓ Published0🌍 Public
AAreeba Hassan
Last edited Oct 22, 2024
Created on Oct 22, 2024

This bar chart shows the population of ten countries in the year 2000, ranked and scaled by count. Built with React and D3 v5, it uses SVG rendering with `scaleBand` for the categorical y-axis and `scaleLinear` for the numeric x-axis. The code imports D3 functions like `csv`, `scaleBand`, `scaleLinear`, `max`, and `format` to load and process data from a GitHub-hosted CSV. Custom axis and mark components render rectangles with tooltips, and the x-axis labels are formatted using SI prefixes, converting 'G' to 'B' for billions. The chart includes styled ticks, a light green fill for bars, and a Poppins font.

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