Skip to content

Commit 8d36273

Browse files
author
Jelte Lagendijk
committed
AnimationEase as an enumeration (#32), moved animation settings to different tab
1 parent 43ce9ac commit 8d36273

File tree

10 files changed

+598
-339
lines changed

10 files changed

+598
-339
lines changed

src/ChartJS/widgets/BarChart/BarChart.xml

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,60 @@
4747
<category>Appearance</category>
4848
<description>Font used in the chart legend. Default (or empty) = Helvetica Neue</description>
4949
</property>
50-
<property key="responsiveAnimationDuration" type="integer" required="true" defaultValue="0">
50+
<!-- Animation -->
51+
<property key="responsiveAnimationDuration" type="integer" required="true" defaultValue="1000">
5152
<caption>Responsive animation duration</caption>
52-
<category>Appearance</category>
53+
<category>Animation</category>
5354
<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>
5455
</property>
5556
<property key="chartAnimation" type="boolean" required="true" defaultValue="true">
5657
<caption>Animation</caption>
57-
<category>Appearance</category>
58+
<category>Animation</category>
5859
<description>Switch animation on and off. Try to switch it off when you have rendering problems with multiple charts on a page</description>
5960
</property>
6061
<property key="animationDuration" type="integer" required="true" defaultValue="1000">
6162
<caption>Animation duration</caption>
62-
<category>Appearance</category>
63+
<category>Animation</category>
6364
<description>Animation duration (milliseconds) for rendering (this is different from the Responsive animation duration)</description>
6465
</property>
66+
<property key="animationEasing" type="enumeration" required="true" defaultValue="easeOutQuart">
67+
<caption>Animation easing</caption>
68+
<category>Animation</category>
69+
<description>Animation easing function (the way it animates). See examples at: http://easings.net</description>
70+
<enumerationValues>
71+
<enumerationValue key="linear">linear</enumerationValue>
72+
<enumerationValue key="easeInSine">easeInSine</enumerationValue>
73+
<enumerationValue key="easeOutSine">easeOutSine</enumerationValue>
74+
<enumerationValue key="easeInOutSine">easeInOutSine</enumerationValue>
75+
<enumerationValue key="easeInQuad">easeInQuad</enumerationValue>
76+
<enumerationValue key="easeOutQuad">easeOutQuad</enumerationValue>
77+
<enumerationValue key="easeInOutQuad">easeInOutQuad</enumerationValue>
78+
<enumerationValue key="easeInCubic">easeInCubic</enumerationValue>
79+
<enumerationValue key="easeOutCubic">easeOutCubic</enumerationValue>
80+
<enumerationValue key="easeInOutCubic">easeInOutCubic</enumerationValue>
81+
<enumerationValue key="easeInQuart">easeInQuart</enumerationValue>
82+
<enumerationValue key="easeOutQuart">easeOutQuart</enumerationValue>
83+
<enumerationValue key="easeInOutQuart">easeInOutQuart</enumerationValue>
84+
<enumerationValue key="easeInQuint">easeInQuint</enumerationValue>
85+
<enumerationValue key="easeOutQuint">easeOutQuint</enumerationValue>
86+
<enumerationValue key="easeInOutQuint">easeInOutQuint</enumerationValue>
87+
<enumerationValue key="easeInExpo">easeInExpo</enumerationValue>
88+
<enumerationValue key="easeOutExpo">easeOutExpo</enumerationValue>
89+
<enumerationValue key="easeInOutExpo">easeInOutExpo</enumerationValue>
90+
<enumerationValue key="easeInCirc">easeInCirc</enumerationValue>
91+
<enumerationValue key="easeOutCirc">easeOutCirc</enumerationValue>
92+
<enumerationValue key="easeInOutCirc">easeInOutCirc</enumerationValue>
93+
<enumerationValue key="easeInBack">easeInBack</enumerationValue>
94+
<enumerationValue key="easeOutBack">easeOutBack</enumerationValue>
95+
<enumerationValue key="easeInOutBack">easeInOutBack</enumerationValue>
96+
<enumerationValue key="easeInElastic">easeInElastic</enumerationValue>
97+
<enumerationValue key="easeOutElastic">easeOutElastic</enumerationValue>
98+
<enumerationValue key="easeInOutElastic">easeInOutElastic</enumerationValue>
99+
<enumerationValue key="easeInBounce">easeInBounce</enumerationValue>
100+
<enumerationValue key="easeOutBounce">easeOutBounce</enumerationValue>
101+
<enumerationValue key="easeInOutBounce">easeInOutBounce</enumerationValue>
102+
</enumerationValues>
103+
</property>
65104
<!-- Data Source -->
66105
<property key="sourceentity" type="entity" required="true" allowNonPersistableEntities="true">
67106
<caption>Chart Entity</caption>

src/ChartJS/widgets/Core.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,8 @@ define([
572572
maintainAspectRatio : this.maintainAspectRatio,
573573
showTooltips : this.showTooltips,
574574
animation: {
575-
duration: this.chartAnimation ? this.animationDuration : 0
575+
duration: this.chartAnimation ? this.animationDuration : 0,
576+
easing: this.animationEasing
576577
}
577578
};
578579

src/ChartJS/widgets/DoughnutChart/DoughnutChart.xml

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,60 @@
3737
<category>Appearance</category>
3838
<description>The size of the chart title. Default is 12</description>
3939
</property>
40-
<property key="responsiveAnimationDuration" type="integer" required="true" defaultValue="0">
40+
<!-- Animation -->
41+
<property key="responsiveAnimationDuration" type="integer" required="true" defaultValue="1000">
4142
<caption>Responsive animation duration</caption>
42-
<category>Appearance</category>
43+
<category>Animation</category>
4344
<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>
4445
</property>
4546
<property key="chartAnimation" type="boolean" required="true" defaultValue="true">
4647
<caption>Animation</caption>
47-
<category>Appearance</category>
48+
<category>Animation</category>
4849
<description>Switch animation on and off. Try to switch it off when you have rendering problems with multiple charts on a page</description>
4950
</property>
5051
<property key="animationDuration" type="integer" required="true" defaultValue="1000">
5152
<caption>Animation duration</caption>
52-
<category>Appearance</category>
53+
<category>Animation</category>
5354
<description>Animation duration (milliseconds) for rendering (this is different from the Responsive animation duration)</description>
5455
</property>
56+
<property key="animationEasing" type="enumeration" required="true" defaultValue="easeOutQuart">
57+
<caption>Animation easing</caption>
58+
<category>Animation</category>
59+
<description>Animation easing function (the way it animates). See examples at: http://easings.net</description>
60+
<enumerationValues>
61+
<enumerationValue key="linear">linear</enumerationValue>
62+
<enumerationValue key="easeInSine">easeInSine</enumerationValue>
63+
<enumerationValue key="easeOutSine">easeOutSine</enumerationValue>
64+
<enumerationValue key="easeInOutSine">easeInOutSine</enumerationValue>
65+
<enumerationValue key="easeInQuad">easeInQuad</enumerationValue>
66+
<enumerationValue key="easeOutQuad">easeOutQuad</enumerationValue>
67+
<enumerationValue key="easeInOutQuad">easeInOutQuad</enumerationValue>
68+
<enumerationValue key="easeInCubic">easeInCubic</enumerationValue>
69+
<enumerationValue key="easeOutCubic">easeOutCubic</enumerationValue>
70+
<enumerationValue key="easeInOutCubic">easeInOutCubic</enumerationValue>
71+
<enumerationValue key="easeInQuart">easeInQuart</enumerationValue>
72+
<enumerationValue key="easeOutQuart">easeOutQuart</enumerationValue>
73+
<enumerationValue key="easeInOutQuart">easeInOutQuart</enumerationValue>
74+
<enumerationValue key="easeInQuint">easeInQuint</enumerationValue>
75+
<enumerationValue key="easeOutQuint">easeOutQuint</enumerationValue>
76+
<enumerationValue key="easeInOutQuint">easeInOutQuint</enumerationValue>
77+
<enumerationValue key="easeInExpo">easeInExpo</enumerationValue>
78+
<enumerationValue key="easeOutExpo">easeOutExpo</enumerationValue>
79+
<enumerationValue key="easeInOutExpo">easeInOutExpo</enumerationValue>
80+
<enumerationValue key="easeInCirc">easeInCirc</enumerationValue>
81+
<enumerationValue key="easeOutCirc">easeOutCirc</enumerationValue>
82+
<enumerationValue key="easeInOutCirc">easeInOutCirc</enumerationValue>
83+
<enumerationValue key="easeInBack">easeInBack</enumerationValue>
84+
<enumerationValue key="easeOutBack">easeOutBack</enumerationValue>
85+
<enumerationValue key="easeInOutBack">easeInOutBack</enumerationValue>
86+
<enumerationValue key="easeInElastic">easeInElastic</enumerationValue>
87+
<enumerationValue key="easeOutElastic">easeOutElastic</enumerationValue>
88+
<enumerationValue key="easeInOutElastic">easeInOutElastic</enumerationValue>
89+
<enumerationValue key="easeInBounce">easeInBounce</enumerationValue>
90+
<enumerationValue key="easeOutBounce">easeOutBounce</enumerationValue>
91+
<enumerationValue key="easeInOutBounce">easeInOutBounce</enumerationValue>
92+
</enumerationValues>
93+
</property>
5594
<!-- Data Source -->
5695
<property key="sourceentity" type="entity" required="true" allowNonPersistableEntities="true">
5796
<caption>Chart Entity</caption>
@@ -192,11 +231,6 @@
192231
<category>Settings</category>
193232
<description>Amount of animation steps.</description>
194233
</property>
195-
<property key="animationEasing" type="string" required="true" defaultValue="easeOutBounce">
196-
<caption>Animation Easing</caption>
197-
<category>Settings</category>
198-
<description>Animation easing effect.</description>
199-
</property>
200234
<property key="animateRotate" type="boolean" required="true" defaultValue="true">
201235
<caption>Animate Rotate</caption>
202236
<category>Settings</category>

src/ChartJS/widgets/LineChart/LineChart.xml

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,60 @@
5454
<category>Appearance</category>
5555
<description>Font used in the chart legend. Default (or empty) = Helvetica Neue</description>
5656
</property>
57-
<property key="responsiveAnimationDuration" type="integer" required="true" defaultValue="0">
57+
<!-- Animation -->
58+
<property key="responsiveAnimationDuration" type="integer" required="true" defaultValue="1000">
5859
<caption>Responsive animation duration</caption>
59-
<category>Appearance</category>
60+
<category>Animation</category>
6061
<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>
6162
</property>
6263
<property key="chartAnimation" type="boolean" required="true" defaultValue="true">
6364
<caption>Animation</caption>
64-
<category>Appearance</category>
65+
<category>Animation</category>
6566
<description>Switch animation on and off. Try to switch it off when you have rendering problems with multiple charts on a page</description>
6667
</property>
6768
<property key="animationDuration" type="integer" required="true" defaultValue="1000">
6869
<caption>Animation duration</caption>
69-
<category>Appearance</category>
70+
<category>Animation</category>
7071
<description>Animation duration (milliseconds) for rendering (this is different from the Responsive animation duration)</description>
7172
</property>
73+
<property key="animationEasing" type="enumeration" required="true" defaultValue="easeOutQuart">
74+
<caption>Animation easing</caption>
75+
<category>Animation</category>
76+
<description>Animation easing function (the way it animates). See examples at: http://easings.net</description>
77+
<enumerationValues>
78+
<enumerationValue key="linear">linear</enumerationValue>
79+
<enumerationValue key="easeInSine">easeInSine</enumerationValue>
80+
<enumerationValue key="easeOutSine">easeOutSine</enumerationValue>
81+
<enumerationValue key="easeInOutSine">easeInOutSine</enumerationValue>
82+
<enumerationValue key="easeInQuad">easeInQuad</enumerationValue>
83+
<enumerationValue key="easeOutQuad">easeOutQuad</enumerationValue>
84+
<enumerationValue key="easeInOutQuad">easeInOutQuad</enumerationValue>
85+
<enumerationValue key="easeInCubic">easeInCubic</enumerationValue>
86+
<enumerationValue key="easeOutCubic">easeOutCubic</enumerationValue>
87+
<enumerationValue key="easeInOutCubic">easeInOutCubic</enumerationValue>
88+
<enumerationValue key="easeInQuart">easeInQuart</enumerationValue>
89+
<enumerationValue key="easeOutQuart">easeOutQuart</enumerationValue>
90+
<enumerationValue key="easeInOutQuart">easeInOutQuart</enumerationValue>
91+
<enumerationValue key="easeInQuint">easeInQuint</enumerationValue>
92+
<enumerationValue key="easeOutQuint">easeOutQuint</enumerationValue>
93+
<enumerationValue key="easeInOutQuint">easeInOutQuint</enumerationValue>
94+
<enumerationValue key="easeInExpo">easeInExpo</enumerationValue>
95+
<enumerationValue key="easeOutExpo">easeOutExpo</enumerationValue>
96+
<enumerationValue key="easeInOutExpo">easeInOutExpo</enumerationValue>
97+
<enumerationValue key="easeInCirc">easeInCirc</enumerationValue>
98+
<enumerationValue key="easeOutCirc">easeOutCirc</enumerationValue>
99+
<enumerationValue key="easeInOutCirc">easeInOutCirc</enumerationValue>
100+
<enumerationValue key="easeInBack">easeInBack</enumerationValue>
101+
<enumerationValue key="easeOutBack">easeOutBack</enumerationValue>
102+
<enumerationValue key="easeInOutBack">easeInOutBack</enumerationValue>
103+
<enumerationValue key="easeInElastic">easeInElastic</enumerationValue>
104+
<enumerationValue key="easeOutElastic">easeOutElastic</enumerationValue>
105+
<enumerationValue key="easeInOutElastic">easeInOutElastic</enumerationValue>
106+
<enumerationValue key="easeInBounce">easeInBounce</enumerationValue>
107+
<enumerationValue key="easeOutBounce">easeOutBounce</enumerationValue>
108+
<enumerationValue key="easeInOutBounce">easeInOutBounce</enumerationValue>
109+
</enumerationValues>
110+
</property>
72111
<!-- Data Source -->
73112
<property key="sourceentity" type="entity" required="true" allowNonPersistableEntities="true">
74113
<caption>Chart Entity</caption>

0 commit comments

Comments
 (0)