Skip to content

Commit

Permalink
improved charts legend as requested in #119
Browse files Browse the repository at this point in the history
  • Loading branch information
GyulyVGC committed Jun 28, 2023
1 parent c7e9112 commit ef4f439
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/chart/types/traffic_chart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ impl Chart<Message> for TrafficChart {

chart_builder
.margin_right(30)
.margin_bottom(0)
.set_label_area_size(LabelAreaPosition::Left, 60)
.set_label_area_size(LabelAreaPosition::Bottom, 50);

Expand Down Expand Up @@ -175,7 +176,8 @@ impl Chart<Message> for TrafficChart {
chart
.configure_series_labels()
.position(SeriesLabelPosition::UpperRight)
.border_style(BLACK)
.background_style(BLACK.mix(0.3))
.border_style(BLACK.mix(0.6))
.label_font(("notosans", 17).into_font().color(&self.color_font))
.draw()
.expect("Error drawing graph");
Expand Down Expand Up @@ -232,7 +234,8 @@ impl Chart<Message> for TrafficChart {
chart
.configure_series_labels()
.position(SeriesLabelPosition::UpperRight)
.border_style(BLACK)
.background_style(BLACK.mix(0.3))
.border_style(BLACK.mix(0.6))
.label_font(("notosans", 17).into_font().color(&self.color_font))
.draw()
.expect("Error drawing graph");
Expand Down

0 comments on commit ef4f439

Please sign in to comment.