From aa4094cd05803749df54a5e5a24898266ba5bd5f Mon Sep 17 00:00:00 2001 From: Timo Hocker Date: Tue, 13 Oct 2020 08:35:38 +0200 Subject: [PATCH] place start and end mark --- src/components/ChartView.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/ChartView.vue b/src/components/ChartView.vue index e3068bd..bc9f3e1 100644 --- a/src/components/ChartView.vue +++ b/src/components/ChartView.vue @@ -39,9 +39,12 @@ export default { for (let i = 0; i < this.data.length; i++) { const data = this.data[i]; const val = resolve_data (data, y.field); + const next = this.data.length - 1 === i + ? val + : resolve_data (this.data[i + 1], y.field); if ( !this.remove_duplicates - || last !== val + || last !== val || next !== val || this.data.length - 1 === i ) res.data.push (val);