Skip to main content
100%

Histogram Using D3

✓ Published2🌍 Public
Eethanrampersaud@gmail.com
Last edited Aug 11, 2025
Created on Aug 11, 2025
Forked from HTML Starter

This example shows a histogram of numeric price data loaded from a CSV file, rendered as an SVG bar chart using D3 v4. It uses `d3.histogram()` to bin the values into 70 thresholds, `d3.scaleLinear()` for both the x- and y-axes, and `d3.axisBottom()` and `d3.axisLeft()` to draw the axes. Each bin is drawn as a rectangle whose width and height are derived from the bin’s x0/x1 domain and the count of records in that bin. The data comes from a remote GitHub-hosted CSV, and bars are styled with a fixed fill color.

AI-generated description

NOTE: This document was derived from code from the below link:

https://d3-graph-gallery.com/histogram.html

MIT Licensed

Similar vizzes