Skip to main content
100%

Assignment2-Task2

✓ Published0🌍 Public
Rrikhitakoganti12
Last edited Jul 21, 2023
Created on Jul 16, 2023

This stacked bar chart compares the counts of ten fast-food and coffee chains across ten cities in the Dallas area, with each bar segment representing a specific brand's store count per city. The chart uses a horizontal layout, with cities on the y-axis and a linear count scale on the x-axis. The visualization is built with D3.js, using `scaleBand` and `scaleLinear` for axes, `d3.stack()` to aggregate the categorical data, and `scaleOrdinal` with a custom color array for series differentiation. SVG rectangles render the bars, and mouse events trigger a custom tooltip that displays the precise store count for each segment. Interactive highlighting is achieved by adjusting rectangle opacity on hover, while a legend and axis labels clarify the data.

AI-generated description
MIT Licensed

Similar vizzes