Viewing a saved revision (read-only)
2a180330bdc444fda115b49ac82eb642
TASK.8_QUESTION-2_Sahith
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 descriptionThe impact of genre on movie ratings
This stacked bar chart gives the percentage of each rating level within different movie genres. The aim is to show the impact of genre on movie ratings. When the mouse hovers over each bar, you can see pop-ups of accurate percentage of each rating level within each genre. Total percentage is 1, representing 100%.