Activity6_Question2
✓ Published0🌍 Public
This example visualizes mobile phone sales data from a CSV file as a horizontal stacked bar chart, displaying yearly sales figures for Apple, Samsung, Motorola, and Google. The chart uses D3.js v7 to load data, apply sequential color scales, and render the SVG with axis labels and a tooltip that reveals specific sales values on hover. The code demonstrates importing D3 via UNPKG, using utility functions like `d3.stack()` and `d3.scaleBand()`, and structuring chart elements with an SVG canvas.
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