Q2
✓ Published0🌍 Public
This example shows the distribution of IMDb movie ratings across five genres using a stacked horizontal bar chart. Each genre displays the proportion of movies falling into rating brackets from "Below 5.0" to "Above 8.5". The visualization uses D3 v7’s `d3.stack()` to create the stacked data and `d3.scaleOrdinal` with a custom color palette. Mouse interactions trigger tooltips that reveal the exact percentage for each rating segment. The chart renders as SVG with axes generated by `d3.axisBottom` and `d3.axisLeft`, loading data from a local CSV file.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed