SankeyGraph<N, L, D> constructor
SankeyGraph<N, L, D> ({
- required String id,
- required List<
N> nodes, - required List<
L> links, - required TypedAccessorFn<
N, D> nodeDomainFn, - required TypedAccessorFn<
L, D> linkDomainFn, - required TypedAccessorFn<
L, N> sourceFn, - required TypedAccessorFn<
L, N> targetFn, - required TypedAccessorFn<
N, num?> nodeMeasureFn, - required TypedAccessorFn<
L, num?> linkMeasureFn, - TypedAccessorFn<
N, Color> ? nodeColorFn, - TypedAccessorFn<
N, Color> ? nodeFillColorFn, - TypedAccessorFn<
N, FillPatternType> ? nodeFillPatternFn, - TypedAccessorFn<
N, num> ? nodeStrokeWidthPxFn, - TypedAccessorFn<
L, Color> ? linkFillColorFn, - TypedAccessorFn<
L, num> ? secondaryLinkMeasureFn, - TypedAccessorFn<
N, int> ? columnFn,
Implementation
factory SankeyGraph(
{required String id,
required List<N> nodes,
required List<L> links,
required TypedAccessorFn<N, D> nodeDomainFn,
required TypedAccessorFn<L, D> linkDomainFn,
required TypedAccessorFn<L, N> sourceFn,
required TypedAccessorFn<L, N> targetFn,
required TypedAccessorFn<N, num?> nodeMeasureFn,
required TypedAccessorFn<L, num?> linkMeasureFn,
TypedAccessorFn<N, Color>? nodeColorFn,
TypedAccessorFn<N, Color>? nodeFillColorFn,
TypedAccessorFn<N, FillPatternType>? nodeFillPatternFn,
TypedAccessorFn<N, num>? nodeStrokeWidthPxFn,
TypedAccessorFn<L, Color>? linkFillColorFn,
TypedAccessorFn<L, num>? secondaryLinkMeasureFn,
TypedAccessorFn<N, int>? columnFn}) {
return SankeyGraph._(
id: id,
nodes: _convertSankeyNodes<N, L, D>(
nodes, links, sourceFn, targetFn, nodeDomainFn),
links: _convertSankeyLinks<N, L>(
links, sourceFn, targetFn, secondaryLinkMeasureFn),
nodeDomainFn: actOnNodeData<N, L, D>(nodeDomainFn)!,
linkDomainFn: actOnLinkData<N, L, D>(linkDomainFn)!,
nodeMeasureFn: actOnNodeData<N, L, num?>(nodeMeasureFn)!,
linkMeasureFn: actOnLinkData<N, L, num?>(linkMeasureFn)!,
nodeColorFn: actOnNodeData<N, L, Color>(nodeColorFn),
nodeFillColorFn: actOnNodeData<N, L, Color>(nodeFillColorFn),
nodeFillPatternFn:
actOnNodeData<N, L, FillPatternType>(nodeFillPatternFn),
nodeStrokeWidthPxFn: actOnNodeData<N, L, num>(nodeStrokeWidthPxFn),
linkFillColorFn: actOnLinkData<N, L, Color>(linkFillColorFn),
);
}