Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 Bar Chart

Public visualization

D3 Bar Chart

0 stars2🌍 Public
Mmariahdiaz
Last edited Nov 1, 2022
Created on Sep 18, 2022
Forked from D3 Starter

This example visualizes natural gas consumption by the electric power sector across eleven U.S. states, using a horizontal bar chart where each bar’s length encodes the consumption value in billion BTU. The chart is built with D3.js (v7) and rendered as SVG, using `d3.csv` for data loading, `d3.scaleLinear` for the x-axis, `d3.scaleBand` for the y-axis, and `d3.axisLeft`/`d3.axisBottom` for tick marks. Each bar is labeled with its exact value, and the plot includes a title and axis labels. The data comes from the included `data.csv` file.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed