Skip to main content
100%

hii

✓ Published0🌍 Public
SSupriya Ravilla
Last edited Apr 12, 2024
Created on Apr 12, 2024

This example visualizes the distribution of movie ratings across five intervals, from “below 5.0” to “above 8.5,” as an area chart with a categorical x-axis and a proportional y-axis. The chart uses d3.area to draw the filled path, d3.scaleBand and d3.scaleLinear for the scales, and d3.axisBottom and d3.axisLeft to render the axes. A custom legend, built with SVG rectangles and text, maps each rating interval to a distinct color. The data is hardcoded as an array of objects, and the SVG is rendered with a light gray background and bordered container.

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