qmetrics.net

react-force-graph

React force-directed graph components in 2D, 3D, VR, AR

react-force-graph screenshot

react-force-graph wraps the force-graph suite as React components for 2D canvas, 3D WebGL, VR, and AR graph layouts. It uses d3-force-3d physics with rich interaction props.

Overview

react-force-graph publishes four related npm packages—2D, 3D, VR, and AR—that share parallel APIs for visualizing networks as force-directed layouts. Each accepts a graphData object with nodes and links, then iterates positions using a physics simulation while rendering with HTML canvas, Three.js, A-Frame, or AR.js as appropriate.

Common capabilities include zoom and pan, draggable nodes, hover and click handlers, customizable node and link colors, labels, widths, curvatures, and dynamic data updates. Two-dimensional mode allows custom canvas drawing callbacks for nodes and links; three-dimensional modes support custom Three.js objects, post-processing effects, and camera controls such as fit-to-canvas or automatic orbit.

The suite builds on d3-force-3d for layout forces and exposes extensive props for styling, visibility accessors, collision behavior, DAG tree modes, directional particles on links, and highlight selection patterns. VR and AR variants add stereoscopic navigation and marker-tracked placement options with configurable scale and offset.

Consumers install the specific package they need plus its peer dependencies, or load bundles via script tags in simpler setups. Example galleries demonstrate arrows, particles, text nodes, images, expandable trees, and large graphs.

Key features

  • 2D, 3D, VR, and AR graph packages
  • Force-directed d3-force-3d layout
  • Zoom, pan, drag interactions
  • Custom node and link styling hooks
  • Dynamic graph data updates
  • Click and hover event handlers
  • DAG and tree layout modes
  • Canvas or WebGL rendering paths

Use cases

  • Network relationship exploration
  • Knowledge graph visualization
  • VR or AR graph demos
  • Interactive dependency diagrams

Tags

Similar software

Mermaid

Text-defined diagrams from Markdown-like syntax

Mermaid turns plain-text diagram definitions into flowcharts, sequence charts, Gantt charts, and many other diagram types. It renders in browsers, documentation tools, and GitHub Markdown.

  • Twenty-plus diagram types
  • Markdown-inspired text syntax
  • Themes and layout customization
TypeScriptCLIDetails →
★ 91.3k⟳ todayMIT

Chart.js

Flexible JavaScript charting library for HTML5 canvas

Chart.js draws animated, customizable charts in the browser using JavaScript and the canvas element, aimed at designers and developers.

  • Multiple animated chart types
  • HTML5 canvas rendering
  • Responsive resize handling
JavaScriptDetails →
★ 67.9k⟳ 5 days agoMIT

xyflow

Node-based UI libraries for React, Svelte, and Vue

xyflow maintains React Flow, Svelte Flow, and Vue Flow—libraries for building customizable node-based editors and interactive diagrams in those frameworks.

  • React, Svelte, and Vue graph libraries
  • Shared @xyflow/system utilities
  • Customizable nodes and edges
TypeScriptDetails →
★ 39.3k⟳ 2 days agoMIT

MPAndroidChart

Android and Compose charting library for mobile apps

MPAndroidChart is a Kotlin charting library for Android apps. It draws line, bar, pie, radar, bubble, candlestick, and related chart types in traditional views or Jetpack Compose.

  • Nine chart types with shared data model
  • Jetpack Compose module with chart state
  • Zoom, drag, highlight, and markers
KotlinAndroidDetails →
★ 38.2k⟳ 1 month agoApache-2.0

Recharts

Composable React chart library built on SVG and D3

Recharts helps React apps render charts from declarative components such as axes, grids, legends, and series. It targets native SVG output with a small D3 footprint and installs via npm, Deno, or UMD.

  • Declarative React chart components
  • SVG-based rendering
  • Lightweight D3 submodule usage
TypeScriptDetails →
★ 27.9k⟳ todayMIT

Motion Canvas

TypeScript animation library with web sync editor

Motion Canvas pairs a TypeScript animation library with a browser editor for live previews. It targets informative vector animations timed to voice-overs.

  • Generator-based animation API
  • Real-time preview in editor
  • Voice-over synchronization
TypeScriptWebDetails →
★ 20.7k⟳ 5 months agoMIT