Activity_6_2
✓ Published1🌍 Public
This example shows the distribution of movie ratings across genres as a horizontal stacked bar chart. The chart displays the percentage of films falling into five rating categories, from "below 5.0" to "above 8.5", with each genre as a separate bar. The visualization uses D3 v7 APIs including `d3.scaleLinear` for the x-axis, `d3.scaleBand` for the y-axis, `d3.stack` for data processing, and `d3.scaleOrdinal` for color mapping. The code loads data from a local CSV file and renders the chart as SVG with interactive tooltips that display the exact percentage on hover.
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