pub struct Link<'a> { /* private fields */ }
Expand description
The links of the Sankey plot.
Implementations§
Source§impl<'a> Link<'a>
impl<'a> Link<'a>
Sourcepub fn color(&mut self, color: &'a str) -> &mut Self
pub fn color(&mut self, color: &'a str) -> &mut Self
Sets the link
color. It can be a single value, or an array for specifying color for each link
. If link.color
is omitted, then by default, a translucent grey link will be used.
pub fn line(&mut self) -> &mut Line<'a>
Sourcepub fn source(&mut self, source: &'a [f64]) -> &mut Self
pub fn source(&mut self, source: &'a [f64]) -> &mut Self
An integer number [0..nodes.length - 1]
that represents the source node.
default: []
Sourcepub fn target(&mut self, target: &'a [f64]) -> &mut Self
pub fn target(&mut self, target: &'a [f64]) -> &mut Self
An integer number [0..nodes.length - 1]
that represents the target node.
default: []
Sourcepub fn value(&mut self, value: &'a [f64]) -> &mut Self
pub fn value(&mut self, value: &'a [f64]) -> &mut Self
A numeric value representing the flow volume value.
default: []
Sourcepub fn hoverinfo(&mut self, hoverinfo: Hoverinfo) -> &mut Self
pub fn hoverinfo(&mut self, hoverinfo: Hoverinfo) -> &mut Self
Determines which trace information appear when hovering links. If none
or skip
are set, no information is displayed upon hovering. But, if none
is set, click and hover events are still fired.
default: all
pub fn hoverlabel(&mut self) -> &mut Hoverlabel<'a>
Sourcepub fn hovertemplate(&mut self, hovertemplate: &'a str) -> &mut Self
pub fn hovertemplate(&mut self, hovertemplate: &'a str) -> &mut Self
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-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in hovertemplate
are 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 are arrayOk: true
) are available. variables value
and label
. Anything contained in tag <extra>
is displayed in the secondary box, for example “<extra></extra>
.
default: ``