Skip to content

Commit

Permalink
switch to custom font_settings in gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
LukaOber committed Nov 2, 2024
1 parent 44448ad commit 3b117cc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
6 changes: 3 additions & 3 deletions gallery/src/boxplot/basic_boxplot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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),
)
Expand Down
5 changes: 3 additions & 2 deletions gallery/src/boxplot/boxplot_light_velocity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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),
)
Expand Down
12 changes: 9 additions & 3 deletions gallery/src/pie/doughnut_chart_with_rounded_corner.rs
Original file line number Diff line number Diff line change
@@ -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,
};
Expand All @@ -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![
Expand Down

0 comments on commit 3b117cc

Please sign in to comment.