You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2021/07/16 13:47:05 UTC
[echarts-examples] branch dev updated (0eb0dcd -> ed8fcfe)
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a change to branch dev
in repository https://gitbox.apache.org/repos/asf/echarts-examples.git.
from 0eb0dcd tweak start time
new f5488e3 add more animation screenshot
new ed8fcfe resize animation webp
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
README.md | 13 +++++++++++++
public/data/gauge-clock.js | 4 +++-
public/data/gauge-ring.js | 5 +++++
public/data/gauge-simple.js | 2 ++
public/data/gauge-temperature.js | 2 ++
public/data/line-race.js | 4 ++--
public/data/pictorialBar-bar-transition.js | 2 +-
public/data/pictorialBar-forest.js | 3 ++-
public/data/pictorialBar-hill.js | 2 ++
public/data/scatter-symbol-morph.js | 2 +-
public/data/treemap-sunburst-transition.js | 2 +-
tool/build-example.js | 9 +++++----
12 files changed, 39 insertions(+), 11 deletions(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[echarts-examples] 02/02: resize animation webp
Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/echarts-examples.git
commit ed8fcfe529cda70bc60d7ed7f8198ad589563980
Author: pissang <bm...@gmail.com>
AuthorDate: Fri Jul 16 21:45:50 2021 +0800
resize animation webp
---
public/data/gauge-clock.js | 4 ++--
public/data/gauge-ring.js | 2 +-
tool/build-example.js | 5 +++--
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/public/data/gauge-clock.js b/public/data/gauge-clock.js
index 8490994..d1a25fd 100644
--- a/public/data/gauge-clock.js
+++ b/public/data/gauge-clock.js
@@ -4,8 +4,8 @@ titleCN: 时钟仪表盘
category: gauge
shotWidth: 1000
difficulty: 7
-videoStart: 1000
-videoEnd: 5000
+videoStart: 2000
+videoEnd: 8000
*/
option = {
diff --git a/public/data/gauge-ring.js b/public/data/gauge-ring.js
index 1ea2593..fde38b8 100644
--- a/public/data/gauge-ring.js
+++ b/public/data/gauge-ring.js
@@ -4,7 +4,7 @@ titleCN: 得分环
category: gauge
difficulty: 5
videoStart: 1000
-videoEnd: 5000
+videoEnd: 8000
*/
option = {
diff --git a/tool/build-example.js b/tool/build-example.js
index ed0749f..016592b 100644
--- a/tool/build-example.js
+++ b/tool/build-example.js
@@ -63,6 +63,7 @@ const BUILD_THUMBS = !args.no_thumb;
const DEFAULT_PAGE_WIDTH = 700;
const DEFAULT_PAGE_RATIO = 0.75;
const OUTPUT_IMAGE_WIDTH = 600;
+const OUTPUT_IMAGE_HEIGHT = OUTPUT_IMAGE_WIDTH * DEFAULT_PAGE_RATIO;
const PORT = 3323;
const BASE_URL = `http://localhost:${PORT}`;
@@ -194,7 +195,7 @@ async function takeScreenshot(
});
await sharp(filePathTmpRaw)
- .resize(OUTPUT_IMAGE_WIDTH, OUTPUT_IMAGE_WIDTH * DEFAULT_PAGE_RATIO)
+ .resize(OUTPUT_IMAGE_WIDTH, OUTPUT_IMAGE_HEIGHT)
.toFile(filePathTmp);
const {diffRatio} = await compareImage(filePath, filePathTmp, 0.1);
@@ -227,7 +228,7 @@ async function takeScreenshot(
// await ffmpeg.run('-i', webmFile, '-f', 'webp', `${fileBase}.webp`);
// await fs.promises.writeFile('./test.mp4', ffmpeg.FS('readFile', `${fileBase}.webp`));
// ffmpeg.exit(0);
- shell.exec(`ffmpeg -y -i ${fileBase}.webm -f webp ${fileBase}.webp`);
+ shell.exec(`ffmpeg -y -i ${fileBase}.webm -s ${OUTPUT_IMAGE_WIDTH}x${OUTPUT_IMAGE_HEIGHT} -f webp ${fileBase}.webp`);
fs.unlinkSync(webmFile);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[echarts-examples] 01/02: add more animation screenshot
Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/echarts-examples.git
commit f5488e34124aa32a9c66eb8a74405913e75e5648
Author: pissang <bm...@gmail.com>
AuthorDate: Fri Jul 16 21:40:12 2021 +0800
add more animation screenshot
---
README.md | 13 +++++++++++++
public/data/gauge-clock.js | 4 +++-
public/data/gauge-ring.js | 5 +++++
public/data/gauge-simple.js | 2 ++
public/data/gauge-temperature.js | 2 ++
public/data/line-race.js | 4 ++--
public/data/pictorialBar-bar-transition.js | 2 +-
public/data/pictorialBar-forest.js | 3 ++-
public/data/pictorialBar-hill.js | 2 ++
public/data/scatter-symbol-morph.js | 2 +-
public/data/treemap-sunburst-transition.js | 2 +-
tool/build-example.js | 4 ++--
12 files changed, 36 insertions(+), 9 deletions(-)
diff --git a/README.md b/README.md
index 52891ef..b56d153 100644
--- a/README.md
+++ b/README.md
@@ -40,6 +40,19 @@ category: 'line, visualMap'
describes the meta info of this example.
+If you want to record a video to show the animation when genering screenshot. Use `videoStart` and `videoEnd`:
+
+```js
+/*
+title: Bar Race
+titleCN: 动态排序柱状图
+category: bar
+difficulty: 5
+videoStart: 1000
+videoEnd: 6000
+*/
+```
+
## Some built-in features available in examples
diff --git a/public/data/gauge-clock.js b/public/data/gauge-clock.js
index f7ba17c..8490994 100644
--- a/public/data/gauge-clock.js
+++ b/public/data/gauge-clock.js
@@ -1,9 +1,11 @@
/*
-title: Clock Gauge
+title: Clock
titleCN: 时钟仪表盘
category: gauge
shotWidth: 1000
difficulty: 7
+videoStart: 1000
+videoEnd: 5000
*/
option = {
diff --git a/public/data/gauge-ring.js b/public/data/gauge-ring.js
index 5c88cd8..1ea2593 100644
--- a/public/data/gauge-ring.js
+++ b/public/data/gauge-ring.js
@@ -3,6 +3,8 @@ title: Ring Gauge
titleCN: 得分环
category: gauge
difficulty: 5
+videoStart: 1000
+videoEnd: 5000
*/
option = {
@@ -48,6 +50,7 @@ option = {
offsetCenter: ['0%', '-30%']
},
detail: {
+ valueAnimation: true,
offsetCenter: ['0%', '-20%']
}
},
@@ -58,6 +61,7 @@ option = {
offsetCenter: ['0%', '0%']
},
detail: {
+ valueAnimation: true,
offsetCenter: ['0%', '10%']
}
},
@@ -68,6 +72,7 @@ option = {
offsetCenter: ['0%', '30%']
},
detail: {
+ valueAnimation: true,
offsetCenter: ['0%', '40%']
}
}
diff --git a/public/data/gauge-simple.js b/public/data/gauge-simple.js
index 0921e43..f438cd1 100644
--- a/public/data/gauge-simple.js
+++ b/public/data/gauge-simple.js
@@ -3,6 +3,8 @@ title: Simple Gauge
titleCN: 带标签数字动画的基础仪表盘
category: gauge
difficulty: 1
+videoStart: 0
+videoEnd: 1000
*/
option = {
diff --git a/public/data/gauge-temperature.js b/public/data/gauge-temperature.js
index ac8f74c..58f199c 100644
--- a/public/data/gauge-temperature.js
+++ b/public/data/gauge-temperature.js
@@ -3,6 +3,8 @@ title: Temperature Gauge chart
titleCN: 气温仪表盘
category: gauge
difficulty: 4
+videoStart: 2000
+videoEnd: 5000
*/
option = {
diff --git a/public/data/line-race.js b/public/data/line-race.js
index 4cfa9f4..3125111 100644
--- a/public/data/line-race.js
+++ b/public/data/line-race.js
@@ -3,8 +3,8 @@ title: Line Race
category: line
titleCN: 动态排序折线图
difficulty: 5
-videoStart: 1000
-videoEnd: 6000
+videoStart: 3000
+videoEnd: 8000
*/
$.get(ROOT_PATH + '/data/asset/data/life-expectancy-table.json', function (_rawData) {
diff --git a/public/data/pictorialBar-bar-transition.js b/public/data/pictorialBar-bar-transition.js
index 56c4887..45317cd 100644
--- a/public/data/pictorialBar-bar-transition.js
+++ b/public/data/pictorialBar-bar-transition.js
@@ -1,5 +1,5 @@
/*
-title: Aggregate Scatter to Bar
+title: Transition between pictorialBar and bar
category: pictorialBar, animation
titleCN: 象形主图变形为柱状图
difficulty: 4
diff --git a/public/data/pictorialBar-forest.js b/public/data/pictorialBar-forest.js
index 8b001a6..318cdfe 100644
--- a/public/data/pictorialBar-forest.js
+++ b/public/data/pictorialBar-forest.js
@@ -2,7 +2,8 @@
title: Expansion of forest
category: pictorialBar
titleCN: 森林的增长
-shotDelay: 5000
+videoStart: 4000
+videoEnd: 10000
*/
var treeDataURI = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAA2CAYAAADUOvnEAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA5tJREFUeNrcWE1oE0EUnp0kbWyUpCiNYEpCFSpIMdpLRTD15s2ePHixnj00N4/GoyfTg2fbiwdvvagHC1UQ66GQUIQKKgn1UAqSSFua38b3prPJZDs7s5ufKn0w7CaZ2W/fe9/73kyMRqNB3Nrj1zdn4RJ6du9T2u1a2iHYSxjP4d41oOHGQwAIwSUHIyh8/RA8XeiXh0kLGFoaXiTecw/hoTG4ZCSAaFkY0+BpsZceLtiAoV2FkepZSDk5EpppczBvpuuQCqx0YnkYcVVoqQYMyeCG+lFdaGkXeVOFNu4aEBalOBk6sbQrQF7gSdK5JXjuHXu [...]
diff --git a/public/data/pictorialBar-hill.js b/public/data/pictorialBar-hill.js
index dfe7373..956b04c 100644
--- a/public/data/pictorialBar-hill.js
+++ b/public/data/pictorialBar-hill.js
@@ -2,6 +2,8 @@
title: Wish List and Mountain Height
category: pictorialBar
titleCN: 圣诞愿望清单和山峰高度
+videoStart: 0
+videoEnd: 2000
*/
var paperDataURI = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJgAAAAyCAYAAACgRRKpAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAB6FJREFUeNrsnE9y2zYYxUmRkig7spVdpx3Hdqb7ZNeFO2PdoD1Cj9DeoEdKbmDPeNFNW7lu0y7tRZvsYqfjWhL/qPgggoIggABIQKQkwsOhE5sQCfzw3uNHJu5sNnOaZq29RttolwfAbxgwChO9nad//4C2C7S9Sfe3uzQobqNghdoJBdIw3R8qHnvNANcA1sBUGCaV9pYC7rYBbLvbgAFpaBgmWbujlO1NA9h2wQTbcdHOoih2ZujLa7WcFtoMtUsKuFEDWL3bkAHq2GTnT+OJkyTzsXRd1/G8FoYN9vBnQ+pGZ7f7BrDqYSLbq6IdxXGM96 [...]
diff --git a/public/data/scatter-symbol-morph.js b/public/data/scatter-symbol-morph.js
index 5c43c66..c3006a5 100644
--- a/public/data/scatter-symbol-morph.js
+++ b/public/data/scatter-symbol-morph.js
@@ -1,6 +1,6 @@
/*
title: Symbol Shape Morph
-category: treemap, sunburst
+category: scatter
titleCN: 散点图变形动画
difficulty: 4
videoStart: 1000
diff --git a/public/data/treemap-sunburst-transition.js b/public/data/treemap-sunburst-transition.js
index 9142a57..6e88c01 100644
--- a/public/data/treemap-sunburst-transition.js
+++ b/public/data/treemap-sunburst-transition.js
@@ -1,6 +1,6 @@
/*
title: Transition between Treemap and Sunburst
-category: treemap, sunburst
+category: treemap
titleCN: 矩形树图和旭日图的动画过渡
difficulty: 4
videoStart: 3000
diff --git a/tool/build-example.js b/tool/build-example.js
index 436c331..ed0749f 100644
--- a/tool/build-example.js
+++ b/tool/build-example.js
@@ -106,7 +106,7 @@ async function takeScreenshot(
return;
}
timeout += 100;
- if (timeout >= 4000 + videoEnd) {
+ if (timeout >= 20000 + videoEnd) {
console.error(fileBase + ' download timeout.');
resolve();
return;
@@ -352,7 +352,7 @@ async function takeScreenshot(
await browser.close();
throw new Error(e.toString());
}
- }, sourceFolder === 'data-gl' ? 2 : 16);
+ }, sourceFolder === 'data-gl' ? 2 : 4);
if (BUILD_THUMBS) {
server.close();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org