Skip to main content
100%

Activity-6_Task2

✓ Published0🌍 Public
1180030215cse@gmail.com
Last edited Oct 21, 2024
Created on Oct 21, 2024
Forked from Hello VizHub

This example presents a stacked horizontal bar chart of movie genres, comparing metrics like movie count, average rating, box office revenue, and awards won. The D3 v7 code loads data from a CSV file and uses `d3.stack()` to aggregate the numeric columns, with genres mapped to the y-axis using `d3.scaleBand()` and values positioned via a linear x-scale. Interactive tooltips appear on hover, and a legend identifies each color-coded metric. The visualization is rendered as SVG within a 960-by-500 canvas, using scales like `d3.scaleOrdinal()` for color assignment and `d3.axisBottom()` for the axes.

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