hii
✓ Published0🌍 Public
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 descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed