Fix resize bug of line / radar charts (#8266)

* Line: Make sure control points are re-calculated

* Radar: always set point on update
This commit is contained in:
Jukka Kurkela 2021-01-05 07:24:12 +02:00 committed by GitHub
parent 81a1e9a95e
commit 0c48c1148a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -25,10 +25,10 @@ export default class RadarController extends DatasetController {
const labels = meta.iScale.getLabels();
// Update Line
line.points = points;
// In resize mode only point locations change, so no need to set the points or options.
if (mode !== 'resize') {
const properties = {
points,
_loop: true,
_fullLoop: labels.length === points.length,
options: me.resolveDatasetElementOptions()

View File

@ -228,9 +228,11 @@ export default class LineElement extends Element {
}
set points(points) {
this._points = points;
delete this._segments;
delete this._path;
const me = this;
me._points = points;
delete me._segments;
delete me._path;
me._pointsUpdated = false;
}
get points() {