From 829b7b6b70274053442bd4910ac4fac1d30de2a8 Mon Sep 17 00:00:00 2001 From: Caleb Bassi Date: Tue, 14 Jan 2020 09:47:07 -0800 Subject: [PATCH] Change linechart to draw the points also --- src/widgets/chart.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/widgets/chart.rs b/src/widgets/chart.rs index 78593ea..2a0bfea 100644 --- a/src/widgets/chart.rs +++ b/src/widgets/chart.rs @@ -470,14 +470,12 @@ where .background_color(self.style.bg) .x_bounds(self.x_axis.bounds) .y_bounds(self.y_axis.bounds) - .paint(|ctx| match dataset.graph_type { - GraphType::Scatter => { - ctx.draw(&Points { - coords: dataset.data, - color: dataset.style.fg, - }); - } - GraphType::Line => { + .paint(|ctx| { + ctx.draw(&Points { + coords: dataset.data, + color: dataset.style.fg, + }); + if let GraphType::Line = dataset.graph_type { for i in 0..dataset.data.len() - 1 { ctx.draw(&Line { x1: dataset.data[i].0,