Skip to content

Commit

Permalink
Merge pull request #55 from zishon/main
Browse files Browse the repository at this point in the history
feat: add edgeSymbol to graph
  • Loading branch information
yuankunzhang committed Apr 9, 2024
2 parents 6bafa6b + 5b91f89 commit 7eaafa9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions charming/src/series/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ pub struct Graph {

#[serde(skip_serializing_if = "Vec::is_empty")]
data: Vec<GraphNode>,

#[serde(skip_serializing_if = "Option::is_none")]
edge_symbol: Option<(String, String)>,
}

impl Graph {
Expand All @@ -280,6 +283,7 @@ impl Graph {
categories: vec![],
links: vec![],
data: vec![],
edge_symbol: None,
}
}

Expand Down Expand Up @@ -374,4 +378,9 @@ impl Graph {
self.categories = data.categories;
self
}

pub fn edge_symbol(mut self, edge_symbol: Option<(String, String)>) -> Self {
self.edge_symbol = edge_symbol;
self
}
}

0 comments on commit 7eaafa9

Please sign in to comment.