mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 04:09:08 +02:00
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:
parent
81a1e9a95e
commit
0c48c1148a
@ -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()
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user