Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 6_Task 2

Public visualization

Viewing a saved revision (read-only)

c62eeeed913f457985ab97d2879a327c

Activity 6_Task 2

0 stars1🌍 Public
NNagalakshmi Thota
Last edited Nov 6, 2024
Created on Oct 22, 2024
Forked from Hello VizHub

This example visualizes IMDB movie ratings by genre, showing the distribution of ratings across five categories (from "below 5.0" to "above 8.5") as proportional horizontal bars. Using D3 v7, the code loads CSV data and employs `d3.stack()` to create stacked bar segments, with `d3.scaleOrdinal()` for color mapping and a tooltip that displays exact percentages on hover. The x-axis uses `d3.axisBottom()` with a linear scale, while the y-axis uses `d3.scaleBand()` for genre categories. The visualization is rendered as SVG with custom CSS styling for typography.

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.