Skip to main content
100%

Activity 6_Task 1 Question 1.2

✓ Published0🌍 Public
Gguttavenkata745@gmail.com
Last edited Oct 18, 2024
Created on Oct 18, 2024

This example displays a horizontal bar chart of the top 20 most populous countries in 2010, using a categorical y-axis for country names and a linear x-axis for population values. The visualization is built with React and D3 v5, where the `scaleBand` and `scaleLinear` functions handle axis scaling, while custom SVG components (`AxisBottom`, `AxisLeft`, and `Marks`) render ticks and rectangle bars. Data is loaded asynchronously from a remote CSV file via D3’s `csv` function, and tooltips are provided through SVG `<title>` elements. The chart includes styled axes, labels, and a title, with formatting that abbreviates large numbers (e.g., “B” for billions).

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