pull/165/head
Florian Dehau 5 years ago
parent f0e0b515ad
commit 4756801fd9

@ -133,7 +133,12 @@ impl<'a> Widget for BarChart<'a> {
.data
.iter()
.take(max_index)
.map(|&(l, v)| (l, v * u64::from(chart_area.height) * 8 / std::cmp::max(max, 1)))
.map(|&(l, v)| {
(
l,
v * u64::from(chart_area.height) * 8 / std::cmp::max(max, 1),
)
})
.collect::<Vec<(&str, u64)>>();
for j in (0..chart_area.height - 1).rev() {
for (i, d) in data.iter_mut().enumerate() {

Loading…
Cancel
Save