NmFlowChart class
Sankey diagram (e.g. source → visitor type → entry point → lead).
Geometry follows the Traffic OS canvas: node width 10, node gap 18, columns at 17 / 44 / 71 % and the right edge, vertically centered stacks, selected flow at 0.55 opacity, others 0.2, hypotheses 0.1 with a dashed outline. Tap a ribbon to select its flow.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- NmFlowChart
Constructors
-
NmFlowChart({Key? key, required List<
NmFlowNode> nodes, required List<NmFlow> flows, String? selectedFlowId, ValueChanged<NmFlow> ? onFlowTap, String nodeSubtitle(NmFlowNode node, double value, double terminal)?, double height = 380, double minWidth = 640}) -
Creates an NmFlowChart.
const
Properties
-
flows
→ List<
NmFlow> -
Flows between nodes.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
Chart height in logical pixels.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- minWidth → double
-
Width below which the chart scrolls.
final
-
nodes
→ List<
NmFlowNode> -
Nodes, placed by their column.
final
- nodeSubtitle → String Function(NmFlowNode node, double value, double terminal)?
-
Second label line, e.g. "1 840 visits" or "124 per month".
final
-
onFlowTap
→ ValueChanged<
NmFlow> ? -
Called when a ribbon is tapped.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedFlowId → String?
-
Highlighted flow.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< NmFlowChart> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
layout(
List< NmFlowNode> nodes, List<NmFlow> flows, Size size) → NmFlowLayout -
Computes node rects and ribbon paths for a
size.