Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6_Task2

Public visualization

Viewing a saved revision (read-only)

c72735497a6a4117bd4889b3e7b60baf

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