You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Direct property configuration overrides configuration of same property in a collection.
32
+
33
+
These defaults can be overridden in `options.animation` and `dataset.animation`.
15
34
16
35
## Easing
17
36
18
37
Available options are:
38
+
19
39
*`'linear'`
20
40
*`'easeInQuad'`
21
41
*`'easeOutQuad'`
@@ -52,34 +72,23 @@ See [Robert Penner's easing equations](http://robertpenner.com/easing/).
52
72
53
73
## Animation Callbacks
54
74
55
-
The `onProgress` and `onComplete` callbacks are useful for synchronizing an external draw to the chart animation. The callback is passed a `Chart.Animation` instance:
75
+
The `onProgress` and `onComplete` callbacks are useful for synchronizing an external draw to the chart animation. The callback is passed following object:
56
76
57
77
```javascript
58
78
{
59
79
// Chart object
60
80
chart: Chart,
61
81
62
-
//Current Animation frame number
82
+
//Number of animations still in progress
63
83
currentStep: number,
64
84
65
-
//Number of animation frames
85
+
//Total number of animations at the start of current animation
66
86
numSteps: number,
67
-
68
-
// Animation easing to use
69
-
easing: string,
70
-
71
-
// Function that renders the chart
72
-
render:function,
73
-
74
-
// User callback
75
-
onAnimationProgress:function,
76
-
77
-
// User callback
78
-
onAnimationComplete:function
79
87
}
80
88
```
81
89
82
90
The following example fills a progress bar during the chart animation.
Copy file name to clipboardExpand all lines: docs/getting-started/v3-migration.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,10 @@ Chart.js 3.0 introduces a number of breaking changes. Chart.js 2.0 was released
49
49
*`scales.[x/y]Axes.time.max` was renamed to `scales[id].max`
50
50
*`scales.[x/y]Axes.time.min` was renamed to `scales[id].min`
51
51
52
+
### Animations
53
+
54
+
Animation system was completely rewritten in Chart.js v3. Each property can now be animated separately. Please see [animations](../configuration/animations.md) docs for details.
55
+
52
56
## Developer migration
53
57
54
58
### Removed
@@ -105,7 +109,6 @@ Chart.js 3.0 introduces a number of breaking changes. Chart.js 2.0 was released
105
109
*`helpers.log10` was renamed to `helpers.math.log10`
106
110
*`helpers.almostEquals` was renamed to `helpers.math.almostEquals`
107
111
*`helpers.almostWhole` was renamed to `helpers.math.almostWhole`
108
-
*`helpers._decimalPlaces` was renamed to `helpers.math._decimalPlaces`
109
112
*`helpers.distanceBetweenPoints` was renamed to `helpers.math.distanceBetweenPoints`
110
113
*`helpers.isNumber` was renamed to `helpers.math.isNumber`
111
114
*`helpers.sign` was renamed to `helpers.math.sign`
@@ -126,10 +129,12 @@ Chart.js 3.0 introduces a number of breaking changes. Chart.js 2.0 was released
126
129
*`TimeScale.getLabelCapacity` was renamed to `TimeScale._getLabelCapacity`
127
130
*`TimeScale.tickFormatFunction` was renamed to `TimeScale._tickFormatFunction`
128
131
*`TimeScale.getPixelForOffset` was renamed to `TimeScale._getPixelForOffset`
132
+
*`Tooltip.options.legendColorBackgroupd` was renamed to `Tooltip.options.multiKeyBackground`
129
133
130
134
#### Renamed private APIs
131
135
132
136
*`helpers._alignPixel` was renamed to `helpers.canvas._alignPixel`
137
+
*`helpers._decimalPlaces` was renamed to `helpers.math._decimalPlaces`
0 commit comments