Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity-6_Question-2

Public visualization

Viewing a saved revision (read-only)

08ed4d6598eb45a5b1507ce74df463d8

Activity-6_Question-2

0 stars0🌍 Public
Ccharanshiva769@gmail.com
Last edited Oct 22, 2024
Created on Oct 22, 2024
Forked from D3 Starter

This stacked bar chart displays the distribution of fruit ratings across five sweetness categories, from "below 5.0" to "above 8.5", with each fruit represented as a horizontal bar segmented by rating percentage. The visualization uses d3.stack() to compute cumulative values, d3.scaleBand() for the categorical y-axis, and d3.scaleLinear() for the percentage x-axis. Interactive tooltips reveal the exact percentage for each rating segment on mouseover, while an ordinal color scale assigns distinct hues to each category.

AI-generated description

A demonstration of how to start using D3 version 6.