Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 SVG Primitives

Public visualization

Viewing a saved revision (read-only)

4df04791f7b74759ad90e05025bf132b

D3 SVG Primitives

0 stars0🌍 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.