Skip to main content
100%

Question 2 activity 6

✓ Published0🌍 Public
Sskykarthik97@gmail.com
Last edited Apr 11, 2024
Created on Apr 11, 2024
Forked from Hello VizHub

A stacked bar chart displays product ratings across three categories: low, moderate, and excellent, using percentage proportions loaded from a local CSV file. D3 v7’s `d3.stack` and `scaleOrdinal` assign colors to rating segments, while `scaleBand` positions products on the y-axis and `scaleLinear` maps proportions to bar widths. Interactive tooltips appear on mouseover, showing formatted percentage values for each rating type. The SVG renderer applies axes with gridlines, a title, and axis labels, styled via external CSS.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes