Sale Sample Data
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.