Skip to main content
100%

Bar Chart

✓ Published0🌍 Public
Ppjdhungana@gmail.com
Last edited Jul 14, 2023
Created on Jul 14, 2023
Forked from Hello VizHub

This example displays a horizontal bar chart of weapon exporter values by country for 2017. The React component uses D3’s `scaleBand` and `scaleLinear` to map country names and numeric values to pixel positions, rendering each bar as an SVG `rect`. Data is loaded asynchronously from a CSV file via `d3.csv` and parsed with unary plus. The chart is styled with CSS classes, and margins define the layout within the SVG canvas.

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