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

Appearance

Sidebar Navigation

Getting Started

Configuration

Callbacks

Edge layers

Layout

Render

Simulation

Customizing UI

Sidebar

Tooltip

Context Menu

Filters

Legend

Data table

Styling UI

Plugins

Pivotick API

Pivots & enrichment

Saving pivot results

Undo & history

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

Pivots & enrichment

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 = {
    // Off: `full` mode brings a minimap and the data dock, and this card is about
    // neither (see the Minimap and Data table cards for those).
    UI: { mode: 'full', minimap: false, table: false }
}
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