Skip to main content
100%

Activity7_task2

✓ Published0🌍 Public
HHemanthh81
Last edited Jul 2, 2023
Created on Jul 2, 2023
Forked from Hello VizHub

This example visualizes the distribution of movie ratings across different genres as a stacked horizontal bar chart. Each bar shows the proportional percentage of ratings within five categories, from "below 5.0" to "above 8.5," with interactivity highlighting segments and displaying exact percentages via a tooltip. The chart uses `d3.stack()` to compute stacked series and `d3.scaleOrdinal` with a custom color palette for the rating categories. Data is loaded from a CSV file using `d3.csv`, and the SVG rendering includes axes via `d3.axisBottom` and `d3.axisLeft`, plus a manually drawn legend.

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