This is an automated email from the ASF dual-hosted git repository. sushuang pushed a commit to branch next in repository https://gitbox.apache.org/repos/asf/incubator-echarts-examples.git
The following commit(s) were added to refs/heads/next by this push: new 1a20582 add example for valueAnimation. 1a20582 is described below commit 1a20582fccbbb7e927f48a25585e5c136e96341c Author: 100pah <sushuang0...@gmail.com> AuthorDate: Thu Nov 26 19:08:04 2020 +0800 add example for valueAnimation. --- public/data/doc-example/value-animation-simple.js | 60 +++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/public/data/doc-example/value-animation-simple.js b/public/data/doc-example/value-animation-simple.js new file mode 100644 index 0000000..fe79dcb --- /dev/null +++ b/public/data/doc-example/value-animation-simple.js @@ -0,0 +1,60 @@ +var Y_MAX = 1000; +var UPDATE_DURATION = 3000; +var initVal = makeRandomValue(); + +option = { + xAxis: { + data: ['a'], + axisLabel: { show: false } + }, + yAxis: { + max: Y_MAX + }, + legend: { + bottom: 10 + }, + series: [{ + name: 'valueAnimation: true', + type: 'bar', + data: [initVal], + label: { + show: true, + valueAnimation: true, + position: 'top', + fontSize: 40 + }, + barWidth: 20, + barGap: '1000%', + barCategoryGap: 200, + animationDurationUpdate: UPDATE_DURATION * 0.7, + animationEasingUpdate: 'linear' + }, { + name: 'valueAnimation: false', + type: 'bar', + data: [initVal], + label: { + show: true, + valueAnimation: false, + position: 'top', + fontSize: 40 + }, + barWidth: 20, + animationDurationUpdate: UPDATE_DURATION * 0.7, + animationEasingUpdate: 'linear' + }], +}; + +setInterval(function () { + var newVal = makeRandomValue(); + myChart.setOption({ + series: [{ + data: [newVal] + }, { + data: [newVal] + }] + }); +}, UPDATE_DURATION); + +function makeRandomValue() { + return Math.round(Math.random() * Y_MAX); +} \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org