๐ Public
activity8-task2
A stacked bar chart displays cereal ratings by ingredient percentage, with each bar segmented into sugars, vitamins, and rating contributions. The chart uses D3 v7's `stack`, `scaleLinear`, `scaleBand`, and `axisBottom` APIs to construct the SVG visualization. Hover interactions reveal precise percentages via a tooltip. The categorical data comes from a CSV file listing cereal names and their nutritional values.
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.