Skip to main content
100%

task-8(1.2)

✓ Published0🌍 Public
DDivyaKota2@my.unt.edu
Last edited Apr 14, 2024
Created on Apr 14, 2024

This example displays a horizontal bar chart of the top 10 countries by population in 2010, sorted along the y-axis with bars proportional to population values. It uses React with D3 v5’s `scaleBand`, `scaleLinear`, `max`, and `format` APIs to compute scales and tick labels, rendering SVG elements via reusable components like `AxisBottom`, `AxisLeft`, and `Marks`. Data loads asynchronously from a CSV URL using `d3.csv`, and each bar includes a native SVG `<title>` tooltip showing the formatted population.

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