pub struct SankeyLinkLayout {
pub index: usize,
pub source: usize,
pub target: usize,
pub value: f64,
pub y0: f32,
pub y1: f32,
pub width: f32,
pub source_width: f32,
pub target_width: f32,
}Expand description
A link with computed layout.
Like d3-sankey, y0 and y1 are the vertical centers of the ribbon at
the source and target end. Each end has its own width: the links of a
node’s side share the node height in proportion to their values, so both
sides of every node are always fully covered. On a balanced graph
(incoming sum == outgoing sum everywhere) the two ends are equal; on an
imbalanced one (e.g. sqrt-compressed values) the ribbon transitions
smoothly between the two widths.
Fields§
§index: usize§source: usize§target: usize§value: f64The flow value in the layout’s value space (scaled by
SankeyValueScale; equals the raw input value under Linear).
y0: f32§y1: f32§width: f32The nominal width from the global value scale, used by the layout relaxation; equals both end widths on a balanced graph.
source_width: f32The ribbon width at the source end.
target_width: f32The ribbon width at the target end.
Trait Implementations§
Source§impl Clone for SankeyLinkLayout
impl Clone for SankeyLinkLayout
Source§fn clone(&self) -> SankeyLinkLayout
fn clone(&self) -> SankeyLinkLayout
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for SankeyLinkLayout
impl RefUnwindSafe for SankeyLinkLayout
impl Send for SankeyLinkLayout
impl Sync for SankeyLinkLayout
impl Unpin for SankeyLinkLayout
impl UnsafeUnpin for SankeyLinkLayout
impl UnwindSafe for SankeyLinkLayout
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more