Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Activity6_Task2

Public visualization

Activity6_Task2

0 stars0๐ŸŒ 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

Comments

Sign in to join the discussion.

MIT Licensed