Skip to content
Pivotick
Main Navigation HomeGetting StartedConfigurationGalleryTry it out!Generated API docs

Appearance

Sidebar Navigation

Getting Started

Configuration

Callbacks

Layout

Render

Simulation

Customizing UI

Sidebar

Tooltip

Context Menu

Styling UI

Pivotick API

Security

API docs

Gallery

Basics

Node styling

Edge styling

Layouts

Events & callbacks

UI customization

Editing & authoring

Notes & annotations

Filtering, search & hierarchy

Programmatic control

Theming & performance

Showpieces

Create edges (drag & click) ​

Edge creation is built in, with two interaction styles backed by a live "shadow edge" preview: click-click (click a source node, then a target) and drag-and-drop (drag from one node onto another).

Click Edit Graph (top-right), then Add Edge, and connect two nodes — or just drag from one node to another. Every new edge fires the edgeAdd data event, which here pops a toast.

js
// Edge creation lives in the full UI mode. Turn it on and the toolbar's
// Edit Graph → Add Edge starts a click-click (or drag) connect session — the
// shadow-edge preview and both interaction styles come for free.
const options = {
    UI: { mode: 'full' }
}
js
const data = {
    nodes: [
        { id: 'alice', data: { label: 'Alice' } },
        { id: 'bob', data: { label: 'Bob' } },
        { id: 'carol', data: { label: 'Carol' } },
        { id: 'dave', data: { label: 'Dave' } },
        { id: 'erin', data: { label: 'Erin' } }
    ],
    edges: [
        { from: 'alice', to: 'bob' },
        { from: 'alice', to: 'carol' }
    ]
}

Last updated:

Pager
Next pageGetting Started