Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Sale Sample Data

Public visualization

Viewing a saved revision (read-only)

111a4481937a41bfa348d626c4fe5021

Sale Sample Data

0 stars1🌍 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