🌍 Public
Viewing a saved revision (read-only)
cb830e81c7f247f3aa569a51196dc345
Tutorial 2
This example shows the distribution of IMDb ratings across six movie genres, breaking down each genre into five rating categories as stacked proportions. The chart uses d3.stack() to compute cumulative values and d3.scaleBand for the genres, with d3.scaleOrdinal mapping categories to colors. Hovering over a segment triggers a tooltip that displays the exact percentage, and the code relies on d3.axisBottom and d3.axisLeft for axes, with data loaded 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.