๐ Public
Fork of Fork of Hello VizHub
This example demonstrates a stacked bar chart that visualizes monthly fruit quantities for apples, bananas, and oranges from a CSV dataset. The chart renders as an SVG, using D3 v6 to load the data, stack the series with `d3.stack`, and draw the bars with scales for positioning. A categorical color scale maps each fruit to a distinct color, and a legend is manually appended to identify the categories. The bar heights and positions are computed from the stacked values, with axis margins defining the chart layout.
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
Comments
Sign in to join the discussion.