Skip to content

Commit

Permalink
refactor: support set series label formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
vicanso committed Jul 23, 2023
1 parent fdb73a7 commit 3821946
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions charts-rs-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "charts-rs-derive"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
keywords = ["charts", "svg"]
description = "A derive library for charts-rs"
Expand All @@ -14,5 +14,5 @@ repository = "https://github.com/vicanso/charts-rs"
proc-macro = true

[dependencies]
quote = "1.0.29"
syn = "2.0.23"
quote = "1.0.31"
syn = "2.0.27"
4 changes: 4 additions & 0 deletions charts-rs-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ pub fn my_default(input: TokenStream) -> TokenStream {
if let Some(series_label_font_size) = get_f32_from_value(&data, "series_label_font_size") {
self.series_label_font_size = series_label_font_size;
}
if let Some(series_label_formatter) = get_string_from_value(&data, "series_label_formatter") {
self.series_label_formatter = series_label_formatter;
}

if let Some(series_colors) = get_color_slice_from_value(&data, "series_colors") {
self.series_colors = series_colors;
}
Expand Down

0 comments on commit 3821946

Please sign in to comment.