Skip to main content
100%

Activity 6_Task-2_Question_2

✓ Published0🌍 Public
Rrajkodavati7@gmail.com
Last edited Apr 15, 2024
Created on Apr 14, 2024
Forked from Hello VizHub

This example visualizes the distribution of viewership ratings across five sports, using a horizontal stacked bar chart where each bar segment represents the proportion of viewers in a rating category (e.g., "Below 5.0", "5.0-6.5"). The chart, rendered with D3.js v7, employs a band scale for the y-axis and a linear scale for the x-axis. The code builds the stacked bars using `d3.stack` and `d3.scaleOrdinal` for color mapping, with interactive tooltips showing exact percentages on hover. Data is loaded from a static CSV file.

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