Skip to main content
100%

D3 SVG Primitives

✓ Published0🌍 Public
FFahimeh Saleh
Last edited Oct 20, 2020
Created on Oct 20, 2020
Forked from HTML Starter

This example demonstrates basic SVG shape primitives rendered with D3.js in a React environment. It displays rectangles, circles, ellipses, and lines with static styling, showcasing fundamental SVG element creation. The code uses D3 version 4 selections to append shapes directly to an SVG canvas, loading data from a CSV file for positioning. A second version uses `d3.scaleLinear` and `d3.interpolateBlues` to map data values to circle radii and fill colors, with mouseover and mouseout events controlling opacity to highlight individual circles.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes