Viewing a saved revision (read-only)
c25f45d85b99468394d5d7fe90843871
Task 8 tutorial 2
This stacked bar chart displays the percentage of rating levels for different cosmetic brands, showing how ratings are distributed across categories like "below 5.0" and "above 8.5." The chart uses a horizontal layout where each brand has a single bar divided into colored segments representing rating proportions, with a tooltip revealing exact percentages on hover. Built with D3 v7, the visualization applies `d3.stack()` to process the CSV data, `d3.scaleLinear` and `d3.scaleBand` for axes, and `d3.scaleOrdinal` for color mapping. The SVG rendering includes interactive mouse events for tooltip display, and the code is sourced from a local CSV file.
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.