org_chart 4.2.0
org_chart: ^4.2.0 copied to clipboard
A flutter orgranizational chart with drag and drop, zoom and pan, search, collapse, expand, and easy customizations!
4.2.0 - 2025-05-01 #
- Implemented a CustomInteractiveViewer to replace the default one. Benefits include:
- Fixed centering issues when zooming in/out and panning.
- A new InteractiveViewerController allowing more control over the zoom and pan (and a new rotational 🔥) behavior in the graph.
- fling behavior 😁
- Fixed a bug in the
getSizemethod of theOrgChartController. All nodes were checked, even hidden nodes, returning the wrong size. Which also caused issues in centering the graph. - Traverse the graph using keyboard arrows. zoom in and out using + & -
4.1.0 - 2025-04-11 #
Added #
- Recursive node removal functionality.
- Holding the Ctrl key changes trackpad scroll behavior to "scaling in".
Fixed #
- Resolved an issue where
removeItemwithActionOnNodeRemoval.connectToParentincorrectly behaved likeActionOnNodeRemoval.unlink.
Thanks to @fabionuno for implementing all of these features and fixes!
4.0.0 #
Added #
-
Dashed arrow styles:
- Introduced
arrowStyleto theOrgChartwidget with optionsSolidGraphArrowandDashedGraphArrow.
- Introduced
-
Graph centering:
- Graph now centers on initialization and orientation change.
- Can be disabled during orientation change using the new
centerparameter inswitchOrientation. - The
orientationsetter is now deprecated. calculatePositionalso accepts thecenterparameter (defaults totrue).- New
centerChart()method added to controller.
-
Zoom control:
- Exposed
minScaleandmaxScalein theOrgChartwidget.
- Exposed
-
Drag behavior:
- Prevents dragging nodes into negative positions.
- Fixed node index changing unnecessarily when starting to drag a node.
Fixed #
- Boundary issues where nodes could be placed out of view and become unclickable or undraggable.
Removed #
- Removed
onTapandonDoubleTapfrom theOrgChartwidget due to delayed callbacks. UseGestureDetectorin the builder method instead.
Updated #
- Example project improvements.
3.1.0 #
Added #
-
switchOrientationmethod on the controller to toggle orientation. -
Automatic position recalculation when setting
controller.orientation. -
Spacing improvements:
- Replaced
offsetwithspacingandrunSpacingbased on current orientation.
- Replaced
-
Tree rendering:
- Multiple roots now display side-by-side (or vertically) depending on orientation.
-
Visual polish:
- Line radius added to leaf nodes.
-
Node removal improvements:
- Added
idSetterto controller for subnode reattachment. - New
actionparameter inremoveItemwith options:ActionOnNodeRemoval.unlinkActionOnNodeRemoval.linkToParent
- Added
3.0.0 #
Changed #
- Major internal cleanup.
- Fixed arrow-spacing calculation.
- Added
cornerRadiusto customize arrow curves. - Added
leveltoNodeBuilderDetailsto indicate depth in tree. - Added
isTargetSubnodetoonDropto detect drops on subnodes. - Updated and restyled example.
- Removed deprecated
Graphclass andgraphparameter fromOrgChart. - Automatic UI updates after
calculatePosition— no more need to callsetState. - Only the first tree is shown if multiple roots exist.
2.2.0 #
2.1.0 #
2.0.0 #
Changed #
- Removed the need to manually map data types to
Node— done internally now. - Builder method now receives a
NodeBuilderDetailsobject containing:datahideNodesnodesHiddenbeingDraggedisOverlapped
- Added customizable animation curve and duration when resetting positions.
- Added documentation and internal tweaks.