🌍 Public
Viewing a saved revision (read-only)
d9cc023d7a8649d498d426758f7a4d8e
Activity-6_Question-2
This stacked bar chart displays the distribution of fruit ratings across five sweetness categories, from "below 5.0" to "above 8.5", with each fruit represented as a horizontal bar segmented by rating percentage. The visualization uses d3.stack() to compute cumulative values, d3.scaleBand() for the categorical y-axis, and d3.scaleLinear() for the percentage x-axis. Interactive tooltips reveal the exact percentage for each rating segment on mouseover, while an ordinal color scale assigns distinct hues to each category.
AI-generated descriptionA demonstration of how to start using D3 version 6.