Node
public struct Node : Encodable
The nodes of the Sankey plot.
-
The shown name of the node.
Declaration
Swift
public var label: [Double]? -
Groups of nodes.
Each group is defined by an array with the indices of the nodes it contains. Multiple groups can be specified.
Declaration
Swift
public var groups: InfoArray? -
The normalized horizontal position of the node.
Declaration
Swift
public var x: [Double]? -
The normalized vertical position of the node.
Declaration
Swift
public var y: [Double]? -
Sets the
nodecolor.It can be a single value, or an array for specifying color for each
node. Ifnode.coloris omitted, then the defaultPlotlycolor palette will be cycled through to have a variety of colors. These defaults are not fully opaque, to allow some visibility of what is beneath the node.Declaration
Swift
public var coloring: Coloring? -
Assigns extra data to each node.
Declaration
Swift
public var customData: [Double]? -
Undocumented
Declaration
Swift
public var line: VariableLine? -
Sets the padding (in px) between the
nodes.Declaration
Swift
public var padding: Double? -
Sets the thickness (in px) of the
nodes.Declaration
Swift
public var thickness: Double? -
Determines which trace information appear when hovering nodes.
If
See morenoneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.Declaration
Swift
public enum HoverInfo : String, Encodable -
Determines which trace information appear when hovering nodes.
If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.Declaration
Swift
public var hoverInfo: HoverInfo? -
Undocumented
Declaration
Swift
public var hoverLabel: HoverLabel? -
Template string used for rendering the information that appear on hover box.
Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time-format#locale_format for details on the date formatting syntax. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that arearrayOk: true) are available. variablesvalueandlabel. Anything contained in tag<extra>is displayed in the secondary box, for example “{fullData.name} ”. To hide the secondary box completely, use an empty tag<extra></extra>.Declaration
Swift
public var hoverTemplate: Data<String>? -
init(label:groups: x: y: coloring: customData: line: padding: thickness: hoverInfo: hoverLabel: hoverTemplate: ) Creates
Nodeobject with specified properties.Declaration
Swift
public init(label: [Double]? = nil, groups: InfoArray? = nil, x: [Double]? = nil, y: [Double]? = nil, coloring: Coloring? = nil, customData: [Double]? = nil, line: VariableLine? = nil, padding: Double? = nil, thickness: Double? = nil, hoverInfo: HoverInfo? = nil, hoverLabel: HoverLabel? = nil, hoverTemplate: Data<String>? = nil)Parameters
labelThe shown name of the node.
groupsGroups of nodes.
xThe normalized horizontal position of the node.
yThe normalized vertical position of the node.
coloringSets the
nodecolor.customDataAssigns extra data to each node.
linepaddingSets the padding (in px) between the
nodes.thicknessSets the thickness (in px) of the
nodes.hoverInfoDetermines which trace information appear when hovering nodes.
hoverLabelhoverTemplateTemplate string used for rendering the information that appear on hover box.
View on GitHub
Install in Dash
Node Structure Reference