🌍 Public
Viewing a saved revision (read-only)
18b920d7cfee4ad9a286d41a45e0ca2e
Activity6_Task2
This stacked bar chart visualizes the distribution of sales percentages across four regions for five fruit products, using data from a CSV file. Each horizontal bar is segmented by region, with colors corresponding to a categorical color scale, and the x-axis measures percentage from 0 to 1. The visualization uses `d3.axisBottom`, `d3.axisLeft`, and `d3.scaleOrdinal` to render the axes and color encoding. Hovering over a segment triggers a tooltip that displays the precise sales percentage for that fruit and region, calculated via `d3.format`. The chart is rendered as an SVG using D3 v7.
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.