]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Do not calculate control points if we want straight lines
authorMathias Küsel <mathiask@hotmail.de>
Fri, 15 Jan 2016 12:05:51 +0000 (13:05 +0100)
committerMathias Küsel <mathiask@hotmail.de>
Fri, 15 Jan 2016 12:05:51 +0000 (13:05 +0100)
src/controllers/controller.line.js

index e557a02ec4b42c63be6366aab31e86ad79d29cfb..a89590991ce011bfb17c74772baf8e179eda9f41 100644 (file)
@@ -60,7 +60,7 @@
                        this.getDataset().metaData.splice(index, 0, point);
 
                        // 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.updateElement(point, index, reset);
                        }, this);
 
-                       if (this.chart.options.showLines)
+                       if (this.chart.options.showLines && this.chart.options.elements.line.tension !== 0)
                                this.updateBezierControlPoints();
                },