Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

force graph with zoom and drag

Public visualization

force graph with zoom and drag

0 stars1🌍 Public
Ssgzzhinde
Last edited Dec 21, 2020
Created on Dec 21, 2020
Forked from test svg basic

This example demonstrates a force-directed graph that can be zoomed and dragged. A circle within an SVG group responds to mouse interaction, with the SVG changing its cursor style to indicate draggable zones. The visualization uses D3 v6 to create three separate SVG elements, applies a linear color scale mapping scores to colors like lime, yellow, and red, and employs a power scale for sizing nodes. A zoom effect is implemented via `d3.zoom()`, which updates the SVG’s transform attribute on zoom events.

AI-generated description

program that follows your mouse with a circle.

Comments

Sign in to join the discussion.

MIT Licensed