🌍 Public
Viewing a saved revision (read-only)
8f3e51d7a08145f38850a6cdfe6fa9dc
Tutorial2
This stacked bar chart visualizes the distribution of movie ratings across six genres, showing the percentage of films within each rating category. The chart uses horizontal bars for each genre, segmented by rating levels from "below 5.0" to "above 8.5," with a color scale distinguishing the categories. Hovering over a segment reveals the exact percentage via a tooltip. Built with d3.v7, the visualization uses `d3.stack`, `d3.scaleBand`, and `d3.scaleLinear` to compute and render the stacked geometry, while `d3.axisBottom` and `d3.axisLeft` generate the axes, and the data is drawn as SVG rectangles.
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.