Flowchart

Vanduo Flowchart is a standalone SVG flowchart editor, installed separately from the framework. Drag from the palette, connect ports, edit text inline, and export/import JSON. It ships an optional Vue 3 binding (@vanduo-oss/vd3-cbun/flowchart) used here.

Editor
API Reference

Install

pnpm add @vanduo-oss/vd3-cbun

Usage

<script setup lang="ts">
import { VdFlowchart } from '@vanduo-oss/vd3-cbun/flowchart';

const doc = {
  nodes: [{ id: 'a', type: 'rounded-rect', x: 80, y: 80, text: 'Step' }],
  edges: [],
};
</script>

<template>
  <VdFlowchart :data="doc" @change="onChange" />
</template>

Component API

Prop / eventDescription
:dataFlowchart document ({ nodes, edges }); updates flow through the editor's load().
:readonlyRender as a non-editable viewer.
:gridSizeBackground grid size in px.
@change / @select / @viewport / @connectForwarded editor events.
@readyEmitted once with the underlying VdFlowchart instance.

Node Types

TypeUse
rounded-rectPrimary flow step
rectSharp process block
diamondDecision
circleStart or end state
textboxNotes or descriptive payload
labelFree text annotation
junctionFixed-size branch or merge point

Events

EventDescription
changeDocument mutated (add/move/edit). Resize completion fires with reason: 'node:resize'.
selectSelection changed; payload carries the selection snapshot.
viewportPan/zoom changed.
connectA pointer-created edge connected two ports.