Skip to main content
100%

Activity 6_Task 1 (Q1.1)

✓ Published0🌍 Public
Jjahnavigummadi@my.unt.edu
Last edited Oct 18, 2024
Created on Oct 18, 2024
Forked from Hello VizHub

This example shows a horizontal bar chart comparing the population of ten countries in the year 2000, using a dataset loaded from a GitHub-hosted CSV file. The React application renders the chart as an SVG, with rectangular bars scaled by population values on a linear axis and country names positioned on a band axis. The code imports `scaleLinear`, `scaleBand`, `axisBottom`, and `axisLeft` from the D3 v5 library, leveraging React's `useRef` and `useEffect` hooks to attach the axes to the SVG elements.

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