buildInteractiveSankeyPainter function

InteractiveSankeyPainter buildInteractiveSankeyPainter({
  1. required List<SankeyNode> nodes,
  2. required List<SankeyLink> links,
  3. required Map<String, Color> nodeColors,
  4. int? selectedNodeId,
  5. bool showLabels = true,
})

Builds an interactive painter based on the provided nodes, links, and node colors

The selectedNodeId parameter indicates an optional node ID for which special highlighting may be applied. Returns an instance of InteractiveSankeyPainter.

Implementation

InteractiveSankeyPainter buildInteractiveSankeyPainter({
  required List<SankeyNode> nodes,
  required List<SankeyLink> links,
  required Map<String, Color> nodeColors,
  int? selectedNodeId,
  final bool showLabels = true,
}) {
  return InteractiveSankeyPainter(
    nodes: nodes,
    links: links,
    nodeColors: nodeColors,
    selectedNodeId: selectedNodeId,
    showLabels: showLabels,
  );
}