Skip to content

Commit

Permalink
rainfall.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
yuankunzhang committed Jul 13, 2023
1 parent c3a8a25 commit 5dfc965
Show file tree
Hide file tree
Showing 3 changed files with 3,547 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/target
.idea/
9 changes: 9 additions & 0 deletions charming/src/component/axis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ pub struct Axis {
#[serde(skip_serializing_if = "Option::is_none")]
inverse: Option<bool>,

#[serde(skip_serializing_if = "Option::is_none")]
align_ticks: Option<bool>,

/// The boundary gap on both sides of a coordinate axis.
#[serde(skip_serializing_if = "Option::is_none")]
boundary_gap: Option<BoundaryGap>,
Expand Down Expand Up @@ -146,6 +149,7 @@ impl Axis {
min_interval: None,
max_interval: None,
interval: None,
align_ticks: None,
log_base: None,
axis_label: None,
axis_tick: None,
Expand Down Expand Up @@ -212,6 +216,11 @@ impl Axis {
self
}

pub fn align_ticks(mut self, align_ticks: bool) -> Self {
self.align_ticks = Some(align_ticks);
self
}

pub fn boundary_gap<B: Into<BoundaryGap>>(mut self, boundary_gap: B) -> Self {
self.boundary_gap = Some(boundary_gap.into());
self
Expand Down
Loading

0 comments on commit 5dfc965

Please sign in to comment.