Task8_Question2
✓ Published0🌍 Public
This stacked bar chart shows the percentage distribution of cuisine preferences across five cities: Cambridge, Somerville, Newton, Quincy, and Salem. It uses d3.stack() to compute the stacked series and d3.scaleBand with d3.scaleLinear for the y- and x-axes, respectively. The SVG rendering includes interactive tooltips on mouseover that display the exact percentage for each cuisine segment, using d3.select and event handlers. Color encoding relies on d3.schemeCategory10 via d3.scaleOrdinal, with a legend positioned to the right of the chart.
AI-generated descriptionCuisine Preferences in different cities
This stacked bar chart gives the percentage distribution of cuisine preferences in different cities.
MIT Licensed