Skip to main content
100%

Assignment2Question2

✓ Published1🌍 Public
Gganesh.hns48@gmail.com
Last edited Apr 8, 2024
Created on Apr 8, 2024

This D3.js v7 example creates an SVG area chart that visualizes monthly sales data for two products during 2022. The chart displays values from the embedded data array, with product1 and product2 each shown as filled areas using `d3.area()` and a categorical color scale via `d3.scaleOrdinal` with `d3.schemeCategory10`. A legend is generated using D3’s selection API to map colors to product names, while axes are created with `d3.axisBottom` and `d3.axisLeft`, and data is scaled using `d3.scaleBand` and `d3.scaleLinear`.

AI-generated description
MIT Licensed

Similar vizzes