Skip to content

Commit

Permalink
feat: support get gap from json
Browse files Browse the repository at this point in the history
  • Loading branch information
vicanso committed Sep 5, 2023
1 parent a3b6e2e commit 9c4cef3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
10 changes: 5 additions & 5 deletions asset/multi_chart/basic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions asset/table_chart/basic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/charts/multi_chart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ impl MultiChart {
if let Some(margin) = get_margin_from_value(&value, "margin") {
multi_chart.margin = margin;
}
if let Some(gap) = get_f32_from_value(&value, "gap") {
multi_chart.gap = gap;
}
if let Some(background_color) = get_color_from_value(&value, "background_color") {
multi_chart.background_color = Some(background_color);
}
Expand Down
4 changes: 2 additions & 2 deletions src/charts/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ static LIGHT_THEME: Lazy<Theme> = Lazy::new(|| {
"#ea7ccc".into(),
],

table_header_color: (250, 250, 252).into(),
table_header_color: (242, 243, 245).into(),
table_body_colors: vec![(255, 255, 255).into()],
table_border_color: (239, 239, 244).into(),
table_border_color: (229, 230, 235).into(),
}
});

Expand Down

0 comments on commit 9c4cef3

Please sign in to comment.