flex_org_chart 0.1.0
flex_org_chart: ^0.1.0 copied to clipboard
Highly customizable, animated org chart widget for Flutter: pan/zoom, compact flextree layout, highlighting, and connections. Ported from d3-org-chart.
0.1.0 #
Initial release. A highly customizable, animated org chart widget for Flutter, ported from d3-org-chart with a d3-flextree-based compact layout.
- Data & layout:
stratifybuilds a tree from any flat list viaidOf/parentIdOfcallbacks, detecting empty data, duplicate ids, missing parents, and cycles (OrgChartDataException).LayoutEnginecomputes node and link positions for all fourChartLayoutdirections (top, bottom, left, right), with an optional flextree "compact" pass that folds leaf-heavy subtrees into two columns. - Controller:
OrgChartControllerowns data and expansion/highlight state —setData,expand/collapse/setExpanded,expandAll/collapseAll,highlight/highlightPathToRoot/clearHighlights,nodeById/visibleNodes/connections/dataError— and drives viewport navigation (fit,centerNode,zoomIn/zoomOut) through whicheverOrgChartwidget is currently attached. - Widget:
OrgChartrenders the controller's current layout with a fully customnodeBuilder, pinch/drag pan and scroll-wheel zoom, animated enter/exit transitions when the visible node set or layout changes, a customizable expand/collapse affordance (DefaultExpandButtonorexpandButtonBuilder), node tap callbacks, and configurable error/empty states. - Connections: independent, non-hierarchical
Connectionlinks are rendered as dashed, labeled, arrow-headed arcs (ConnectionStyle) alongside the hierarchical parent/child links (LinkStyle). - Highlighting:
highlight/highlightPathToRootmark nodes and their link/ancestor chain, styled viahighlightedLinkStyleand theisHighlighted/isOnHighlightedPathflags exposed onOrgNode. - Not yet available: node editing, image/PDF export, pagination for very large trees, and drag-and-drop re-parenting. See the README roadmap.