Skip to main content
100%

Line Chart for sales

✓ Published0🌍 Public
Ssreeramyamini@gmail.com
Last edited Mar 28, 2024
Created on Mar 28, 2024
Forked from ICE-7 Line Chart

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 description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes