Skip to content

Commit

Permalink
Support false for doughnut and polar area chart animation options (#9699
Browse files Browse the repository at this point in the history
)
  • Loading branch information
etimberg committed Oct 1, 2021
1 parent c3a53f0 commit 00712f1
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/index.esm.d.ts
Expand Up @@ -310,7 +310,7 @@ export interface DoughnutControllerChartOptions {
*/
spacing: number;

animation: DoughnutAnimationOptions;
animation: false | DoughnutAnimationOptions;
}

export type DoughnutDataPoint = number;
Expand Down Expand Up @@ -364,7 +364,7 @@ export interface PolarAreaControllerChartOptions {
*/
startAngle: number;

animation: PolarAreaAnimationOptions;
animation: false | PolarAreaAnimationOptions;
}

export interface PolarAreaController extends DoughnutController {
Expand Down
28 changes: 28 additions & 0 deletions types/tests/animation.ts
Expand Up @@ -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,
}
});

0 comments on commit 00712f1

Please sign in to comment.