mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-07 20:59:08 +02:00
Do not calculate control points if we want straight lines
This commit is contained in:
parent
19613f531c
commit
fa7baa1627
@ -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();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user