diff --git a/gallery/src/boxplot/basic_boxplot.rs b/gallery/src/boxplot/basic_boxplot.rs index 8e44fa0..8c457e1 100644 --- a/gallery/src/boxplot/basic_boxplot.rs +++ b/gallery/src/boxplot/basic_boxplot.rs @@ -2,8 +2,8 @@ use charming::{ component::{Axis, Grid, Title}, datatype::{DataFrame, DataPoint, DataPointItem}, element::{ - AxisPointer, AxisPointerType, AxisType, ItemStyle, SplitArea, SplitLine, TextStyle, - Tooltip, Trigger, + font_settings::FontWeight, AxisPointer, AxisPointerType, AxisType, ItemStyle, SplitArea, + SplitLine, TextStyle, Tooltip, Trigger, }, series::{Boxplot, Scatter}, Chart, @@ -34,7 +34,7 @@ pub fn chart() -> Chart { .border_width(1) .text_style( TextStyle::new() - .font_weight("normal") + .font_weight(FontWeight::Normal) .font_size(14) .line_height(20), ) diff --git a/gallery/src/boxplot/boxplot_light_velocity.rs b/gallery/src/boxplot/boxplot_light_velocity.rs index eb2505a..5e6d084 100644 --- a/gallery/src/boxplot/boxplot_light_velocity.rs +++ b/gallery/src/boxplot/boxplot_light_velocity.rs @@ -2,7 +2,8 @@ use charming::{ component::{Axis, Grid, Title}, datatype::{Dataset, Transform}, element::{ - AxisPointer, AxisPointerType, AxisType, SplitArea, SplitLine, TextStyle, Tooltip, Trigger, + font_settings::FontWeight, AxisPointer, AxisPointerType, AxisType, SplitArea, SplitLine, + TextStyle, Tooltip, Trigger, }, series::{Boxplot, Scatter}, Chart, @@ -54,7 +55,7 @@ pub fn chart() -> Chart { .border_width(1) .text_style( TextStyle::new() - .font_weight("normal") + .font_weight(FontWeight::Normal) .font_size(14) .line_height(20), ) diff --git a/gallery/src/pie/doughnut_chart_with_rounded_corner.rs b/gallery/src/pie/doughnut_chart_with_rounded_corner.rs index 0b5e401..20ba378 100644 --- a/gallery/src/pie/doughnut_chart_with_rounded_corner.rs +++ b/gallery/src/pie/doughnut_chart_with_rounded_corner.rs @@ -1,6 +1,8 @@ use charming::{ component::Legend, - element::{Emphasis, Label, LabelLine, LabelPosition, Tooltip, Trigger}, + element::{ + font_settings::FontWeight, Emphasis, Label, LabelLine, LabelPosition, Tooltip, Trigger, + }, series::Pie, Chart, }; @@ -16,8 +18,12 @@ pub fn chart() -> Chart { .avoid_label_overlap(false) .label(Label::new().show(false).position(LabelPosition::Center)) .emphasis( - Emphasis::new() - .label(Label::new().show(true).font_size(40).font_weight("bold")), + Emphasis::new().label( + Label::new() + .show(true) + .font_size(40) + .font_weight(FontWeight::Bold), + ), ) .label_line(LabelLine::new().show(false)) .data(vec![