Skip to content

Commit cfc0c9e

Browse files
author
Jelte Lagendijk
committed
Merge branch 'master' of ssh://github.com/mendix/ChartJS
2 parents 7a7b4fa + 79946dd commit cfc0c9e

4 files changed

Lines changed: 34 additions & 58 deletions

File tree

src/ChartJS/widgets/DoughnutChart/DoughnutChart.xml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,15 @@
4343
<category>Animation</category>
4444
<description>Animation duration (milliseconds) for responsive resizing. (Note: When implementing multiple charts, there can be problems with rendering. You can set this to 0 when having problems)</description>
4545
</property>
46-
<property key="chartAnimation" type="boolean" required="true" defaultValue="true">
47-
<caption>Animation</caption>
46+
<property key="animateRotate" type="boolean" required="true" defaultValue="true">
47+
<caption>Animate Rotate</caption>
48+
<category>Animation</category>
49+
<description>Whether to animate the rotation of the chart.</description>
50+
</property>
51+
<property key="animateScale" type="boolean" required="true" defaultValue="false">
52+
<caption>Animate Scale</caption>
4853
<category>Animation</category>
49-
<description>Switch animation on and off. Try to switch it off when you have rendering problems with multiple charts on a page</description>
54+
<description>Whether to animate scaling the chart from the centre.</description>
5055
</property>
5156
<property key="animationDuration" type="integer" required="true" defaultValue="1000">
5257
<caption>Animation duration</caption>
@@ -226,21 +231,6 @@
226231
<category>Settings</category>
227232
<description>The width of the stroke value in pixels.</description>
228233
</property>
229-
<property key="animationSteps" type="string" required="true" defaultValue="100">
230-
<caption>Animation Steps</caption>
231-
<category>Settings</category>
232-
<description>Amount of animation steps.</description>
233-
</property>
234-
<property key="animateRotate" type="boolean" required="true" defaultValue="true">
235-
<caption>Animate Rotate</caption>
236-
<category>Settings</category>
237-
<description>Whether to animate the rotation of the chart.</description>
238-
</property>
239-
<property key="animateScale" type="boolean" required="true" defaultValue="false">
240-
<caption>Animate Scale</caption>
241-
<category>Settings</category>
242-
<description>Whether to animate scaling the chart from the centre.</description>
243-
</property>
244234
<property key="showLegend" type="boolean" required="true" defaultValue="true">
245235
<caption>Show Legend (ChartJS)</caption>
246236
<category>Legend</category>

src/ChartJS/widgets/DoughnutChart/widget/DoughnutChart.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,15 @@ define([
112112
}
113113
},
114114

115-
//Number - Amount of animation steps
116-
animationSteps: this.animationSteps,
117-
118-
//String - Animation easing effect
119-
animationEasing: this.animationEasing,
120-
121-
//Boolean - Whether we animate the rotation of the Doughnut
122-
animateRotate: this.animateRotate,
123-
124-
//Boolean - Whether we animate scaling the Doughnut from the centre
125-
animateScale: this.animateScale,
115+
animation: {
116+
//Boolean - Whether we animate the rotation of the Doughnut
117+
animateRotate: this.animateRotate,
118+
//Boolean - Whether we animate scaling the Doughnut from the centre
119+
animateScale: this.animateScale,
120+
duration: this.animationDuration,
121+
//String - Animation easing effect
122+
easing: this.animationEasing
123+
},
126124

127125
legendCallback: this._legendAlternateCallback,
128126

src/ChartJS/widgets/PieChart/PieChart.xml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,15 @@
4646
<category>Animation</category>
4747
<description>Animation duration (milliseconds) for responsive resizing. (Note: When implementing multiple charts, there can be problems with rendering. You can set this to 0 when having problems)</description>
4848
</property>
49-
<property key="chartAnimation" type="boolean" required="true" defaultValue="true">
50-
<caption>Animation</caption>
49+
<property key="animateRotate" type="boolean" required="true" defaultValue="true">
50+
<caption>Animate Rotate</caption>
51+
<category>Animation</category>
52+
<description>Whether to animate the rotation of the chart.</description>
53+
</property>
54+
<property key="animateScale" type="boolean" required="true" defaultValue="false">
55+
<caption>Animate Scale</caption>
5156
<category>Animation</category>
52-
<description>Switch animation on and off. Try to switch it off when you have rendering problems with multiple charts on a page</description>
57+
<description>Whether to animate scaling the chart from the centre.</description>
5358
</property>
5459
<property key="animationDuration" type="integer" required="true" defaultValue="1000">
5560
<caption>Animation duration</caption>
@@ -228,21 +233,6 @@
228233
<category>Settings</category>
229234
<description>The width of the stroke value in pixels.</description>
230235
</property>
231-
<property key="animationSteps" type="string" required="true" defaultValue="100">
232-
<caption>Animation Steps</caption>
233-
<category>Settings</category>
234-
<description>Amount of animation steps.</description>
235-
</property>
236-
<property key="animateRotate" type="boolean" required="true" defaultValue="true">
237-
<caption>Animate Rotate</caption>
238-
<category>Settings</category>
239-
<description>Whether to animate the rotation of the chart.</description>
240-
</property>
241-
<property key="animateScale" type="boolean" required="true" defaultValue="false">
242-
<caption>Animate Scale</caption>
243-
<category>Settings</category>
244-
<description>Whether to animate scaling the chart from the centre.</description>
245-
</property>
246236
<property key="showLegend" type="boolean" required="true" defaultValue="true">
247237
<caption>Show Legend (ChartJS)</caption>
248238
<category>Legend</category>

src/ChartJS/widgets/PieChart/widget/PieChart.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,15 @@ define([
116116
}
117117
},
118118

119-
//Number - Amount of animation steps
120-
animationSteps: this.animationSteps,
121-
122-
//String - Animation easing effect
123-
animationEasing: this.animationEasing,
124-
125-
//Boolean - Whether we animate the rotation of the Doughnut
126-
animateRotate: this.animateRotate,
127-
128-
//Boolean - Whether we animate scaling the Doughnut from the centre
129-
animateScale: this.animateScale,
119+
animation: {
120+
//Boolean - Whether we animate the rotation of the Doughnut
121+
animateRotate: this.animateRotate,
122+
//Boolean - Whether we animate scaling the Doughnut from the centre
123+
animateScale: this.animateScale,
124+
duration: this.animationDuration,
125+
//String - Animation easing effect
126+
easing: this.animationEasing
127+
},
130128

131129
legendCallback: this._legendAlternateCallback,
132130

0 commit comments

Comments
 (0)