Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bar Chart

Public visualization

Viewing a saved revision (read-only)

211beed8b1f74b2ea583c36c73ef595c

Bar Chart

0 stars0🌍 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.