activity6_Q2
✓ Published0🌍 Public
This example visualizes the distribution of product ratings across cosmetics brands. Each horizontal bar represents a brand, segmented into stacked, color-coded sections for rating percentages. The chart effectively compares the proportion of ratings falling into each category, such as below 5.0 or above 8.5, across brands. The visualization is built with D3.js v7, rendering to SVG. Data is loaded from a CSV file and processed using the `d3.stack` and `d3.scaleOrdinal` APIs. Interactivity includes a tooltip that displays a brand’s exact percentage for a rating category on hover, and axis labels and tick marks are customized.
AI-generated descriptionMIT Licensed