]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Fix: update line options on resize, for gradients (#8832)
authorJukka Kurkela <jukka.kurkela@gmail.com>
Tue, 6 Apr 2021 22:54:36 +0000 (01:54 +0300)
committerGitHub <noreply@github.com>
Tue, 6 Apr 2021 22:54:36 +0000 (18:54 -0400)
src/controllers/controller.line.js

index da79679e6f83c221526f7db63775d747506d1999..53233baf707aea29c367165eac0074ba8a2d5e3e 100644 (file)
@@ -29,17 +29,14 @@ export default class LineController extends DatasetController {
     line._decimated = !!_dataset._decimated;
     line.points = points;
 
-    // In resize mode only point locations change, so no need to set the options.
-    if (mode !== 'resize') {
-      const options = me.resolveDatasetElementOptions(mode);
-      if (!me.options.showLine) {
-        options.borderWidth = 0;
-      }
-      me.updateElement(line, undefined, {
-        animated: !animationsDisabled,
-        options
-      }, mode);
+    const options = me.resolveDatasetElementOptions(mode);
+    if (!me.options.showLine) {
+      options.borderWidth = 0;
     }
+    me.updateElement(line, undefined, {
+      animated: !animationsDisabled,
+      options
+    }, mode);
 
     // Update Points
     me.updateElements(points, start, count, mode);