Skip to main content
100%

Task8_Question2

✓ Published0🌍 Public
KKeerthi
Last edited Apr 11, 2024
Created on Apr 11, 2024
Forked from Hello VizHub

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 description

Cuisine Preferences in different cities

This stacked bar chart gives the percentage distribution of cuisine preferences in different cities.

MIT Licensed

Similar vizzes