Skip to main content
100%

TASK.8_QUESTION-2_Sahith

✓ Published0🌍 Public
Mmanisahiths54321@gmail.com
Last edited Apr 11, 2024
Created on Apr 11, 2024
Forked from Activity6_Task_2

This example shows a stacked bar chart comparing monthly sales across three products, ProductA, ProductB, and ProductC, using a small dataset loaded from a local CSV file. The chart is rendered as an SVG using D3.js v7, where each bar segment is colored with `d3.scaleOrdinal` and the stacking layout is computed with `d3.stack`. Axes are drawn via `d3.axisBottom` and `d3.axisLeft`, while the vertical scale uses `d3.scaleLinear` and the horizontal scale uses `d3.scaleBand`. Total values are calculated for each month to set the y-axis domain.

AI-generated description
MIT Licensed

Similar vizzes