🌍 Public
Viewing a saved revision (read-only)
c1facb3166ac438faa8f195b3f35a172
Line Chart for sales
This line chart visualizes total sales across product categories, with the y-axis representing sales figures and the x-axis categorizing products. The chart uses D3.js v7, loading CSV data from a GitHub gist. The code converts string sales values to numbers, defines an SVG canvas, and constructs scales with `d3.scaleBand` and `d3.scaleLinear`. It renders axes via `d3.axisBottom` and `d3.axisLeft`, and draws the line using D3's `d3.line` generator, styled with a steelblue stroke. The SVG output includes labels for both axes.
AI-generated descriptionA demonstration of how to start using D3 version 6.