File tree Expand file tree Collapse file tree 4 files changed +58
-4
lines changed Expand file tree Collapse file tree 4 files changed +58
-4
lines changed Original file line number Diff line number Diff line change 4040 "lint-js" : " eslint samples/**/*.html samples/**/*.js src/**/*.js test/**/*.js" ,
4141 "lint-md" : " markdownlint-cli2 \" **/*.md\" \" #**/node_modules\" " ,
4242 "lint-tsc" : " tsc" ,
43- "lint-types" : " eslint types/**/*.d.ts" ,
43+ "lint-types" : " eslint types/**/*.d.ts && tsc -p types/tests/ " ,
4444 "lint" : " concurrently \" npm:lint-*\" " ,
4545 "test" : " npm run lint && cross-env NODE_ENV=test karma start --auto-watch --single-run --coverage --grep" ,
4646 "typedoc" : " npx typedoc"
Original file line number Diff line number Diff line change @@ -1489,7 +1489,7 @@ export type AnimationSpec = {
14891489}
14901490
14911491export type AnimationsSpec = {
1492- [ name : string ] : AnimationSpec & {
1492+ [ name : string ] : false | AnimationSpec & {
14931493 properties : string [ ] ;
14941494
14951495 /**
@@ -1507,7 +1507,7 @@ export type AnimationsSpec = {
15071507 *
15081508 */
15091509 to : Scriptable < Color | number | boolean , ScriptableContext > ;
1510- } | false
1510+ }
15111511}
15121512
15131513export type TransitionSpec = {
@@ -1520,7 +1520,7 @@ export type TransitionsSpec = {
15201520}
15211521
15221522export type AnimationOptions = {
1523- animation : AnimationSpec & {
1523+ animation : false | AnimationSpec & {
15241524 /**
15251525 * Callback called on each step of an animation.
15261526 */
Original file line number Diff line number Diff line change 1+ import { Chart } from '../index.esm' ;
2+
3+ const chart = new Chart ( 'id' , {
4+ type : 'bar' ,
5+ data : {
6+ labels : [ ] ,
7+ datasets : [ {
8+ data : [ ]
9+ } ]
10+ } ,
11+ options : {
12+ animation : false ,
13+ animations : {
14+ colors : false ,
15+ numbers : {
16+ properties : [ 'a' , 'b' ] ,
17+ type : 'number' ,
18+ from : 0 ,
19+ to : 10 ,
20+ delay : ( ctx ) => ctx . dataIndex * 100 ,
21+ duration : ( ctx ) => ctx . datasetIndex * 1000 ,
22+ loop : true ,
23+ easing : 'linear'
24+ }
25+ } ,
26+ transitions : {
27+ show : {
28+ animation : {
29+ duration : 10
30+ } ,
31+ animations : {
32+ numbers : false
33+ }
34+ } ,
35+ custom : {
36+ animation : {
37+ duration : 10
38+ }
39+ }
40+ }
41+ } ,
42+ } ) ;
Original file line number Diff line number Diff line change 1+ {
2+ "compilerOptions" : {
3+ "target" : " ES6" ,
4+ "moduleResolution" : " Node" ,
5+ "alwaysStrict" : true ,
6+ "noEmit" : true
7+ },
8+ "include" : [
9+ " *.ts" ,
10+ " ../index.esm.d.ts"
11+ ]
12+ }
You can’t perform that action at this time.
0 commit comments