Do not calculate control points if we want straight lines

This commit is contained in:
Mathias Küsel 2016-01-15 13:05:51 +01:00
parent 19613f531c
commit fa7baa1627

View File

@ -60,7 +60,7 @@
this.getDataset().metaData.splice(index, 0, point); this.getDataset().metaData.splice(index, 0, point);
// Make sure bezier control points are updated // Make sure bezier control points are updated
if (this.chart.options.showLines) if (this.chart.options.showLines && this.chart.options.elements.line.tension !== 0)
this.updateBezierControlPoints(); this.updateBezierControlPoints();
}, },
@ -112,7 +112,7 @@
this.updateElement(point, index, reset); this.updateElement(point, index, reset);
}, this); }, this);
if (this.chart.options.showLines) if (this.chart.options.showLines && this.chart.options.elements.line.tension !== 0)
this.updateBezierControlPoints(); this.updateBezierControlPoints();
}, },