Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Question-2_Task-2

Public visualization

Viewing a saved revision (read-only)

5db724871742463389eebb3ab751de50

Question-2_Task-2

0 stars0🌍 Public
Rrahul.bonu524@gmail.com
Last edited Oct 19, 2024
Created on Oct 19, 2024
Forked from Question-2_Task-2

This stacked bar chart shows the distribution of movie ratings across six genres, with each bar segment representing the percentage of films falling into one of five rating categories. The visualization uses a horizontal stacked bar layout, where hovering over a segment displays the exact percentage via a tooltip. The chart is built with D3 v7, using `d3.stack()` to create the stacked data structure and `d3.scaleOrdinal()` for color encoding. SVG rectangles are rendered for each segment, with `d3.axisBottom()` and `d3.axisLeft()` providing the axes. The dataset is loaded from a CSV file containing genre and rating percentage columns.

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.