Skip to main content
100%

Bar Chart

✓ Published0🌍 Public
VVinay Vemuri
Last edited Jul 22, 2023
Created on Jul 22, 2023
Forked from Hello VizHub

This horizontal bar chart ranks the top 10 countries by diabetes cases, using a green bar length to encode the numeric value from a local CSV file. The chart applies a linear scale for case counts and a band scale for country names, with axes labeled accordingly. Built with D3 v5, the code loads data via `d3.csv`, sorts and slices it, and renders SVG rectangles using `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom`.

AI-generated description

Top 10 countries with high Diabetes data

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes