Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support false for doughnut and polar area chart animation options #9699

Merged
merged 1 commit into from Oct 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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,
}
});