Skip to main content
100%

Activity6_Question2

✓ Published0🌍 Public
Ggreeshmareddy135@gmail.com
Last edited Apr 6, 2024
Created on Apr 4, 2024

This stacked bar chart displays the distribution of chocolate ratings across five brands, showing the proportion of ratings in five percentage-based categories from “below 5.0” to “above 8.5.” The code uses d3.stack() to generate the stacked series and d3.scaleOrdinal for color mapping, with d3.axisBottom and d3.axisLeft for axes. Interactive tooltips appear on mouseover, showing the exact percentage per rating category. The data comes from a local CSV file loaded with d3.csv, and the visualization is rendered as SVG with a linear x-scale for percentages and a band scale for categories.

AI-generated description
MIT Licensed

Similar vizzes