]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Support false for doughnut and polar area chart animation options (#9699)
authorEvert Timberg <evert.timberg+github@gmail.com>
Fri, 1 Oct 2021 16:17:36 +0000 (12:17 -0400)
committerGitHub <noreply@github.com>
Fri, 1 Oct 2021 16:17:36 +0000 (19:17 +0300)
types/index.esm.d.ts
types/tests/animation.ts

index 6d2fe7839eb5d5497afe6d7395c9f822e80e76ad..f3824e4ba0a28dedcbfa45bed48ba13b3c17e3f9 100644 (file)
@@ -310,7 +310,7 @@ export interface DoughnutControllerChartOptions {
    */
   spacing: number;
 
-  animation: DoughnutAnimationOptions;
+  animation: false | DoughnutAnimationOptions;
 }
 
 export type DoughnutDataPoint = number;
@@ -364,7 +364,7 @@ export interface PolarAreaControllerChartOptions {
    */
   startAngle: number;
 
-  animation: PolarAreaAnimationOptions;
+  animation: false | PolarAreaAnimationOptions;
 }
 
 export interface PolarAreaController extends DoughnutController {
index 33fea278bdc522069a3b5f2fcde76f2e0eb1951f..bc9ff433efcbb04179537c52e5b2a083c10ba153 100644 (file)
@@ -40,3 +40,31 @@ const chart = new Chart('id', {
     }
   },
 });
+
+
+const pie = new Chart('id', {
+  type: 'pie',
+  data: {
+    labels: [],
+    datasets: [{
+      data: []
+    }]
+  },
+  options: {
+    animation: false,
+  }
+});
+
+
+const polarArea = new Chart('id', {
+  type: 'polarArea',
+  data: {
+    labels: [],
+    datasets: [{
+      data: []
+    }]
+  },
+  options: {
+    animation: false,
+  }
+});