activity 6_Q2
✓ Published0🌍 Public
This visualization shows the distribution of customer ratings across six cosmetic brands, using horizontal stacked bar charts to compare the proportion of ratings in five percentage ranges from below 5.0 to above 8.5. Each bar segment is colored by rating category, with a tooltip revealing the exact percentage for each brand and rating range on hover. The chart uses d3.stack() to compute the stacked data, d3.scaleLinear and d3.scaleBand for positioning, and d3.axisBottom with tick lines for the percentage scale. Data comes from a CSV file, rendered as SVG elements with mouseover events that adjust opacity and display tooltip information.
AI-generated descriptionMIT Licensed