Skip to content

Commit

Permalink
Merge pull request #29 from qknight/layoutIterations
Browse files Browse the repository at this point in the history
Adding layoutIterations() support
  • Loading branch information
yuankunzhang committed Nov 25, 2023
2 parents 21020cb + c92d56d commit 14c4cc9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions charming/src/series/sankey.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ pub struct Sankey {
#[serde(skip_serializing_if = "Option::is_none")]
emphasis: Option<Emphasis>,

#[serde(skip_serializing_if = "Option::is_none")]
layout_iterations: Option<u64>,

#[serde(skip_serializing_if = "Option::is_none")]
orient: Option<Orient>,

Expand Down Expand Up @@ -133,6 +136,7 @@ impl Sankey {
width: None,
height: None,
emphasis: None,
layout_iterations: None,
orient: None,
label: None,
node_align: None,
Expand Down Expand Up @@ -197,6 +201,11 @@ impl Sankey {
self
}

pub fn layout_iterations<F: Into<u64>>(mut self, layout_iterations: F) -> Self {
self.layout_iterations = Some(layout_iterations.into());
self
}

pub fn orient<O: Into<Orient>>(mut self, orient: O) -> Self {
self.orient = Some(orient.into());
self
Expand Down

0 comments on commit 14c4cc9

Please sign in to comment.