Skip to main content
100%

Activity_6_2

✓ Published1🌍 Public
Ppradeepgubbala2001@gmail.com
Last edited Oct 24, 2024
Created on Oct 24, 2024

This example shows the distribution of movie ratings across genres as a horizontal stacked bar chart. The chart displays the percentage of films falling into five rating categories, from "below 5.0" to "above 8.5", with each genre as a separate bar. The visualization uses D3 v7 APIs including `d3.scaleLinear` for the x-axis, `d3.scaleBand` for the y-axis, `d3.stack` for data processing, and `d3.scaleOrdinal` for color mapping. The code loads data from a local CSV file and renders the chart as SVG with interactive tooltips that display the exact percentage on hover.

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