Skip to main content
100%

Sale Sample Data

✓ Published1🌍 Public
RRamdas Dheeraj
Last edited Oct 19, 2025
Created on Oct 17, 2025
Forked from HTML Starter

This example presents a dark-themed bar chart titled “Sales by Product Line,” aggregating sales data from a CSV file fetched from a GitHub gist. It uses d3.js v7 APIs including `d3.csv`, `d3.rollups`, `d3.scaleBand`, `d3.scaleLinear`, and `d3.scaleOrdinal` to group records by product line, sum their sales, sort descending, and encode values as bar heights with a Tableau10 color scheme. The SVG rendering includes rotated x-axis labels, horizontal grid lines, axis titles, and a legend, all styled via CSS custom properties.

AI-generated description
MIT Licensed

Similar vizzes