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);