From: Evert Timberg Date: Fri, 1 Oct 2021 16:17:36 +0000 (-0400) Subject: Support false for doughnut and polar area chart animation options (#9699) X-Git-Tag: v3.6.0~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00712f19d64031a769dfb0e72b138fd80c2b245c;p=thirdparty%2FChart.js.git Support false for doughnut and polar area chart animation options (#9699) --- diff --git a/types/index.esm.d.ts b/types/index.esm.d.ts index 6d2fe7839..f3824e4ba 100644 --- a/types/index.esm.d.ts +++ b/types/index.esm.d.ts @@ -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 { diff --git a/types/tests/animation.ts b/types/tests/animation.ts index 33fea278b..bc9ff433e 100644 --- a/types/tests/animation.ts +++ b/types/tests/animation.ts @@ -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, + } +});