Skip to main content
100%

Activity6_Task2

✓ Published0🌍 Public
Mmaheshsachin1234@gmail.com
Last edited Mar 30, 2025
Created on Mar 29, 2025
Forked from Hello VizHub

This stacked bar chart displays how readers rate book genres across three categories (Excellent, Good, Average), with each genre represented by a horizontal bar segmented by rating proportions. The visualization uses D3.js (v7) with an SVG rendering approach, loading data from a CSV file containing genre ratings as percentages. The code employs `d3.stack()` with `stackOrderNone` and `stackOffsetNone` to build the segments, along with `d3.scaleLinear` for the percentage axis and `d3.scaleBand` for genre categories. Users can click any segment to see the exact rating percentage via an alert.

AI-generated description
MIT Licensed

Similar vizzes