Activity6-Question2
✓ Published0🌍 Public
This example displays a horizontal stacked bar chart comparing the ratings distribution (below 5.0 to above 8.5) across music streaming platforms like Spotify, YouTube, and Apple. The contoured bars use a gradient-filled legend, and hovering over a segment reveals the exact percentage via a tooltip. The code uses D3 v7’s `scaleLinear`, `scaleBand`, `scaleOrdinal`, and `stack` APIs to process the CSV data and render the chart as SVG.
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