Skip to main content
100%

task2

✓ Published1🌍 Public
Yyashwanthkirla95@gmail.com
Last edited Apr 11, 2024
Created on Apr 11, 2024
Forked from Hello VizHub

This example presents a stacked horizontal bar chart titled "Most viewed sports," visualizing the percentage distribution of ratings across six sports (Football, Basketball, Cricket, Tennis, Golf, Athletics) using five rating categories from a CSV file. The chart uses `d3.scaleOrdinal` for color mapping and `d3.scaleBand` for the category axis, with `d3.stack` to aggregate the percentage data. Interactive tooltips display exact percentage values on mouseover, and the SVG rendering employs `d3.axisBottom` for the x-axis and custom styling from CSS.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes