Features
Chart Typesโ
Organization Chartโ
- Hierarchical tree structures
- Manager-subordinate relationships
- Collapsible/expandable nodes
- Drag & drop reorganization
- Multi-level hierarchies
- Leaf node column arrangement
Family Genogramโ
- Multi-generational family trees
- Parent-child relationships
- Marriage/divorce indicators
- Gender-based positioning
- Multiple spouse support
- Sibling group organization
Core Capabilitiesโ
Customizationโ
OrgChart<Employee>(
controller: controller,
builder: (details) => Container(
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [Colors.blue, Colors.cyan],
),
borderRadius: BorderRadius.circular(12),
),
child: Stack(
children: [
_buildNodeContent(details.item),
if (details.level == 1)
Positioned(
top: 0,
right: 0,
child: _buildBadge('CEO'),
),
if (details.isBeingDragged)
Container(
color: Colors.blue.withOpacity(0.3),
),
],
),
),
);
Edge Stylingโ
- Solid
- Dashed
OrgChart(
arrowStyle: SolidGraphArrow(),
linePaint: Paint()
..color = Colors.blue
..strokeWidth = 2.0,
cornerRadius: 10.0,
)
OrgChart(
arrowStyle: DashedGraphArrow(
pattern: [10, 5],
),
linePaint: Paint()
..color = Colors.grey
..strokeWidth = 1.5,
)
Interactionsโ
Drag and Dropโ
OrgChart(
isDraggable: true,
onDrop: (dragged, target, isTargetSubnode) {
if (!canMoveEmployee(dragged, target)) {
return;
}
updateEmployeeManager(dragged, target);
controller.replaceAll(updatedEmployees);
},
)
Zoom and Panโ
OrgChart(
zoomConfig: ZoomConfig(
minScale: 0.5,
maxScale: 3.0,
initialScale: 1.0,
),
interactionConfig: InteractionConfig(
enableZoom: true,
enablePan: true,
enableDoubleTapZoom: true,
),
)
Performanceโ
- QuadTree Optimization: Fast node lookup for large charts
- Viewport Culling: Only render visible nodes
- Lazy Loading: Load children on demand
- Handles 1000+ nodes smoothly
Exportโ
// Export as PNG
final imageBytes = await controller.exportAsImage();
// Export as PDF
final pdfDocument = await controller.exportAsPdf();
// Custom resolution
final hdImage = await exportChartAsImage(
controller.repaintBoundaryKey,
pixelRatio: 3.0,
);
Comparison Matrixโ
Feature | OrgChart | Genogram |
---|---|---|
Hierarchical Layout | โ | โ |
Drag & Drop | โ | โ |
Zoom & Pan | โ | โ |
Node Collapse/Expand | โ | โ |
Custom Node Builder | โ | โ |
Edge Styling | โ | โ |
Marriage Relationships | โ | โ |
Gender-based Layout | โ | โ |
Multiple Parents | โ | โ |
Export (Image/PDF) | โ | โ |
Performance (1000+ nodes) | โ | โ |
Animations | โ | โ |