Skip to main content
100%

activity6_Question2

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

This example shows a horizontal stacked bar chart comparing the percentage of movie ratings across different genres. Each genre (banana, poacee, sorgho, triticum) is a row, and each colored segment represents a rating category's proportion. The chart uses D3 v7's `scaleBand` for the y-axis, `scaleLinear` for the x-axis, and `stack()` to create the stacked segments from the CSV data. Hovering over a segment uses a custom tooltip to display the exact percentage for that genre and rating category.

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