You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by su...@apache.org on 2020/05/25 10:45:10 UTC
[incubator-echarts-website] branch asf-site updated: release 4.8.0
This is an automated email from the ASF dual-hosted git repository.
sushuang pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-echarts-website.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 44aac13 release 4.8.0
44aac13 is described below
commit 44aac133b8d236f9829ed2d0d15df54757013268
Author: 100pah <su...@gmail.com>
AuthorDate: Mon May 25 18:36:30 2020 +0800
release 4.8.0
---
README.md | 8 +-
components/builder.html | 8 +-
components/download.html | 8 +-
en/404.html | 2 +-
en/api.html | 8 +-
en/builder.html | 8 +-
en/builder/echarts.html | 2 +-
en/builder/src/echarts/chart/bar/BarView.js | 25 +-
.../src/echarts/chart/heatmap/HeatmapView.js | 4 +-
.../src/echarts/chart/helper/EffectSymbol.js | 3 +-
en/builder/src/echarts/chart/helper/LineDraw.js | 6 +-
en/builder/src/echarts/chart/helper/Symbol.js | 3 +-
.../chart/helper/createClipPathFromCoordSys.js | 5 +-
en/builder/src/echarts/chart/line/LineView.js | 30 +
en/builder/src/echarts/chart/map/MapSeries.js | 5 +-
en/builder/src/echarts/chart/pie/PieView.js | 33 +-
.../src/echarts/chart/sankey/sankeyLayout.js | 18 +
.../src/echarts/chart/sunburst/SunburstPiece.js | 1 +
.../src/echarts/chart/sunburst/SunburstSeries.js | 19 +-
.../src/echarts/chart/sunburst/SunburstView.js | 3 +-
en/builder/src/echarts/chart/tree/TreeSeries.js | 7 +-
.../src/echarts/chart/treemap/TreemapSeries.js | 18 +-
.../src/echarts/chart/treemap/TreemapView.js | 31 +-
en/builder/src/echarts/component/helper/MapDraw.js | 35 +-
en/builder/src/echarts/component/title.js | 7 +-
.../src/echarts/component/toolbox/ToolboxView.js | 2 +-
.../echarts/component/toolbox/feature/MagicType.js | 3 +-
.../component/toolbox/feature/SaveAsImage.js | 3 +-
.../src/echarts/component/tooltip/TooltipView.js | 2 +-
.../echarts/component/visualMap/PiecewiseModel.js | 9 +-
en/builder/src/echarts/coord/axisHelper.js | 38 +-
en/builder/src/echarts/coord/calendar/Calendar.js | 12 +-
en/builder/src/echarts/coord/geo/geoJSONLoader.js | 5 +-
.../src/echarts/coord/geo/geoSourceManager.js | 5 +-
en/builder/src/echarts/coord/geo/parseGeoJson.js | 5 +-
en/builder/src/echarts/coord/radar/Radar.js | 2 +-
en/builder/src/echarts/data/Tree.js | 27 +-
en/builder/src/echarts/echarts.js | 91 ++-
en/builder/src/echarts/langEN.js | 26 +
en/builder/src/echarts/loading/default.js | 69 +-
en/builder/src/echarts/model/Series.js | 2 +-
en/builder/src/echarts/util/format.js | 17 +-
en/builder/src/echarts/util/graphic.js | 19 +-
en/builder/src/echarts/visual/symbol.js | 14 +-
en/builder/src/zrender/Painter.js | 24 +-
en/builder/src/zrender/svg/Painter.js | 63 +-
en/builder/src/zrender/zrender.js | 2 +-
en/changelog.html | 47 +-
en/cheat-sheet.html | 2 +-
en/coding-standard.html | 2 +-
en/committers.html | 2 +-
en/dependencies.html | 2 +-
en/dist/echarts-en.common.js | 520 ++++++++++-----
en/dist/echarts-en.common.min.js | 2 +-
en/dist/echarts-en.js | 737 ++++++++++++++-------
en/dist/echarts-en.js.map | 2 +-
en/dist/echarts-en.min.js | 2 +-
en/dist/echarts-en.simple.js | 435 ++++++++----
en/dist/echarts-en.simple.min.js | 2 +-
en/dist/echarts.common.js | 494 +++++++++-----
en/dist/echarts.common.min.js | 2 +-
en/dist/echarts.js | 711 +++++++++++++-------
en/dist/echarts.js.map | 2 +-
en/dist/echarts.min.js | 2 +-
en/dist/echarts.simple.js | 409 ++++++++----
en/dist/echarts.simple.min.js | 2 +-
en/dist/extension/bmap.js | 338 +++++++++-
en/dist/extension/bmap.js.map | 2 +-
en/dist/extension/bmap.min.js | 2 +-
.../option-parts/option.visualMap-continuous.json | 8 +-
.../option-parts/option.visualMap-piecewise.json | 8 +-
en/documents/option.json | 2 +-
en/documents/tutorial-parts/tutorial.json | 6 +-
en/documents/tutorial.json | 2 +-
en/download-extension.html | 2 +-
en/download-map.html | 2 +-
en/download-theme.html | 2 +-
en/download.html | 4 +-
en/faq.html | 2 +-
en/feature.html | 2 +-
en/index.html | 4 +-
en/js/download.js | 2 +-
en/maillist.html | 2 +-
en/option-gl.html | 8 +-
en/option.html | 8 +-
en/option3.html | 2 +-
en/tutorial.html | 8 +-
examples/data/thumb-dark/area-pieces.jpg | Bin 16282 -> 16276 bytes
examples/data/thumb-dark/calendar-charts.jpg | Bin 19444 -> 19456 bytes
.../data/thumb-dark/calendar-effectscatter.jpg | Bin 44998 -> 45020 bytes
examples/data/thumb-dark/confidence-band.jpg | Bin 13166 -> 13225 bytes
examples/data/thumb-dark/custom-profile.jpg | Bin 19320 -> 19289 bytes
examples/data/thumb-dark/dynamic-data.jpg | Bin 23972 -> 23974 bytes
examples/data/thumb-dark/dynamic-data2.jpg | Bin 12102 -> 12007 bytes
examples/data/thumb-dark/effectScatter-bmap.jpg | Bin 14754 -> 14762 bytes
examples/data/thumb-dark/effectScatter-map.jpg | Bin 18262 -> 18289 bytes
examples/data/thumb-dark/geo-lines.jpg | Bin 13754 -> 13764 bytes
examples/data/thumb-dark/graph-webkit-dep.jpg | Bin 45004 -> 46107 bytes
examples/data/thumb-dark/heatmap-cartesian.jpg | Bin 21992 -> 21592 bytes
.../data/thumb-dark/heatmap-large-piecewise.jpg | Bin 40460 -> 40471 bytes
examples/data/thumb-dark/heatmap-large.jpg | Bin 28648 -> 28718 bytes
examples/data/thumb-dark/line-easing.jpg | Bin 27819 -> 27802 bytes
examples/data/thumb-dark/mix-timeline-finance.jpg | Bin 35302 -> 35302 bytes
examples/data/thumb-dark/pictorialBar-dotted.jpg | Bin 25065 -> 25017 bytes
examples/data/thumb-dark/scatter-effect.jpg | Bin 22842 -> 22847 bytes
.../scatter-life-expectancy-timeline.jpg | Bin 17873 -> 17892 bytes
examples/data/thumb-dark/scatter-nebula.jpg | Bin 35302 -> 35267 bytes
.../data/thumb-dark/scatter-nutrients-matrix.jpg | Bin 28131 -> 28133 bytes
examples/data/thumb-dark/scatter-nutrients.jpg | Bin 10807 -> 10796 bytes
examples/data/thumb-dark/scatter-weibo.jpg | Bin 33794 -> 33738 bytes
examples/data/thumb-light/area-pieces.jpg | Bin 16661 -> 16661 bytes
examples/data/thumb-light/calendar-charts.jpg | Bin 21208 -> 21208 bytes
.../data/thumb-light/calendar-effectscatter.jpg | Bin 44984 -> 45006 bytes
examples/data/thumb-light/confidence-band.jpg | Bin 12759 -> 12817 bytes
examples/data/thumb-light/custom-profile.jpg | Bin 16622 -> 16588 bytes
examples/data/thumb-light/dynamic-data.jpg | Bin 22147 -> 22156 bytes
examples/data/thumb-light/effectScatter-bmap.jpg | Bin 30088 -> 30067 bytes
examples/data/thumb-light/effectScatter-map.jpg | Bin 18308 -> 18303 bytes
examples/data/thumb-light/geo-lines.jpg | Bin 13345 -> 13430 bytes
.../data/thumb-light/graph-life-expectancy.jpg | Bin 16409 -> 16404 bytes
examples/data/thumb-light/graph-webkit-dep.jpg | Bin 37838 -> 37816 bytes
examples/data/thumb-light/heatmap-bmap.jpg | Bin 50499 -> 50397 bytes
examples/data/thumb-light/heatmap-cartesian.jpg | Bin 22905 -> 22385 bytes
.../data/thumb-light/heatmap-large-piecewise.jpg | Bin 41558 -> 41577 bytes
examples/data/thumb-light/heatmap-large.jpg | Bin 28416 -> 28458 bytes
examples/data/thumb-light/line-easing.jpg | Bin 31179 -> 31176 bytes
examples/data/thumb-light/mix-timeline-finance.jpg | Bin 31906 -> 31902 bytes
examples/data/thumb-light/pictorialBar-dotted.jpg | Bin 23827 -> 23766 bytes
examples/data/thumb-light/scatter-effect.jpg | Bin 16875 -> 16885 bytes
.../scatter-life-expectancy-timeline.jpg | Bin 17454 -> 17469 bytes
examples/data/thumb-light/scatter-nebula.jpg | Bin 33219 -> 33232 bytes
.../data/thumb-light/scatter-nutrients-matrix.jpg | Bin 27137 -> 27140 bytes
examples/data/thumb-light/scatter-nutrients.jpg | Bin 10824 -> 10830 bytes
examples/data/thumb-light/scatter-weibo.jpg | Bin 33794 -> 33696 bytes
examples/data/thumb/area-pieces.jpg | Bin 17211 -> 17219 bytes
examples/data/thumb/calendar-charts.jpg | Bin 21240 -> 21272 bytes
examples/data/thumb/calendar-effectscatter.jpg | Bin 44983 -> 45034 bytes
examples/data/thumb/confidence-band.jpg | Bin 12761 -> 12859 bytes
examples/data/thumb/custom-profile.jpg | Bin 17136 -> 16657 bytes
examples/data/thumb/dynamic-data.jpg | Bin 22683 -> 22674 bytes
examples/data/thumb/dynamic-data2.jpg | Bin 12926 -> 12835 bytes
examples/data/thumb/effectScatter-bmap.jpg | Bin 30086 -> 30061 bytes
examples/data/thumb/effectScatter-map.jpg | Bin 18329 -> 18301 bytes
examples/data/thumb/geo-lines.jpg | Bin 13355 -> 13339 bytes
examples/data/thumb/graph-force.jpg | Bin 22631 -> 22344 bytes
examples/data/thumb/graph-life-expectancy.jpg | Bin 16425 -> 16442 bytes
examples/data/thumb/graph-webkit-dep.jpg | Bin 41112 -> 41155 bytes
examples/data/thumb/heatmap-bmap.jpg | Bin 50499 -> 50397 bytes
examples/data/thumb/heatmap-cartesian.jpg | Bin 22905 -> 22385 bytes
examples/data/thumb/heatmap-large-piecewise.jpg | Bin 41558 -> 41577 bytes
examples/data/thumb/heatmap-large.jpg | Bin 28416 -> 28458 bytes
examples/data/thumb/line-easing.jpg | Bin 31984 -> 31994 bytes
examples/data/thumb/mix-timeline-finance.jpg | Bin 31671 -> 31724 bytes
examples/data/thumb/pictorialBar-dotted.jpg | Bin 24257 -> 24200 bytes
examples/data/thumb/scatter-effect.jpg | Bin 21245 -> 21239 bytes
.../thumb/scatter-life-expectancy-timeline.jpg | Bin 17463 -> 17466 bytes
examples/data/thumb/scatter-nebula.jpg | Bin 33232 -> 33213 bytes
examples/data/thumb/scatter-nutrients-matrix.jpg | Bin 27149 -> 27161 bytes
examples/data/thumb/scatter-nutrients.jpg | Bin 10820 -> 10822 bytes
examples/data/thumb/scatter-weibo.jpg | Bin 33737 -> 33794 bytes
examples/en/editor.html | 4 +-
examples/en/index.html | 4 +-
examples/en/view.html | 4 +-
examples/vendors/echarts/echarts.js | 711 +++++++++++++-------
examples/vendors/echarts/echarts.min.js | 2 +-
examples/vendors/echarts/extension/bmap.js | 338 +++++++++-
examples/vendors/echarts/extension/bmap.js.map | 2 +-
examples/vendors/echarts/extension/bmap.min.js | 2 +-
examples/vendors/echarts/map/js/province/gansu.js | 4 +-
examples/zh/editor.html | 4 +-
examples/zh/index.html | 4 +-
examples/zh/view.html | 4 +-
layouts/basic.html | 2 +-
layouts/doc-old.html | 8 +-
layouts/doc.html | 8 +-
zh/404.html | 2 +-
zh/api.html | 8 +-
zh/builder.html | 8 +-
zh/builder/echarts.html | 2 +-
zh/builder/src/echarts/chart/bar/BarView.js | 25 +-
.../src/echarts/chart/heatmap/HeatmapView.js | 4 +-
.../src/echarts/chart/helper/EffectSymbol.js | 3 +-
zh/builder/src/echarts/chart/helper/LineDraw.js | 6 +-
zh/builder/src/echarts/chart/helper/Symbol.js | 3 +-
.../chart/helper/createClipPathFromCoordSys.js | 5 +-
zh/builder/src/echarts/chart/line/LineView.js | 30 +
zh/builder/src/echarts/chart/map/MapSeries.js | 5 +-
zh/builder/src/echarts/chart/pie/PieView.js | 33 +-
.../src/echarts/chart/sankey/sankeyLayout.js | 18 +
.../src/echarts/chart/sunburst/SunburstPiece.js | 1 +
.../src/echarts/chart/sunburst/SunburstSeries.js | 19 +-
.../src/echarts/chart/sunburst/SunburstView.js | 3 +-
zh/builder/src/echarts/chart/tree/TreeSeries.js | 7 +-
.../src/echarts/chart/treemap/TreemapSeries.js | 18 +-
.../src/echarts/chart/treemap/TreemapView.js | 31 +-
zh/builder/src/echarts/component/helper/MapDraw.js | 35 +-
zh/builder/src/echarts/component/title.js | 7 +-
.../src/echarts/component/toolbox/ToolboxView.js | 2 +-
.../echarts/component/toolbox/feature/MagicType.js | 3 +-
.../component/toolbox/feature/SaveAsImage.js | 3 +-
.../src/echarts/component/tooltip/TooltipView.js | 2 +-
.../echarts/component/visualMap/PiecewiseModel.js | 9 +-
zh/builder/src/echarts/coord/axisHelper.js | 38 +-
zh/builder/src/echarts/coord/calendar/Calendar.js | 12 +-
zh/builder/src/echarts/coord/geo/geoJSONLoader.js | 5 +-
.../src/echarts/coord/geo/geoSourceManager.js | 5 +-
zh/builder/src/echarts/coord/geo/parseGeoJson.js | 5 +-
zh/builder/src/echarts/coord/radar/Radar.js | 2 +-
zh/builder/src/echarts/data/Tree.js | 27 +-
zh/builder/src/echarts/echarts.js | 91 ++-
zh/builder/src/echarts/langEN.js | 26 +
zh/builder/src/echarts/loading/default.js | 69 +-
zh/builder/src/echarts/model/Series.js | 2 +-
zh/builder/src/echarts/util/format.js | 17 +-
zh/builder/src/echarts/util/graphic.js | 19 +-
zh/builder/src/echarts/visual/symbol.js | 14 +-
zh/builder/src/zrender/Painter.js | 24 +-
zh/builder/src/zrender/svg/Painter.js | 63 +-
zh/builder/src/zrender/zrender.js | 2 +-
zh/builder3.html | 2 +-
zh/changelog.html | 47 +-
zh/cheat-sheet.html | 2 +-
zh/coding-standard.html | 2 +-
zh/committers.html | 2 +-
zh/demo.html | 2 +-
zh/dependencies.html | 2 +-
zh/dist/echarts-en.common.js | 520 ++++++++++-----
zh/dist/echarts-en.common.min.js | 2 +-
zh/dist/echarts-en.js | 737 ++++++++++++++-------
zh/dist/echarts-en.js.map | 2 +-
zh/dist/echarts-en.min.js | 2 +-
zh/dist/echarts-en.simple.js | 435 ++++++++----
zh/dist/echarts-en.simple.min.js | 2 +-
zh/dist/echarts.common.js | 494 +++++++++-----
zh/dist/echarts.common.min.js | 2 +-
zh/dist/echarts.js | 711 +++++++++++++-------
zh/dist/echarts.js.map | 2 +-
zh/dist/echarts.min.js | 2 +-
zh/dist/echarts.simple.js | 409 ++++++++----
zh/dist/echarts.simple.min.js | 2 +-
zh/dist/extension/bmap.js | 338 +++++++++-
zh/dist/extension/bmap.js.map | 2 +-
zh/dist/extension/bmap.min.js | 2 +-
.../option-parts/option.visualMap-continuous.json | 8 +-
.../option-parts/option.visualMap-piecewise.json | 8 +-
zh/documents/option.json | 2 +-
zh/documents/tutorial-parts/tutorial.json | 4 +-
zh/documents/tutorial.json | 2 +-
zh/download-extension.html | 2 +-
zh/download-map.html | 2 +-
zh/download-theme.html | 2 +-
zh/download.html | 8 +-
zh/download3.html | 4 +-
zh/examples.html | 2 +-
zh/faq.html | 2 +-
zh/feature.html | 2 +-
zh/index.html | 4 +-
zh/js/download.js | 2 +-
zh/maillist.html | 2 +-
zh/option-gl.html | 8 +-
zh/option.html | 8 +-
zh/option3.html | 8 +-
zh/spreadsheet.html | 8 +-
zh/tutorial.html | 8 +-
264 files changed, 7326 insertions(+), 2837 deletions(-)
diff --git a/README.md b/README.md
index a5d6b7d..48376b2 100644
--- a/README.md
+++ b/README.md
@@ -35,7 +35,7 @@ export ECHARTS_BASE="/your/local/base/dir/path/of/these/projects"
-### If the built-in echarts dist needs to be upated
+### If the built-in echarts dist needs to be updated
**Prepare echarts source code**
```shell
@@ -67,7 +67,7 @@ ${ECHARTS_BASE}/echarts-www/builder/pre/removeDEV.js # remove __DEV__
```shell
code ${ECHARTS_BASE}/echarts-www/js/download.js
# Add the new release to the download list manually.
-code ${ECHARTS_BASE}/echarts-www/build.js
+code ${ECHARTS_BASE}/echarts-www/bin/build.js
# Set the `downloadVersion` to the newest version.
```
@@ -83,9 +83,11 @@ sh update-echarts.sh --only-copy-dist
**If any of the thumbnails need to be updated**
```shell
# Edit `BASE_PATH` in `build-example.js` firstly.
+code ${ECHARTS_BASE}/echarts-examples/tool/build-example.js
+# Generate thumbnails:
cd ${ECHARTS_BASE}/echarts-examples/tool
node build-example.js
-# if intending only make thumbnail for "public/data/foo.js" and "public/data/bar.js",
+# If intending only make thumbnail for "public/data/foo.js" and "public/data/bar.js",
# node build-example.js --pattern "foo,bar"
```
diff --git a/components/builder.html b/components/builder.html
index bf89bae..d550576 100644
--- a/components/builder.html
+++ b/components/builder.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/zh/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/zh/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/zh/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
@@ -7,7 +7,7 @@
document.head.insertBefore(el, document.getElementById('font-hack'));
}
</script><title>ECharts 在线构建</title><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/jquery@2.2.4/dist/jquery.min.js"></script></head><!--[if lte IE 8]><body class="lower-ie"><div id="lowie-main"><img src="https://echarts.cdn.apache.org/zh/images/forie.png" alt="ie tip"></div></body><![endif]-->
-<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Apache ECharts 是一个正在由 Apache 孵化器赞助的 Apache 开源基金会孵化的项目。</p><p>我们正在处理将本站跳转到 <a href="https://echarts.apache.org" target="_blank">https://echarts.apache.org</a> 的迁移工作。您可以现在就前往我们的 Apache 官网。</p></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn"><div>访问官网</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</ [...]
+<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Apache ECharts 是一个正在由 Apache 孵化器赞助的 Apache 开源基金会孵化的项目。</p><p>我们正在处理将本站跳转到 <a href="https://echarts.apache.org" target="_blank">https://echarts.apache.org</a> 的迁移工作。您可以现在就前往我们的 Apache 官网。</p></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn"><div>访问官网</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</ [...]
$('#charts input, #components input, #coords input').each(function () {
$(this).attr('checked', $(this).parent().hasClass('checked'));
});
@@ -52,14 +52,14 @@ $("#build").click(function () {
}
parameters += '&version=3'
- + '&versionCode=4.7.0';
+ + '&versionCode=4.8.0';
var email = $('#email').val();
var log = parameters;
if (email) {
log += '&email=' + email;
}
- _hmt.push(['_trackEvent', 'builder', 'build', '4.7.0', log]);
+ _hmt.push(['_trackEvent', 'builder', 'build', '4.8.0', log]);
window.open('https://echarts.cdn.apache.org/zh/builder/echarts.html?' + parameters);
});</script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
diff --git a/components/download.html b/components/download.html
index 24a6a6d..2204508 100644
--- a/components/download.html
+++ b/components/download.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/zh/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/zh/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/zh/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
@@ -7,7 +7,7 @@
document.head.insertBefore(el, document.getElementById('font-hack'));
}
</script><title>下载 - Apache ECharts (incubating)</title><script src="https://echarts.cdn.apache.org/zh/vendors/sweetalert.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/jquery@2.2.4/dist/jquery.min.js"></script></head><!--[if lte IE 8]><body class="lower-ie"><div id="lowie-main"><img src="https://echarts.cdn.apache.org/zh/images/forie.png" alt="ie tip"></div></body><![endif]-->
-<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Apache ECharts 是一个正在由 Apache 孵化器赞助的 Apache 开源基金会孵化的项目。</p><p>我们正在处理将本站跳转到 <a href="https://echarts.apache.org" target="_blank">https://echarts.apache.org</a> 的迁移工作。您可以现在就前往我们的 Apache 官网。</p></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn"><div>访问官网</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</ [...]
+<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Apache ECharts 是一个正在由 Apache 孵化器赞助的 Apache 开源基金会孵化的项目。</p><p>我们正在处理将本站跳转到 <a href="https://echarts.apache.org" target="_blank">https://echarts.apache.org</a> 的迁移工作。您可以现在就前往我们的 Apache 官网。</p></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn"><div>访问官网</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</ [...]
//- $('.download-echarts').click(function (e) {
//- var el = document.createElement('div');
@@ -23,10 +23,10 @@
//- title: 'Notice',
//- content: el
//- });
-//- _hmt.push(['_trackEvent', 'download', 'download', '4.7.0']);
+//- _hmt.push(['_trackEvent', 'download', 'download', '4.8.0']);
//- });
//- $('.download-theme').click(function () {
-//- _hmt.push(['_trackEvent', 'download', 'download-theme', '4.7.0']);
+//- _hmt.push(['_trackEvent', 'download', 'download-theme', '4.8.0']);
//- });</script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
diff --git a/en/404.html b/en/404.html
index 8cbeacb..d9d8596 100644
--- a/en/404.html
+++ b/en/404.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/zh/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/zh/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/zh/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
diff --git a/en/api.html b/en/api.html
index d6d1714..4b5a4d3 100644
--- a/en/api.html
+++ b/en/api.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/en/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
@@ -9,8 +9,8 @@
</script><title>ECharts Documentation</title><style>html, body {
/* position: sticky should not have overflow parents.*/
overflow-x: hidden;
-}</style><link rel="stylesheet" href="https://echarts.cdn.apache.org/en/css/doc-bundle.css?_v_=1590053981732"><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/jquery@2.2.4/dist/jquery.min.js"></script></head><!--[if lte IE 8]><body class="lower-ie"><div id="lowie-main"><img src="https://echarts.cdn.apache.org/en/images/forie.png" alt="ie tip"></div></body><![endif]-->
-<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Apache ECharts is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.</p><p>We are working on redirecting this Website to <a href="https://echarts.apache.org" target="_blank">https://echarts.apache.org</a>. You may visit our new official Website now.</p></div><a href="https://echarts.apache.org" target="_blank" onclick="lo [...]
+}</style><link rel="stylesheet" href="https://echarts.cdn.apache.org/en/css/doc-bundle.css?_v_=1590402874364"><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/jquery@2.2.4/dist/jquery.min.js"></script></head><!--[if lte IE 8]><body class="lower-ie"><div id="lowie-main"><img src="https://echarts.cdn.apache.org/en/images/forie.png" alt="ie tip"></div></body><![endif]-->
+<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Apache ECharts is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.</p><p>We are working on redirecting this Website to <a href="https://echarts.apache.org" target="_blank">https://echarts.apache.org</a>. You may visit our new official Website now.</p></div><a href="https://echarts.apache.org" target="_blank" onclick="lo [...]
</script><script type="text/javascript">window.globalArgsExtra = {
baseUrl: 'documents/api-parts',
docType: 'api',
@@ -19,7 +19,7 @@
if (window.EC_WWW_CDN_ROOT) {
window.globalArgsExtra.cdnRoot = window.EC_WWW_CDN_ROOT + '/en/' + window.globalArgsExtra.baseUrl
}</script><script type="text/javascript">document.getElementById('nav-doc').className = 'active';
-window.globalArgsExtra.version = '1590053981732';
+window.globalArgsExtra.version = '1590402874364';
echartsDoc.init('#ec-doc-main', window.globalArgsExtra);</script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
diff --git a/en/builder.html b/en/builder.html
index 0771965..a4b1019 100644
--- a/en/builder.html
+++ b/en/builder.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/en/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
@@ -7,7 +7,7 @@
document.head.insertBefore(el, document.getElementById('font-hack'));
}
</script><title>ECharts Online Builder</title><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/jquery@2.2.4/dist/jquery.min.js"></script></head><!--[if lte IE 8]><body class="lower-ie"><div id="lowie-main"><img src="https://echarts.cdn.apache.org/en/images/forie.png" alt="ie tip"></div></body><![endif]-->
-<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Apache ECharts is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.</p><p>We are working on redirecting this Website to <a href="https://echarts.apache.org" target="_blank">https://echarts.apache.org</a>. You may visit our new official Website now.</p></div><a href="https://echarts.apache.org" target="_blank" onclick="lo [...]
+<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Apache ECharts is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.</p><p>We are working on redirecting this Website to <a href="https://echarts.apache.org" target="_blank">https://echarts.apache.org</a>. You may visit our new official Website now.</p></div><a href="https://echarts.apache.org" target="_blank" onclick="lo [...]
$('#charts input, #components input, #coords input').each(function () {
$(this).attr('checked', $(this).parent().hasClass('checked'));
});
@@ -52,14 +52,14 @@ $("#build").click(function () {
}
parameters += '&version=4'
- + '&versionCode=4.7.0';
+ + '&versionCode=4.8.0';
var email = $('#email').val();
var log = parameters;
if (email) {
log += '&email=' + email;
}
- _hmt.push(['_trackEvent', 'builder', 'build', '4.7.0', log]);
+ _hmt.push(['_trackEvent', 'builder', 'build', '4.8.0', log]);
window.open('https://echarts.cdn.apache.org/en/builder/echarts.html?' + parameters);
});</script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
diff --git a/en/builder/echarts.html b/en/builder/echarts.html
index 00d43f3..f8fab4e 100644
--- a/en/builder/echarts.html
+++ b/en/builder/echarts.html
@@ -56,7 +56,7 @@
'esprima': 'lib/esprima',
'estraverse': 'lib/estraverse'
},
- urlArgs: 'v=1590053981732'
+ urlArgs: 'v=1590402874364'
});
require(['build']);
diff --git a/en/builder/src/echarts/chart/bar/BarView.js b/en/builder/src/echarts/chart/bar/BarView.js
index 7631f62..b663213 100644
--- a/en/builder/src/echarts/chart/bar/BarView.js
+++ b/en/builder/src/echarts/chart/bar/BarView.js
@@ -113,6 +113,7 @@ export default echarts.extendChartView({
var roundCap = seriesModel.get('roundCap', true);
var drawBackground = seriesModel.get('showBackground', true);
var backgroundModel = seriesModel.getModel('backgroundStyle');
+ var barBorderRadius = backgroundModel.get('barBorderRadius') || 0;
var bgEls = [];
var oldBgEls = this._backgroundEls || [];
data.diff(oldData).add(function (dataIndex) {
@@ -120,8 +121,14 @@ export default echarts.extendChartView({
var layout = getLayout[coord.type](data, dataIndex, itemModel);
if (drawBackground) {
- var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, layout);
- bgEl.useStyle(backgroundModel.getBarItemStyle());
+ var bgLayout = getLayout[coord.type](data, dataIndex);
+ var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, bgLayout);
+ bgEl.useStyle(backgroundModel.getBarItemStyle()); // Only cartesian2d support borderRadius.
+
+ if (coord.type === 'cartesian2d') {
+ bgEl.setShape('r', barBorderRadius);
+ }
+
bgEls[dataIndex] = bgEl;
} // If dataZoom in filteMode: 'empty', the baseValue can be set as NaN in "axisProxy".
@@ -151,9 +158,15 @@ export default echarts.extendChartView({
if (drawBackground) {
var bgEl = oldBgEls[oldIndex];
- bgEl.useStyle(backgroundModel.getBarItemStyle());
+ bgEl.useStyle(backgroundModel.getBarItemStyle()); // Only cartesian2d support borderRadius.
+
+ if (coord.type === 'cartesian2d') {
+ bgEl.setShape('r', barBorderRadius);
+ }
+
bgEls[newIndex] = bgEl;
- var shape = createBackgroundShape(isHorizontalOrRadial, layout, coord);
+ var bgLayout = getLayout[coord.type](data, newIndex);
+ var shape = createBackgroundShape(isHorizontalOrRadial, bgLayout, coord);
graphic.updateProps(bgEl, {
shape: shape
}, animationModel, newIndex);
@@ -374,9 +387,11 @@ function removeSector(dataIndex, animationModel, el) {
}
var getLayout = {
+ // itemModel is only used to get borderWidth, which is not needed
+ // when calculating bar background layout.
cartesian2d: function (data, dataIndex, itemModel) {
var layout = data.getItemLayout(dataIndex);
- var fixedLineWidth = getLineWidth(itemModel, layout); // fix layout with lineWidth
+ var fixedLineWidth = itemModel ? getLineWidth(itemModel, layout) : 0; // fix layout with lineWidth
var signX = layout.width > 0 ? 1 : -1;
var signY = layout.height > 0 ? 1 : -1;
diff --git a/en/builder/src/echarts/chart/heatmap/HeatmapView.js b/en/builder/src/echarts/chart/heatmap/HeatmapView.js
index c25d6cf..c6e5039 100644
--- a/en/builder/src/echarts/chart/heatmap/HeatmapView.js
+++ b/en/builder/src/echarts/chart/heatmap/HeatmapView.js
@@ -140,8 +140,8 @@ export default echarts.extendChartView({
var point = coordSys.dataToPoint([data.get(dataDims[0], idx), data.get(dataDims[1], idx)]);
rect = new graphic.Rect({
shape: {
- x: Math.floor(point[0] - width / 2),
- y: Math.floor(point[1] - height / 2),
+ x: Math.floor(Math.round(point[0]) - width / 2),
+ y: Math.floor(Math.round(point[1]) - height / 2),
width: Math.ceil(width),
height: Math.ceil(height)
},
diff --git a/en/builder/src/echarts/chart/helper/EffectSymbol.js b/en/builder/src/echarts/chart/helper/EffectSymbol.js
index 3afb8a7..873eee4 100644
--- a/en/builder/src/echarts/chart/helper/EffectSymbol.js
+++ b/en/builder/src/echarts/chart/helper/EffectSymbol.js
@@ -176,7 +176,8 @@ effectSymbolProto.updateData = function (data, idx) {
pos[1] = parsePercent(symbolOffset[1], symbolSize[1]);
}
- rippleGroup.rotation = (itemModel.getShallow('symbolRotate') || 0) * Math.PI / 180 || 0;
+ var symbolRotate = data.getItemVisual(idx, 'symbolRotate');
+ rippleGroup.rotation = (symbolRotate || 0) * Math.PI / 180 || 0;
var effectCfg = {};
effectCfg.showEffectOn = seriesModel.get('showEffectOn');
effectCfg.rippleScale = itemModel.get('rippleEffect.scale');
diff --git a/en/builder/src/echarts/chart/helper/LineDraw.js b/en/builder/src/echarts/chart/helper/LineDraw.js
index 4d3c195..00b0adf 100644
--- a/en/builder/src/echarts/chart/helper/LineDraw.js
+++ b/en/builder/src/echarts/chart/helper/LineDraw.js
@@ -112,9 +112,13 @@ lineDrawProto.incrementalPrepareUpdate = function (lineData) {
this.group.removeAll();
};
+function isEffectObject(el) {
+ return el.animators && el.animators.length > 0;
+}
+
lineDrawProto.incrementalUpdate = function (taskParams, lineData) {
function updateIncrementalAndHover(el) {
- if (!el.isGroup) {
+ if (!el.isGroup && !isEffectObject(el)) {
el.incremental = el.useHoverLayer = true;
}
}
diff --git a/en/builder/src/echarts/chart/helper/Symbol.js b/en/builder/src/echarts/chart/helper/Symbol.js
index e926056..939edb0 100644
--- a/en/builder/src/echarts/chart/helper/Symbol.js
+++ b/en/builder/src/echarts/chart/helper/Symbol.js
@@ -236,7 +236,6 @@ symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {
var itemStyle = seriesScope && seriesScope.itemStyle;
var hoverItemStyle = seriesScope && seriesScope.hoverItemStyle;
- var symbolRotate = seriesScope && seriesScope.symbolRotate;
var symbolOffset = seriesScope && seriesScope.symbolOffset;
var labelModel = seriesScope && seriesScope.labelModel;
var hoverLabelModel = seriesScope && seriesScope.hoverLabelModel;
@@ -249,7 +248,6 @@ symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {
itemStyle = itemModel.getModel(normalStyleAccessPath).getItemStyle(['color']);
hoverItemStyle = itemModel.getModel(emphasisStyleAccessPath).getItemStyle();
- symbolRotate = itemModel.getShallow('symbolRotate');
symbolOffset = itemModel.getShallow('symbolOffset');
labelModel = itemModel.getModel(normalLabelAccessPath);
hoverLabelModel = itemModel.getModel(emphasisLabelAccessPath);
@@ -260,6 +258,7 @@ symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {
}
var elStyle = symbolPath.style;
+ var symbolRotate = data.getItemVisual(idx, 'symbolRotate');
symbolPath.attr('rotation', (symbolRotate || 0) * Math.PI / 180 || 0);
if (symbolOffset) {
diff --git a/en/builder/src/echarts/chart/helper/createClipPathFromCoordSys.js b/en/builder/src/echarts/chart/helper/createClipPathFromCoordSys.js
index b57df2f..521ffb7 100644
--- a/en/builder/src/echarts/chart/helper/createClipPathFromCoordSys.js
+++ b/en/builder/src/echarts/chart/helper/createClipPathFromCoordSys.js
@@ -31,7 +31,10 @@ function createGridClipPath(cartesian, hasAnimation, seriesModel) {
x -= lineWidth / 2;
y -= lineWidth / 2;
width += lineWidth;
- height += lineWidth;
+ height += lineWidth; // fix: https://github.com/apache/incubator-echarts/issues/11369
+
+ x = Math.floor(x);
+ width = Math.round(width);
var clipPath = new graphic.Rect({
shape: {
x: x,
diff --git a/en/builder/src/echarts/chart/line/LineView.js b/en/builder/src/echarts/chart/line/LineView.js
index 603777b..b230616 100644
--- a/en/builder/src/echarts/chart/line/LineView.js
+++ b/en/builder/src/echarts/chart/line/LineView.js
@@ -19,6 +19,7 @@
// FIXME step not support polar
import { __DEV__ } from '../../config';
import * as zrUtil from 'zrender/src/core/util';
+import { fromPoints } from 'zrender/src/core/bbox';
import SymbolDraw from '../helper/SymbolDraw';
import SymbolClz from '../helper/Symbol';
import lineAnimationDiff from './lineAnimationDiff';
@@ -46,6 +47,17 @@ function isPointsSame(points1, points2) {
return true;
}
+function getBoundingDiff(points1, points2) {
+ var min1 = [];
+ var max1 = [];
+ var min2 = [];
+ var max2 = [];
+ fromPoints(points1, min1, max1);
+ fromPoints(points2, min2, max2); // Get a max value from each corner of two boundings.
+
+ return Math.max(Math.abs(min1[0] - min2[0]), Math.abs(min1[1] - min2[1]), Math.abs(max1[0] - max2[0]), Math.abs(max1[1] - max2[1]));
+}
+
function getSmooth(smooth) {
return typeof smooth === 'number' ? smooth : smooth ? 0.5 : 0;
}
@@ -589,6 +601,24 @@ export default ChartView.extend({
stackedOnCurrent = turnPointsIntoStep(diff.stackedOnCurrent, coordSys, step);
next = turnPointsIntoStep(diff.next, coordSys, step);
stackedOnNext = turnPointsIntoStep(diff.stackedOnNext, coordSys, step);
+ } // Don't apply animation if diff is large.
+ // For better result and avoid memory explosion problems like
+ // https://github.com/apache/incubator-echarts/issues/12229
+
+
+ if (getBoundingDiff(current, next) > 3000 || polygon && getBoundingDiff(stackedOnCurrent, stackedOnNext) > 3000) {
+ polyline.setShape({
+ points: next
+ });
+
+ if (polygon) {
+ polygon.setShape({
+ points: next,
+ stackedOnPoints: stackedOnNext
+ });
+ }
+
+ return;
} // `diff.current` is subset of `current` (which should be ensured by
// turnPointsIntoStep), so points in `__points` can be updated when
// points in `current` are update during animation.
diff --git a/en/builder/src/echarts/chart/map/MapSeries.js b/en/builder/src/echarts/chart/map/MapSeries.js
index dcdec13..6bbe187 100644
--- a/en/builder/src/echarts/chart/map/MapSeries.js
+++ b/en/builder/src/echarts/chart/map/MapSeries.js
@@ -60,7 +60,7 @@ var MapSeries = SeriesModel.extend({
});
}
- var geoSource = geoSourceManager.load(this.getMapType(), this.option.nameMap);
+ var geoSource = geoSourceManager.load(this.getMapType(), this.option.nameMap, this.option.nameProperty);
zrUtil.each(geoSource.regions, function (region) {
var name = region.name;
@@ -221,7 +221,8 @@ var MapSeries = SeriesModel.extend({
itemStyle: {
areaColor: 'rgba(255,215,0,0.8)'
}
- }
+ },
+ nameProperty: 'name'
}
});
zrUtil.mixin(MapSeries, dataSelectableMixin);
diff --git a/en/builder/src/echarts/chart/pie/PieView.js b/en/builder/src/echarts/chart/pie/PieView.js
index d844e3a..5944ca8 100644
--- a/en/builder/src/echarts/chart/pie/PieView.js
+++ b/en/builder/src/echarts/chart/pie/PieView.js
@@ -142,27 +142,34 @@ piePieceProto.updateData = function (data, idx, firstCreate) {
this._updateLabel(data, idx, withAnimation);
- this.highDownOnUpdate = itemModel.get('hoverAnimation') && seriesModel.isAnimationEnabled() ? function (fromState, toState) {
+ this.highDownOnUpdate = !seriesModel.get('silent') ? function (fromState, toState) {
+ var hasAnimation = seriesModel.isAnimationEnabled() && itemModel.get('hoverAnimation');
+
if (toState === 'emphasis') {
labelLine.ignore = labelLine.hoverIgnore;
labelText.ignore = labelText.hoverIgnore; // Sector may has animation of updating data. Force to move to the last frame
// Or it may stopped on the wrong shape
- sector.stopAnimation(true);
- sector.animateTo({
- shape: {
- r: layout.r + seriesModel.get('hoverOffset')
- }
- }, 300, 'elasticOut');
+ if (hasAnimation) {
+ sector.stopAnimation(true);
+ sector.animateTo({
+ shape: {
+ r: layout.r + seriesModel.get('hoverOffset')
+ }
+ }, 300, 'elasticOut');
+ }
} else {
labelLine.ignore = labelLine.normalIgnore;
labelText.ignore = labelText.normalIgnore;
- sector.stopAnimation(true);
- sector.animateTo({
- shape: {
- r: layout.r
- }
- }, 300, 'elasticOut');
+
+ if (hasAnimation) {
+ sector.stopAnimation(true);
+ sector.animateTo({
+ shape: {
+ r: layout.r
+ }
+ }, 300, 'elasticOut');
+ }
}
} : null;
graphic.setHoverStyle(this);
diff --git a/en/builder/src/echarts/chart/sankey/sankeyLayout.js b/en/builder/src/echarts/chart/sankey/sankeyLayout.js
index 56d303c..0143aa3 100644
--- a/en/builder/src/echarts/chart/sankey/sankeyLayout.js
+++ b/en/builder/src/echarts/chart/sankey/sankeyLayout.js
@@ -431,6 +431,11 @@ function relaxRightToLeft(nodesByBreadth, alpha, orient) {
if (node.outEdges.length) {
var y = sum(node.outEdges, weightedTarget, orient) / sum(node.outEdges, getEdgeValue, orient);
+ if (isNaN(y)) {
+ var len = node.outEdges.length;
+ y = len ? sum(node.outEdges, centerTarget, orient) / len : 0;
+ }
+
if (orient === 'vertical') {
var nodeX = node.getLayout().x + (y - center(node, orient)) * alpha;
node.setLayout({
@@ -451,10 +456,18 @@ function weightedTarget(edge, orient) {
return center(edge.node2, orient) * edge.getValue();
}
+function centerTarget(edge, orient) {
+ return center(edge.node2, orient);
+}
+
function weightedSource(edge, orient) {
return center(edge.node1, orient) * edge.getValue();
}
+function centerSource(edge, orient) {
+ return center(edge.node1, orient);
+}
+
function center(node, orient) {
return orient === 'vertical' ? node.getLayout().x + node.getLayout().dx / 2 : node.getLayout().y + node.getLayout().dy / 2;
}
@@ -493,6 +506,11 @@ function relaxLeftToRight(nodesByBreadth, alpha, orient) {
if (node.inEdges.length) {
var y = sum(node.inEdges, weightedSource, orient) / sum(node.inEdges, getEdgeValue, orient);
+ if (isNaN(y)) {
+ var len = node.inEdges.length;
+ y = len ? sum(node.inEdges, centerSource, orient) / len : 0;
+ }
+
if (orient === 'vertical') {
var nodeX = node.getLayout().x + (y - center(node, orient)) * alpha;
node.setLayout({
diff --git a/en/builder/src/echarts/chart/sunburst/SunburstPiece.js b/en/builder/src/echarts/chart/sunburst/SunburstPiece.js
index 5f0942b..d5b0258 100644
--- a/en/builder/src/echarts/chart/sunburst/SunburstPiece.js
+++ b/en/builder/src/echarts/chart/sunburst/SunburstPiece.js
@@ -127,6 +127,7 @@ SunburstPieceProto.updateData = function (firstCreate, node, state, seriesModel,
this._seriesModel = seriesModel || this._seriesModel;
this._ecModel = ecModel || this._ecModel;
+ graphic.setHoverStyle(this);
};
SunburstPieceProto.onEmphasis = function (highlightPolicy) {
diff --git a/en/builder/src/echarts/chart/sunburst/SunburstSeries.js b/en/builder/src/echarts/chart/sunburst/SunburstSeries.js
index 7cd363e..aa601db 100644
--- a/en/builder/src/echarts/chart/sunburst/SunburstSeries.js
+++ b/en/builder/src/echarts/chart/sunburst/SunburstSeries.js
@@ -87,8 +87,7 @@ export default SeriesModel.extend({
align: 'center',
position: 'inside',
distance: 5,
- silent: true,
- emphasis: {}
+ silent: true
},
itemStyle: {
borderWidth: 1,
@@ -98,13 +97,19 @@ export default SeriesModel.extend({
shadowColor: 'rgba(0, 0, 0, 0.2)',
shadowOffsetX: 0,
shadowOffsetY: 0,
- opacity: 1,
- emphasis: {},
- highlight: {
+ opacity: 1
+ },
+ highlight: {
+ itemStyle: {
opacity: 1
+ }
+ },
+ downplay: {
+ itemStyle: {
+ opacity: 0.5
},
- downplay: {
- opacity: 0.9
+ label: {
+ opacity: 0.6
}
},
// Animation type canbe expansion, scale
diff --git a/en/builder/src/echarts/chart/sunburst/SunburstView.js b/en/builder/src/echarts/chart/sunburst/SunburstView.js
index 699a7ea..ea06fbd 100644
--- a/en/builder/src/echarts/chart/sunburst/SunburstView.js
+++ b/en/builder/src/echarts/chart/sunburst/SunburstView.js
@@ -20,6 +20,7 @@ import * as zrUtil from 'zrender/src/core/util';
import ChartView from '../../view/Chart';
import SunburstPiece from './SunburstPiece';
import DataDiffer from '../../data/DataDiffer';
+import { windowOpen } from '../../util/format';
var ROOT_TO_NODE_ACTION = 'sunburstRootToNode';
var SunburstView = ChartView.extend({
type: 'sunburst',
@@ -169,7 +170,7 @@ var SunburstView = ChartView.extend({
if (link) {
var linkTarget = itemModel.get('target', true) || '_blank';
- window.open(link, linkTarget);
+ windowOpen(link, linkTarget);
}
}
diff --git a/en/builder/src/echarts/chart/tree/TreeSeries.js b/en/builder/src/echarts/chart/tree/TreeSeries.js
index de9dcd7..6be8bed 100644
--- a/en/builder/src/echarts/chart/tree/TreeSeries.js
+++ b/en/builder/src/echarts/chart/tree/TreeSeries.js
@@ -19,6 +19,7 @@
import SeriesModel from '../../model/Series';
import Tree from '../../data/Tree';
import { encodeHTML } from '../../util/format';
+import Model from '../../model/Model';
export default SeriesModel.extend({
type: 'series.tree',
layoutInfo: null,
@@ -38,14 +39,12 @@ export default SeriesModel.extend({
children: option.data
};
var leaves = option.leaves || {};
- var treeOption = {};
- treeOption.leaves = leaves;
- var tree = Tree.createTree(root, this, treeOption, beforeLink);
+ var leavesModel = new Model(leaves, this, this.ecModel);
+ var tree = Tree.createTree(root, this, {}, beforeLink);
function beforeLink(nodeData) {
nodeData.wrapMethod('getItemModel', function (model, idx) {
var node = tree.getNodeByDataIndex(idx);
- var leavesModel = node.getLeavesModel();
if (!node.children.length || !node.isExpand) {
model.parentModel = leavesModel;
diff --git a/en/builder/src/echarts/chart/treemap/TreemapSeries.js b/en/builder/src/echarts/chart/treemap/TreemapSeries.js
index 7cc6006..f1317aa 100644
--- a/en/builder/src/echarts/chart/treemap/TreemapSeries.js
+++ b/en/builder/src/echarts/chart/treemap/TreemapSeries.js
@@ -197,12 +197,24 @@ export default SeriesModel.extend({
completeTreeValue(root);
var levels = option.levels || [];
levels = option.levels = setDefault(levels, ecModel);
- var treeOption = {};
- treeOption.levels = levels; // Make sure always a new tree is created when setOption,
+ var levelModels = zrUtil.map(levels || [], function (levelDefine) {
+ return new Model(levelDefine, this, ecModel);
+ }, this); // Make sure always a new tree is created when setOption,
// in TreemapView, we check whether oldTree === newTree
// to choose mappings approach among old shapes and new shapes.
- return Tree.createTree(root, this, treeOption).data;
+ var tree = Tree.createTree(root, this, null, beforeLink);
+
+ function beforeLink(nodeData) {
+ nodeData.wrapMethod('getItemModel', function (model, idx) {
+ var node = tree.getNodeByDataIndex(idx);
+ var levelModel = levelModels[node.depth];
+ levelModel && (model.parentModel = levelModel);
+ return model;
+ });
+ }
+
+ return tree.data;
},
optionUpdated: function () {
this.resetViewRoot();
diff --git a/en/builder/src/echarts/chart/treemap/TreemapView.js b/en/builder/src/echarts/chart/treemap/TreemapView.js
index 34030e7..b2e3423 100644
--- a/en/builder/src/echarts/chart/treemap/TreemapView.js
+++ b/en/builder/src/echarts/chart/treemap/TreemapView.js
@@ -27,6 +27,7 @@ import BoundingRect from 'zrender/src/core/BoundingRect';
import * as matrix from 'zrender/src/core/matrix';
import * as animationUtil from '../../util/animation';
import makeStyleMapper from '../../model/mixin/makeStyleMapper';
+import { windowOpen } from '../../util/format';
var bind = zrUtil.bind;
var Group = graphic.Group;
var Rect = graphic.Rect;
@@ -498,7 +499,7 @@ export default echarts.extendChartView({
var itemModel = node.hostTree.data.getItemModel(node.dataIndex);
var link = itemModel.get('link', true);
var linkTarget = itemModel.get('target', true) || 'blank';
- link && window.open(link, linkTarget);
+ link && windowOpen(link, linkTarget);
}
}
}, this);
@@ -683,7 +684,7 @@ function renderNode(seriesModel, thisStorage, oldStorage, reRoot, lastsForAnimat
var nodeModel = thisNode.getModel(); // Background
var bg = giveGraphic('background', Rect, depth, Z_BG);
- bg && renderBackground(group, bg, isParent && thisLayout.upperHeight); // No children, render content.
+ bg && renderBackground(group, bg, isParent && thisLayout.upperLabelHeight); // No children, render content.
if (isParent) {
// Because of the implementation about "traverse" in graphic hover style, we
@@ -800,21 +801,20 @@ function renderNode(seriesModel, thisStorage, oldStorage, reRoot, lastsForAnimat
}
function prepareText(normalStyle, emphasisStyle, visualColor, width, height, upperLabelRect) {
- var text = zrUtil.retrieve(seriesModel.getFormattedLabel(thisNode.dataIndex, 'normal', null, null, upperLabelRect ? 'upperLabel' : 'label'), nodeModel.get('name'));
-
- if (!upperLabelRect && thisLayout.isLeafRoot) {
- var iconChar = seriesModel.get('drillDownIcon', true);
- text = iconChar ? iconChar + ' ' + text : text;
- }
-
+ var defaultText = nodeModel.get('name');
var normalLabelModel = nodeModel.getModel(upperLabelRect ? PATH_UPPERLABEL_NORMAL : PATH_LABEL_NOAMAL);
var emphasisLabelModel = nodeModel.getModel(upperLabelRect ? PATH_UPPERLABEL_EMPHASIS : PATH_LABEL_EMPHASIS);
var isShow = normalLabelModel.getShallow('show');
graphic.setLabelStyle(normalStyle, emphasisStyle, normalLabelModel, emphasisLabelModel, {
- defaultText: isShow ? text : null,
+ defaultText: isShow ? defaultText : null,
autoColor: visualColor,
- isRectText: true
+ isRectText: true,
+ labelFetcher: seriesModel,
+ labelDataIndex: thisNode.dataIndex,
+ labelProp: upperLabelRect ? 'upperLabel' : 'label'
});
+ addDrillDownIcon(normalStyle, upperLabelRect, thisLayout);
+ addDrillDownIcon(emphasisStyle, upperLabelRect, thisLayout);
upperLabelRect && (normalStyle.textRect = zrUtil.clone(upperLabelRect));
normalStyle.truncate = isShow && normalLabelModel.get('ellipsis') ? {
outerWidth: width,
@@ -823,6 +823,15 @@ function renderNode(seriesModel, thisStorage, oldStorage, reRoot, lastsForAnimat
} : null;
}
+ function addDrillDownIcon(style, upperLabelRect, thisLayout) {
+ var text = style.text;
+
+ if (!upperLabelRect && thisLayout.isLeafRoot && text != null) {
+ var iconChar = seriesModel.get('drillDownIcon', true);
+ style.text = iconChar ? iconChar + ' ' + text : text;
+ }
+ }
+
function giveGraphic(storageName, Ctor, depth, z) {
var element = oldRawIndex != null && oldStorage[storageName][oldRawIndex];
var lasts = lastsForAnimation[storageName];
diff --git a/en/builder/src/echarts/component/helper/MapDraw.js b/en/builder/src/echarts/component/helper/MapDraw.js
index b925334..d45c293 100644
--- a/en/builder/src/echarts/component/helper/MapDraw.js
+++ b/en/builder/src/echarts/component/helper/MapDraw.js
@@ -23,6 +23,7 @@ import { onIrrelevantElement } from '../../component/helper/cursorHelper';
import * as graphic from '../../util/graphic';
import geoSourceManager from '../../coord/geo/geoSourceManager';
import { getUID } from '../../util/component';
+import Transformable from 'zrender/src/mixin/Transformable';
function getFixedItemStyle(model) {
var itemStyle = model.getItemStyle();
@@ -176,10 +177,27 @@ MapDraw.prototype = {
var regionsGroup = this._regionsGroup;
var group = this.group;
- var transformInfo = geo.getTransformInfo();
- group.transform = transformInfo.roamTransform;
- group.decomposeTransform();
- group.dirty();
+ var transformInfo = geo.getTransformInfo(); // No animation when first draw or in action
+
+ var isFirstDraw = !regionsGroup.childAt(0) || payload;
+ var targetScale;
+
+ if (isFirstDraw) {
+ group.transform = transformInfo.roamTransform;
+ group.decomposeTransform();
+ group.dirty();
+ } else {
+ var target = new Transformable();
+ target.transform = transformInfo.roamTransform;
+ target.decomposeTransform();
+ var props = {
+ scale: target.scale,
+ position: target.position
+ };
+ targetScale = target.scale;
+ graphic.updateProps(group, props, mapOrGeoModel);
+ }
+
var scale = transformInfo.rawScale;
var position = transformInfo.rawPosition;
regionsGroup.removeAll();
@@ -301,6 +319,15 @@ MapDraw.prototype = {
textAlign: 'center',
textVerticalAlign: 'middle'
});
+
+ if (!isFirstDraw) {
+ // Text animation
+ var textScale = [1 / targetScale[0], 1 / targetScale[1]];
+ graphic.updateProps(textEl, {
+ scale: textScale
+ }, mapOrGeoModel);
+ }
+
regionGroup.add(textEl);
} // setItemGraphicEl, setHoverStyle after all polygons and labels
// are added to the rigionGroup
diff --git a/en/builder/src/echarts/component/title.js b/en/builder/src/echarts/component/title.js
index ef07247..63596d9 100644
--- a/en/builder/src/echarts/component/title.js
+++ b/en/builder/src/echarts/component/title.js
@@ -19,7 +19,8 @@
import * as zrUtil from 'zrender/src/core/util';
import * as echarts from '../echarts';
import * as graphic from '../util/graphic';
-import { getLayoutRect } from '../util/layout'; // Model
+import { getLayoutRect } from '../util/layout';
+import { windowOpen } from '../util/format'; // Model
echarts.extendComponentModel({
type: 'title',
@@ -124,13 +125,13 @@ echarts.extendComponentView({
if (link) {
textEl.on('click', function () {
- window.open(link, '_' + titleModel.get('target'));
+ windowOpen(link, '_' + titleModel.get('target'));
});
}
if (sublink) {
subTextEl.on('click', function () {
- window.open(sublink, '_' + titleModel.get('subtarget'));
+ windowOpen(link, '_' + titleModel.get('subtarget'));
});
}
diff --git a/en/builder/src/echarts/component/toolbox/ToolboxView.js b/en/builder/src/echarts/component/toolbox/ToolboxView.js
index 72df0cb..52143da 100644
--- a/en/builder/src/echarts/component/toolbox/ToolboxView.js
+++ b/en/builder/src/echarts/component/toolbox/ToolboxView.js
@@ -52,7 +52,7 @@ export default echarts.extendComponentView({
var featureModel = new Model(featureOpt, toolboxModel, toolboxModel.ecModel);
var feature; // FIX#11236, merge feature title from MagicType newOption. TODO: consider seriesIndex ?
- if (payload && payload.newTitle != null) {
+ if (payload && payload.newTitle != null && payload.featureName === featureName) {
featureOpt.title = payload.newTitle;
}
diff --git a/en/builder/src/echarts/component/toolbox/feature/MagicType.js b/en/builder/src/echarts/component/toolbox/feature/MagicType.js
index 39d06d5..55a00c2 100644
--- a/en/builder/src/echarts/component/toolbox/feature/MagicType.js
+++ b/en/builder/src/echarts/component/toolbox/feature/MagicType.js
@@ -176,7 +176,8 @@ proto.onclick = function (ecModel, api, type) {
type: 'changeMagicType',
currentType: type,
newOption: newOption,
- newTitle: newTitle
+ newTitle: newTitle,
+ featureName: 'magicType'
});
};
diff --git a/en/builder/src/echarts/component/toolbox/feature/SaveAsImage.js b/en/builder/src/echarts/component/toolbox/feature/SaveAsImage.js
index e7389cc..5d90fac 100644
--- a/en/builder/src/echarts/component/toolbox/feature/SaveAsImage.js
+++ b/en/builder/src/echarts/component/toolbox/feature/SaveAsImage.js
@@ -46,7 +46,8 @@ var proto = SaveAsImage.prototype;
proto.onclick = function (ecModel, api) {
var model = this.model;
var title = model.get('name') || ecModel.get('title.0.text') || 'echarts';
- var type = model.get('type', true) || 'png';
+ var isSvg = api.getZr().painter.getType() === 'svg';
+ var type = isSvg ? 'svg' : model.get('type', true) || 'png';
var url = api.getConnectedDataURL({
type: type,
backgroundColor: model.get('backgroundColor', true) || ecModel.get('backgroundColor') || '#fff',
diff --git a/en/builder/src/echarts/component/tooltip/TooltipView.js b/en/builder/src/echarts/component/tooltip/TooltipView.js
index 6e6912f..100bf3e 100644
--- a/en/builder/src/echarts/component/tooltip/TooltipView.js
+++ b/en/builder/src/echarts/component/tooltip/TooltipView.js
@@ -413,7 +413,7 @@ export default echarts.extendComponentView({
var dataModel = el.dataModel || seriesModel;
var dataIndex = el.dataIndex;
var dataType = el.dataType;
- var data = dataModel.getData();
+ var data = dataModel.getData(dataType);
var tooltipModel = buildTooltipModel([data.getItemModel(dataIndex), dataModel, seriesModel && (seriesModel.coordinateSystem || {}).model, this._tooltipModel]);
var tooltipTrigger = tooltipModel.get('trigger');
diff --git a/en/builder/src/echarts/component/visualMap/PiecewiseModel.js b/en/builder/src/echarts/component/visualMap/PiecewiseModel.js
index 978b6a9..23aba37 100644
--- a/en/builder/src/echarts/component/visualMap/PiecewiseModel.js
+++ b/en/builder/src/echarts/component/visualMap/PiecewiseModel.js
@@ -387,20 +387,17 @@ var resetMethods = {
thisOption.precision = precision;
splitStep = +splitStep.toFixed(precision);
- var index = 0;
if (thisOption.minOpen) {
pieceList.push({
- index: index++,
interval: [-Infinity, dataExtent[0]],
close: [0, 0]
});
}
- for (var curr = dataExtent[0], len = index + splitNumber; index < len; curr += splitStep) {
+ for (var index = 0, curr = dataExtent[0]; index < splitNumber; curr += splitStep, index++) {
var max = index === splitNumber - 1 ? dataExtent[1] : curr + splitStep;
pieceList.push({
- index: index++,
interval: [curr, max],
close: [1, 1]
});
@@ -408,14 +405,14 @@ var resetMethods = {
if (thisOption.maxOpen) {
pieceList.push({
- index: index++,
interval: [dataExtent[1], Infinity],
close: [0, 0]
});
}
reformIntervals(pieceList);
- zrUtil.each(pieceList, function (piece) {
+ zrUtil.each(pieceList, function (piece, index) {
+ piece.index = index;
piece.text = this.formatValueText(piece.interval);
}, this);
},
diff --git a/en/builder/src/echarts/coord/axisHelper.js b/en/builder/src/echarts/coord/axisHelper.js
index 2c80df2..b76eeeb 100644
--- a/en/builder/src/echarts/coord/axisHelper.js
+++ b/en/builder/src/echarts/coord/axisHelper.js
@@ -35,8 +35,6 @@ export function getScaleExtent(scale, model) {
var scaleType = scale.type;
var min = model.getMin();
var max = model.getMax();
- var fixMin = min != null;
- var fixMax = max != null;
var originalExtent = scale.getExtent();
var axisDataLen;
var boundaryGap;
@@ -73,14 +71,6 @@ export function getScaleExtent(scale, model) {
// that the results processed by boundaryGap are positive/negative?
- if (min == null) {
- min = scaleType === 'ordinal' ? axisDataLen ? 0 : NaN : originalExtent[0] - boundaryGap[0] * span;
- }
-
- if (max == null) {
- max = scaleType === 'ordinal' ? axisDataLen ? axisDataLen - 1 : NaN : originalExtent[1] + boundaryGap[1] * span;
- }
-
if (min === 'dataMin') {
min = originalExtent[0];
} else if (typeof min === 'function') {
@@ -99,6 +89,17 @@ export function getScaleExtent(scale, model) {
});
}
+ var fixMin = min != null;
+ var fixMax = max != null;
+
+ if (min == null) {
+ min = scaleType === 'ordinal' ? axisDataLen ? 0 : NaN : originalExtent[0] - boundaryGap[0] * span;
+ }
+
+ if (max == null) {
+ max = scaleType === 'ordinal' ? axisDataLen ? axisDataLen - 1 : NaN : originalExtent[1] + boundaryGap[1] * span;
+ }
+
(min == null || !isFinite(min)) && (min = NaN);
(max == null || !isFinite(max)) && (max = NaN);
scale.setBlank(zrUtil.eqNaN(min) || zrUtil.eqNaN(max) || scaleType === 'ordinal' && !scale.getOrdinalMeta().categories.length); // Evaluate if axis needs cross zero
@@ -145,7 +146,13 @@ export function getScaleExtent(scale, model) {
}
}
- return [min, max];
+ return {
+ extent: [min, max],
+ // "fix" means "fixed", the value should not be
+ // changed in the subsequent steps.
+ fixMin: fixMin,
+ fixMax: fixMax
+ };
}
function adjustScaleForOverflow(min, max, model, barWidthAndOffset) {
@@ -186,9 +193,8 @@ function adjustScaleForOverflow(min, max, model, barWidthAndOffset) {
}
export function niceScaleExtent(scale, model) {
- var extent = getScaleExtent(scale, model);
- var fixMin = model.getMin() != null;
- var fixMax = model.getMax() != null;
+ var extentInfo = getScaleExtent(scale, model);
+ var extent = extentInfo.extent;
var splitNumber = model.get('splitNumber');
if (scale.type === 'log') {
@@ -199,8 +205,8 @@ export function niceScaleExtent(scale, model) {
scale.setExtent(extent[0], extent[1]);
scale.niceExtent({
splitNumber: splitNumber,
- fixMin: fixMin,
- fixMax: fixMax,
+ fixMin: extentInfo.fixMin,
+ fixMax: extentInfo.fixMax,
minInterval: scaleType === 'interval' || scaleType === 'time' ? model.get('minInterval') : null,
maxInterval: scaleType === 'interval' || scaleType === 'time' ? model.get('maxInterval') : null
}); // If some one specified the min, max. And the default calculated interval
diff --git a/en/builder/src/echarts/coord/calendar/Calendar.js b/en/builder/src/echarts/coord/calendar/Calendar.js
index bf299b4..8eb687a 100644
--- a/en/builder/src/echarts/coord/calendar/Calendar.js
+++ b/en/builder/src/echarts/coord/calendar/Calendar.js
@@ -312,7 +312,9 @@ Calendar.prototype = {
range.reverse();
}
- var allDay = Math.floor(range[1].time / PROXIMATE_ONE_DAY) - Math.floor(range[0].time / PROXIMATE_ONE_DAY) + 1; // Consider case:
+ var allDay = Math.floor(range[1].time / PROXIMATE_ONE_DAY) - Math.floor(range[0].time / PROXIMATE_ONE_DAY) + 1; // Consider case1 (#11677 #10430):
+ // Set the system timezone as "UK", set the range to `['2016-07-01', '2016-12-31']`
+ // Consider case2:
// Firstly set system timezone as "Time Zone: America/Toronto",
// ```
// var first = new Date(1478412000000 - 3600 * 1000 * 2.5);
@@ -326,12 +328,14 @@ Calendar.prototype = {
var endDateNum = range[1].date.getDate();
date.setDate(startDateNum + allDay - 1); // The bias can not over a month, so just compare date.
- if (date.getDate() !== endDateNum) {
+ var dateNum = date.getDate();
+
+ if (dateNum !== endDateNum) {
var sign = date.getTime() - range[1].time > 0 ? 1 : -1;
- while (date.getDate() !== endDateNum && (date.getTime() - range[1].time) * sign > 0) {
+ while ((dateNum = date.getDate()) !== endDateNum && (date.getTime() - range[1].time) * sign > 0) {
allDay -= sign;
- date.setDate(startDateNum + allDay - 1);
+ date.setDate(dateNum - sign);
}
}
diff --git a/en/builder/src/echarts/coord/geo/geoJSONLoader.js b/en/builder/src/echarts/coord/geo/geoJSONLoader.js
index 9d42ac9..b3aab6c 100644
--- a/en/builder/src/echarts/coord/geo/geoJSONLoader.js
+++ b/en/builder/src/echarts/coord/geo/geoJSONLoader.js
@@ -29,9 +29,10 @@ export default {
/**
* @param {string} mapName
* @param {Object} mapRecord {specialAreas, geoJSON}
+ * @param {string} nameProperty
* @return {Object} {regions, boundingRect}
*/
- load: function (mapName, mapRecord) {
+ load: function (mapName, mapRecord, nameProperty) {
var parsed = inner(mapRecord).parsed;
if (parsed) {
@@ -43,7 +44,7 @@ export default {
var regions; // https://jsperf.com/try-catch-performance-overhead
try {
- regions = geoJSON ? parseGeoJson(geoJSON) : [];
+ regions = geoJSON ? parseGeoJson(geoJSON, nameProperty) : [];
} catch (e) {
throw new Error('Invalid geoJson format\n' + e.message);
}
diff --git a/en/builder/src/echarts/coord/geo/geoSourceManager.js b/en/builder/src/echarts/coord/geo/geoSourceManager.js
index 0580207..82f74e2 100644
--- a/en/builder/src/echarts/coord/geo/geoSourceManager.js
+++ b/en/builder/src/echarts/coord/geo/geoSourceManager.js
@@ -30,16 +30,17 @@ export default {
/**
* @param {string} mapName
* @param {Object} nameMap
+ * @param {string} nameProperty
* @return {Object} source {regions, regionsMap, nameCoordMap, boundingRect}
*/
- load: function (mapName, nameMap) {
+ load: function (mapName, nameMap, nameProperty) {
var regions = [];
var regionsMap = createHashMap();
var nameCoordMap = createHashMap();
var boundingRect;
var mapRecords = retrieveMap(mapName);
each(mapRecords, function (record) {
- var singleSource = loaders[record.type].load(mapName, record);
+ var singleSource = loaders[record.type].load(mapName, record, nameProperty);
each(singleSource.regions, function (region) {
var regionName = region.name; // Try use the alias in geoNameMap
diff --git a/en/builder/src/echarts/coord/geo/parseGeoJson.js b/en/builder/src/echarts/coord/geo/parseGeoJson.js
index e5adaab..f3dd5ed 100644
--- a/en/builder/src/echarts/coord/geo/parseGeoJson.js
+++ b/en/builder/src/echarts/coord/geo/parseGeoJson.js
@@ -87,11 +87,12 @@ function decodePolygon(coordinate, encodeOffsets, encodeScale) {
/**
* @alias module:echarts/coord/geo/parseGeoJson
* @param {Object} geoJson
+ * @param {string} nameProperty
* @return {module:zrender/container/Group}
*/
-export default function (geoJson) {
+export default function (geoJson, nameProperty) {
decode(geoJson);
return zrUtil.map(zrUtil.filter(geoJson.features, function (featureObj) {
// Output of mapshaper may have geometry null
@@ -124,7 +125,7 @@ export default function (geoJson) {
});
}
- var region = new Region(properties.name, geometries, properties.cp);
+ var region = new Region(properties[nameProperty || 'name'], geometries, properties.cp);
region.properties = properties;
return region;
});
diff --git a/en/builder/src/echarts/coord/radar/Radar.js b/en/builder/src/echarts/coord/radar/Radar.js
index 77b4cad..8ce8b47 100644
--- a/en/builder/src/echarts/coord/radar/Radar.js
+++ b/en/builder/src/echarts/coord/radar/Radar.js
@@ -181,7 +181,7 @@ Radar.prototype.update = function (ecModel, api) {
zrUtil.each(indicatorAxes, function (indicatorAxis, idx) {
- var rawExtent = getScaleExtent(indicatorAxis.scale, indicatorAxis.model);
+ var rawExtent = getScaleExtent(indicatorAxis.scale, indicatorAxis.model).extent;
niceScaleExtent(indicatorAxis.scale, indicatorAxis.model);
var axisModel = indicatorAxis.model;
var scale = indicatorAxis.scale;
diff --git a/en/builder/src/echarts/data/Tree.js b/en/builder/src/echarts/data/Tree.js
index 867b208..74ec726 100644
--- a/en/builder/src/echarts/data/Tree.js
+++ b/en/builder/src/echarts/data/Tree.js
@@ -256,14 +256,13 @@ TreeNode.prototype = {
var hostTree = this.hostTree;
var itemModel = hostTree.data.getItemModel(this.dataIndex);
- var levelModel = this.getLevelModel();
- var leavesModel;
+ var levelModel = this.getLevelModel(); // FIXME: refactor levelModel to "beforeLink", and remove levelModel here.
- if (!levelModel && (this.children.length === 0 || this.children.length !== 0 && this.isExpand === false)) {
- leavesModel = this.getLeavesModel();
+ if (levelModel) {
+ return itemModel.getModel(path, levelModel.getModel(path));
+ } else {
+ return itemModel.getModel(path);
}
-
- return itemModel.getModel(path, (levelModel || leavesModel || hostTree.hostModel).getModel(path));
},
/**
@@ -274,13 +273,6 @@ TreeNode.prototype = {
},
/**
- * @return {module:echarts/model/Model}
- */
- getLeavesModel: function () {
- return this.hostTree.leavesModel;
- },
-
- /**
* @example
* setItemVisual('color', color);
* setItemVisual({
@@ -351,10 +343,9 @@ TreeNode.prototype = {
* @alias module:echarts/data/Tree
* @param {module:echarts/model/Model} hostModel
* @param {Array.<Object>} levelOptions
- * @param {Object} leavesOption
*/
-function Tree(hostModel, levelOptions, leavesOption) {
+function Tree(hostModel, levelOptions) {
/**
* @type {module:echarts/data/Tree~TreeNode}
* @readOnly
@@ -389,7 +380,6 @@ function Tree(hostModel, levelOptions, leavesOption) {
this.levelModels = zrUtil.map(levelOptions || [], function (levelDefine) {
return new Model(levelDefine, hostModel, hostModel.ecModel);
});
- this.leavesModel = new Model(leavesOption || {}, hostModel, hostModel.ecModel);
}
Tree.prototype = {
@@ -478,12 +468,11 @@ Tree.prototype = {
* @param {module:echarts/model/Model} hostModel
* @param {Object} treeOptions
* @param {Array.<Object>} treeOptions.levels
- * @param {Array.<Object>} treeOptions.leaves
* @return module:echarts/data/Tree
*/
Tree.createTree = function (dataRoot, hostModel, treeOptions, beforeLink) {
- var tree = new Tree(hostModel, treeOptions.levels, treeOptions.leaves);
+ var tree = new Tree(hostModel, treeOptions && treeOptions.levels);
var listData = [];
var dimMax = 1;
buildHierarchy(dataRoot);
@@ -513,13 +502,13 @@ Tree.createTree = function (dataRoot, hostModel, treeOptions, beforeLink) {
});
var list = new List(dimensionsInfo, hostModel);
list.initData(listData);
+ beforeLink && beforeLink(list);
linkList({
mainData: list,
struct: tree,
structAttr: 'tree'
});
tree.update();
- beforeLink && beforeLink(list);
return tree;
};
/**
diff --git a/en/builder/src/echarts/echarts.js b/en/builder/src/echarts/echarts.js
index 76ac79d..8d0573b 100644
--- a/en/builder/src/echarts/echarts.js
+++ b/en/builder/src/echarts/echarts.js
@@ -49,9 +49,9 @@ var each = zrUtil.each;
var isFunction = zrUtil.isFunction;
var isObject = zrUtil.isObject;
var parseClassType = ComponentModel.parseClassType;
-export var version = '4.7.0';
+export var version = '4.8.0';
export var dependencies = {
- zrender: '4.3.0'
+ zrender: '4.3.1'
};
var TEST_FRAME_REMAIN_TIME = 1;
var PRIORITY_PROCESSOR_FILTER = 1000;
@@ -446,7 +446,7 @@ echartsProto.getRenderedCanvas = function (opts) {
*/
-echartsProto.getSvgDataUrl = function () {
+echartsProto.getSvgDataURL = function () {
if (!env.svgSupported) {
return;
}
@@ -457,7 +457,7 @@ echartsProto.getSvgDataUrl = function () {
zrUtil.each(list, function (el) {
el.stopAnimation(true);
});
- return zr.painter.pathToDataUrl();
+ return zr.painter.toDataURL();
};
/**
* @return {string}
@@ -492,7 +492,7 @@ echartsProto.getDataURL = function (opts) {
}
});
});
- var url = this._zr.painter.getType() === 'svg' ? this.getSvgDataUrl() : this.getRenderedCanvas(opts).toDataURL('image/' + (opts && opts.type || 'png'));
+ var url = this._zr.painter.getType() === 'svg' ? this.getSvgDataURL() : this.getRenderedCanvas(opts).toDataURL('image/' + (opts && opts.type || 'png'));
each(excludesComponentViews, function (view) {
view.group.ignore = false;
});
@@ -517,6 +517,7 @@ echartsProto.getConnectedDataURL = function (opts) {
return;
}
+ var isSvg = opts.type === 'svg';
var groupId = this.group;
var mathMin = Math.min;
var mathMax = Math.max;
@@ -531,7 +532,7 @@ echartsProto.getConnectedDataURL = function (opts) {
var dpr = opts && opts.pixelRatio || 1;
zrUtil.each(instances, function (chart, id) {
if (chart.group === groupId) {
- var canvas = chart.getRenderedCanvas(zrUtil.clone(opts));
+ var canvas = isSvg ? chart.getZr().painter.getSvgDom().innerHTML : chart.getRenderedCanvas(zrUtil.clone(opts));
var boundingRect = chart.getDom().getBoundingClientRect();
left = mathMin(boundingRect.left, left);
top = mathMin(boundingRect.top, top);
@@ -551,36 +552,58 @@ echartsProto.getConnectedDataURL = function (opts) {
var width = right - left;
var height = bottom - top;
var targetCanvas = zrUtil.createCanvas();
- targetCanvas.width = width;
- targetCanvas.height = height;
- var zr = zrender.init(targetCanvas); // Background between the charts
-
- if (opts.connectedBackgroundColor) {
- zr.add(new graphic.Rect({
- shape: {
- x: 0,
- y: 0,
- width: width,
- height: height
- },
- style: {
- fill: opts.connectedBackgroundColor
- }
- }));
- }
+ var zr = zrender.init(targetCanvas, {
+ renderer: isSvg ? 'svg' : 'canvas'
+ });
+ zr.resize({
+ width: width,
+ height: height
+ });
- each(canvasList, function (item) {
- var img = new graphic.Image({
- style: {
- x: item.left * dpr - left,
- y: item.top * dpr - top,
- image: item.dom
- }
+ if (isSvg) {
+ var content = '';
+ each(canvasList, function (item) {
+ var x = item.left - left;
+ var y = item.top - top;
+ content += '<g transform="translate(' + x + ',' + y + ')">' + item.dom + '</g>';
});
- zr.add(img);
- });
- zr.refreshImmediately();
- return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png'));
+ zr.painter.getSvgRoot().innerHTML = content;
+
+ if (opts.connectedBackgroundColor) {
+ zr.painter.setBackgroundColor(opts.connectedBackgroundColor);
+ }
+
+ zr.refreshImmediately();
+ return zr.painter.toDataURL();
+ } else {
+ // Background between the charts
+ if (opts.connectedBackgroundColor) {
+ zr.add(new graphic.Rect({
+ shape: {
+ x: 0,
+ y: 0,
+ width: width,
+ height: height
+ },
+ style: {
+ fill: opts.connectedBackgroundColor
+ }
+ }));
+ }
+
+ each(canvasList, function (item) {
+ var img = new graphic.Image({
+ style: {
+ x: item.left * dpr - left,
+ y: item.top * dpr - top,
+ image: item.dom
+ }
+ });
+ zr.add(img);
+ });
+ zr.refreshImmediately();
+ return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png'));
+ }
} else {
return this.getDataURL(opts);
}
diff --git a/en/builder/src/echarts/langEN.js b/en/builder/src/echarts/langEN.js
index f028ee1..f48df33 100644
--- a/en/builder/src/echarts/langEN.js
+++ b/en/builder/src/echarts/langEN.js
@@ -64,6 +64,32 @@ export default {
lang: ['Right Click to Save Image']
}
},
+ series: {
+ typeNames: {
+ pie: 'Pie chart',
+ bar: 'Bar chart',
+ line: 'Line chart',
+ scatter: 'Scatter plot',
+ effectScatter: 'Ripple scatter plot',
+ radar: 'Radar chart',
+ tree: 'Tree',
+ treemap: 'Treemap',
+ boxplot: 'Boxplot',
+ candlestick: 'Candlestick',
+ k: 'K line chart',
+ heatmap: 'Heat map',
+ map: 'Map',
+ parallel: 'Parallel coordinate map',
+ lines: 'Line graph',
+ graph: 'Relationship graph',
+ sankey: 'Sankey diagram',
+ funnel: 'Funnel chart',
+ gauge: 'Guage',
+ pictorialBar: 'Pictorial bar',
+ themeRiver: 'Theme River Map',
+ sunburst: 'Sunburst'
+ }
+ },
aria: {
general: {
withTitle: 'This is a chart about "{title}"',
diff --git a/en/builder/src/echarts/loading/default.js b/en/builder/src/echarts/loading/default.js
index e07ccbb..d1b7477 100644
--- a/en/builder/src/echarts/loading/default.js
+++ b/en/builder/src/echarts/loading/default.js
@@ -18,6 +18,7 @@
*/
import * as zrUtil from 'zrender/src/core/util';
import * as graphic from '../util/graphic';
+import * as textContain from 'zrender/src/contain/text';
var PI = Math.PI;
/**
* @param {module:echarts/ExtensionAPI} api
@@ -32,11 +33,16 @@ export default function (api, opts) {
opts = opts || {};
zrUtil.defaults(opts, {
text: 'loading',
- color: '#c23531',
textColor: '#000',
+ fontSize: '12px',
maskColor: 'rgba(255, 255, 255, 0.8)',
+ showSpinner: true,
+ color: '#c23531',
+ spinnerRadius: 10,
+ lineWidth: 5,
zlevel: 0
});
+ var group = new graphic.Group();
var mask = new graphic.Rect({
style: {
fill: opts.maskColor
@@ -44,24 +50,13 @@ export default function (api, opts) {
zlevel: opts.zlevel,
z: 10000
});
- var arc = new graphic.Arc({
- shape: {
- startAngle: -PI / 2,
- endAngle: -PI / 2 + 0.1,
- r: 10
- },
- style: {
- stroke: opts.color,
- lineCap: 'round',
- lineWidth: 5
- },
- zlevel: opts.zlevel,
- z: 10001
- });
+ group.add(mask);
+ var font = opts.fontSize + ' sans-serif';
var labelRect = new graphic.Rect({
style: {
fill: 'none',
text: opts.text,
+ font: font,
textPosition: 'right',
textDistance: 10,
textFill: opts.textColor
@@ -69,25 +64,45 @@ export default function (api, opts) {
zlevel: opts.zlevel,
z: 10001
});
- arc.animateShape(true).when(1000, {
- endAngle: PI * 3 / 2
- }).start('circularInOut');
- arc.animateShape(true).when(1000, {
- startAngle: PI * 3 / 2
- }).delay(300).start('circularInOut');
- var group = new graphic.Group();
- group.add(arc);
group.add(labelRect);
- group.add(mask); // Inject resize
+
+ if (opts.showSpinner) {
+ var arc = new graphic.Arc({
+ shape: {
+ startAngle: -PI / 2,
+ endAngle: -PI / 2 + 0.1,
+ r: opts.spinnerRadius
+ },
+ style: {
+ stroke: opts.color,
+ lineCap: 'round',
+ lineWidth: opts.lineWidth
+ },
+ zlevel: opts.zlevel,
+ z: 10001
+ });
+ arc.animateShape(true).when(1000, {
+ endAngle: PI * 3 / 2
+ }).start('circularInOut');
+ arc.animateShape(true).when(1000, {
+ startAngle: PI * 3 / 2
+ }).delay(300).start('circularInOut');
+ group.add(arc);
+ } // Inject resize
+
group.resize = function () {
- var cx = api.getWidth() / 2;
+ var textWidth = textContain.getWidth(opts.text, font);
+ var r = opts.showSpinner ? opts.spinnerRadius : 0; // cx = (containerWidth - arcDiameter - textDistance - textWidth) / 2
+ // textDistance needs to be calculated when both animation and text exist
+
+ var cx = (api.getWidth() - r * 2 - (opts.showSpinner && textWidth ? 10 : 0) - textWidth) / 2 // only show the text
+ - (opts.showSpinner ? 0 : textWidth / 2);
var cy = api.getHeight() / 2;
- arc.setShape({
+ opts.showSpinner && arc.setShape({
cx: cx,
cy: cy
});
- var r = arc.shape.r;
labelRect.setShape({
x: cx - r,
y: cy - r,
diff --git a/en/builder/src/echarts/model/Series.js b/en/builder/src/echarts/model/Series.js
index 16eb66e..f4a3346 100644
--- a/en/builder/src/echarts/model/Series.js
+++ b/en/builder/src/echarts/model/Series.js
@@ -520,7 +520,7 @@ function dataTaskReset(context) {
function dataTaskProgress(param, context) {
// Avoid repead cloneShallow when data just created in reset.
- if (param.end > context.outputData.count()) {
+ if (context.outputData && param.end > context.outputData.count()) {
context.model.getRawData().cloneShallow(context.outputData);
}
} // TODO refactor
diff --git a/en/builder/src/echarts/util/format.js b/en/builder/src/echarts/util/format.js
index 15e927c..698da64 100644
--- a/en/builder/src/echarts/util/format.js
+++ b/en/builder/src/echarts/util/format.js
@@ -21,7 +21,7 @@ import * as textContain from 'zrender/src/contain/text';
import * as numberUtil from './number'; // import Text from 'zrender/src/graphic/Text';
/**
- * 每三位默认加,格式化
+ * add commas after every three numbers
* @param {string|number} x
* @return {string}
*/
@@ -228,4 +228,19 @@ export function getTextBoundingRect(opt) {
export function getTextRect(text, font, textAlign, textVerticalAlign, textPadding, rich, truncate, textLineHeight) {
return textContain.getBoundingRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, rich, truncate);
+}
+/**
+ * open new tab
+ * @param {string} link url
+ * @param {string} target blank or self
+ */
+
+export function windowOpen(link, target) {
+ if (target === '_blank' || target === 'blank') {
+ var blank = window.open();
+ blank.opener = null;
+ blank.location = link;
+ } else {
+ window.open(link, target);
+ }
}
\ No newline at end of file
diff --git a/en/builder/src/echarts/util/graphic.js b/en/builder/src/echarts/util/graphic.js
index e31a002..33d159e 100644
--- a/en/builder/src/echarts/util/graphic.js
+++ b/en/builder/src/echarts/util/graphic.js
@@ -636,11 +636,13 @@ export function getHighlightDigit(highlightKey) {
* @param {Object} opt Check `opt` of `setTextStyleCommon` to find other props.
* @param {string|Function} [opt.defaultText]
* @param {module:echarts/model/Model} [opt.labelFetcher] Fetch text by
- * `opt.labelFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex)`
- * @param {module:echarts/model/Model} [opt.labelDataIndex] Fetch text by
- * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex)`
- * @param {module:echarts/model/Model} [opt.labelDimIndex] Fetch text by
- * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex)`
+ * `opt.labelFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
+ * @param {number} [opt.labelDataIndex] Fetch text by
+ * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
+ * @param {number} [opt.labelDimIndex] Fetch text by
+ * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
+ * @param {string} [opt.labelProp] Fetch text by
+ * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
* @param {Object} [normalSpecified]
* @param {Object} [emphasisSpecified]
*/
@@ -649,7 +651,8 @@ export function setLabelStyle(normalStyle, emphasisStyle, normalModel, emphasisM
opt = opt || EMPTY_OBJ;
var labelFetcher = opt.labelFetcher;
var labelDataIndex = opt.labelDataIndex;
- var labelDimIndex = opt.labelDimIndex; // This scenario, `label.normal.show = true; label.emphasis.show = false`,
+ var labelDimIndex = opt.labelDimIndex;
+ var labelProp = opt.labelProp; // This scenario, `label.normal.show = true; label.emphasis.show = false`,
// is not supported util someone requests.
var showNormal = normalModel.getShallow('show');
@@ -661,7 +664,7 @@ export function setLabelStyle(normalStyle, emphasisStyle, normalModel, emphasisM
if (showNormal || showEmphasis) {
if (labelFetcher) {
- baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex);
+ baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex, labelProp);
}
if (baseText == null) {
@@ -670,7 +673,7 @@ export function setLabelStyle(normalStyle, emphasisStyle, normalModel, emphasisM
}
var normalStyleText = showNormal ? baseText : null;
- var emphasisStyleText = showEmphasis ? zrUtil.retrieve2(labelFetcher ? labelFetcher.getFormattedLabel(labelDataIndex, 'emphasis', null, labelDimIndex) : null, baseText) : null; // Optimize: If style.text is null, text will not be drawn.
+ var emphasisStyleText = showEmphasis ? zrUtil.retrieve2(labelFetcher ? labelFetcher.getFormattedLabel(labelDataIndex, 'emphasis', null, labelDimIndex, labelProp) : null, baseText) : null; // Optimize: If style.text is null, text will not be drawn.
if (normalStyleText != null || emphasisStyleText != null) {
// Always set `textStyle` even if `normalStyle.text` is null, because default
diff --git a/en/builder/src/echarts/visual/symbol.js b/en/builder/src/echarts/visual/symbol.js
index 7e80956..5568dc1 100644
--- a/en/builder/src/echarts/visual/symbol.js
+++ b/en/builder/src/echarts/visual/symbol.js
@@ -28,11 +28,14 @@ export default function (seriesType, defaultSymbolType, legendSymbol) {
var symbolType = seriesModel.get('symbol');
var symbolSize = seriesModel.get('symbolSize');
var keepAspect = seriesModel.get('symbolKeepAspect');
+ var symbolRotate = seriesModel.get('symbolRotate');
var hasSymbolTypeCallback = isFunction(symbolType);
var hasSymbolSizeCallback = isFunction(symbolSize);
- var hasCallback = hasSymbolTypeCallback || hasSymbolSizeCallback;
+ var hasSymbolRotateCallback = isFunction(symbolRotate);
+ var hasCallback = hasSymbolTypeCallback || hasSymbolSizeCallback || hasSymbolRotateCallback;
var seriesSymbol = !hasSymbolTypeCallback && symbolType ? symbolType : defaultSymbolType;
var seriesSymbolSize = !hasSymbolSizeCallback ? symbolSize : null;
+ var seriesSymbolRotate = !hasSymbolRotateCallback ? seriesSymbolRotate : null;
data.setVisual({
legendSymbol: legendSymbol || seriesSymbol,
// If seting callback functions on `symbol` or `symbolSize`, for simplicity and avoiding
@@ -41,7 +44,8 @@ export default function (seriesType, defaultSymbolType, legendSymbol) {
// some cases but generally it is not recommanded.
symbol: seriesSymbol,
symbolSize: seriesSymbolSize,
- symbolKeepAspect: keepAspect
+ symbolKeepAspect: keepAspect,
+ symbolRotate: symbolRotate
}); // Only visible series has each data be visual encoded
if (ecModel.isSeriesFiltered(seriesModel)) {
@@ -54,12 +58,14 @@ export default function (seriesType, defaultSymbolType, legendSymbol) {
var params = seriesModel.getDataParams(idx);
hasSymbolTypeCallback && data.setItemVisual(idx, 'symbol', symbolType(rawValue, params));
hasSymbolSizeCallback && data.setItemVisual(idx, 'symbolSize', symbolSize(rawValue, params));
+ hasSymbolRotateCallback && data.setItemVisual(idx, 'symbolRotate', symbolRotate(rawValue, params));
}
if (data.hasItemOption) {
var itemModel = data.getItemModel(idx);
var itemSymbolType = itemModel.getShallow('symbol', true);
var itemSymbolSize = itemModel.getShallow('symbolSize', true);
+ var itemSymbolRotate = itemModel.getShallow('symbolRotate', true);
var itemSymbolKeepAspect = itemModel.getShallow('symbolKeepAspect', true); // If has item symbol
if (itemSymbolType != null) {
@@ -71,6 +77,10 @@ export default function (seriesType, defaultSymbolType, legendSymbol) {
data.setItemVisual(idx, 'symbolSize', itemSymbolSize);
}
+ if (itemSymbolRotate != null) {
+ data.setItemVisual(idx, 'symbolRotate', itemSymbolRotate);
+ }
+
if (itemSymbolKeepAspect != null) {
data.setItemVisual(idx, 'symbolKeepAspect', itemSymbolKeepAspect);
}
diff --git a/en/builder/src/zrender/Painter.js b/en/builder/src/zrender/Painter.js
index ca2d55e..8be4cd3 100644
--- a/en/builder/src/zrender/Painter.js
+++ b/en/builder/src/zrender/Painter.js
@@ -530,7 +530,10 @@ Painter.prototype = {
if (this._layerConfig[zlevel]) {
util.merge(layer, this._layerConfig[zlevel], true);
- }
+ } // TODO Remove EL_AFTER_INCREMENTAL_INC magic number
+ else if (this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC]) {
+ util.merge(layer, this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC], true);
+ }
if (virtual) {
layer.virtual = virtual;
@@ -675,12 +678,25 @@ Painter.prototype = {
var prevLayer = null;
var incrementalLayerCount = 0;
+ var prevZlevel;
for (var i = 0; i < list.length; i++) {
var el = list[i];
var zlevel = el.zlevel;
- var layer; // PENDING If change one incremental element style ?
- // TODO Where there are non-incremental elements between incremental elements.
+ var layer;
+
+ if (prevZlevel !== zlevel) {
+ prevZlevel = zlevel;
+ incrementalLayerCount = 0;
+ } // TODO Not use magic number on zlevel.
+ // Each layer with increment element can be separated to 3 layers.
+ // (Other Element drawn after incremental element)
+ // -----------------zlevel + EL_AFTER_INCREMENTAL_INC--------------------
+ // (Incremental element)
+ // ----------------------zlevel + INCREMENTAL_INC------------------------
+ // (Element drawn before incremental element)
+ // --------------------------------zlevel--------------------------------
+
if (el.incremental) {
layer = this.getLayer(zlevel + INCREMENTAL_INC, this._needsManuallyCompositing);
@@ -774,7 +790,7 @@ Painter.prototype = {
}
for (var i = 0; i < this._zlevelList.length; i++) {
- var _zlevel = this._zlevelList[i];
+ var _zlevel = this._zlevelList[i]; // TODO Remove EL_AFTER_INCREMENTAL_INC magic number
if (_zlevel === zlevel || _zlevel === zlevel + EL_AFTER_INCREMENTAL_INC) {
var layer = this._layers[_zlevel];
diff --git a/en/builder/src/zrender/svg/Painter.js b/en/builder/src/zrender/svg/Painter.js
index b6c3530..09f4e85 100644
--- a/en/builder/src/zrender/svg/Painter.js
+++ b/en/builder/src/zrender/svg/Painter.js
@@ -79,20 +79,26 @@ var SVGPainter = function (root, storage, opts, zrId) {
this.root = root;
this.storage = storage;
this._opts = opts = util.extend({}, opts || {});
- var svgRoot = createElement('svg');
- svgRoot.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
- svgRoot.setAttribute('version', '1.1');
- svgRoot.setAttribute('baseProfile', 'full');
- svgRoot.style.cssText = 'user-select:none;position:absolute;left:0;top:0;';
+ var svgDom = createElement('svg');
+ svgDom.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
+ svgDom.setAttribute('version', '1.1');
+ svgDom.setAttribute('baseProfile', 'full');
+ svgDom.style.cssText = 'user-select:none;position:absolute;left:0;top:0;';
+ var bgRoot = createElement('g');
+ svgDom.appendChild(bgRoot);
+ var svgRoot = createElement('g');
+ svgDom.appendChild(svgRoot);
this.gradientManager = new GradientManager(zrId, svgRoot);
this.clipPathManager = new ClippathManager(zrId, svgRoot);
this.shadowManager = new ShadowManager(zrId, svgRoot);
var viewport = document.createElement('div');
viewport.style.cssText = 'overflow:hidden;position:relative';
+ this._svgDom = svgDom;
this._svgRoot = svgRoot;
+ this._backgroundRoot = bgRoot;
this._viewport = viewport;
root.appendChild(viewport);
- viewport.appendChild(svgRoot);
+ viewport.appendChild(svgDom);
this.resize(opts.width, opts.height);
this._visibleList = [];
};
@@ -105,6 +111,12 @@ SVGPainter.prototype = {
getViewportRoot: function () {
return this._viewport;
},
+ getSvgDom: function () {
+ return this._svgDom;
+ },
+ getSvgRoot: function () {
+ return this._svgRoot;
+ },
getViewportRootOffset: function () {
var viewportRoot = this.getViewportRoot();
@@ -122,7 +134,23 @@ SVGPainter.prototype = {
},
setBackgroundColor: function (backgroundColor) {
// TODO gradient
- this._viewport.style.background = backgroundColor;
+ // Insert a bg rect instead of setting background to viewport.
+ // Otherwise, the exported SVG don't have background.
+ if (this._backgroundRoot && this._backgroundNode) {
+ this._backgroundRoot.removeChild(this._backgroundNode);
+ }
+
+ var bgNode = createElement('rect');
+ bgNode.setAttribute('width', this.getWidth());
+ bgNode.setAttribute('height', this.getHeight());
+ bgNode.setAttribute('x', 0);
+ bgNode.setAttribute('y', 0);
+ bgNode.setAttribute('id', 0);
+ bgNode.style.fill = backgroundColor;
+
+ this._backgroundRoot.appendChild(bgNode);
+
+ this._backgroundNode = bgNode;
},
_paintList: function (list) {
this.gradientManager.markAllUnused();
@@ -231,9 +259,8 @@ SVGPainter.prototype = {
this._visibleList = newVisibleList;
},
_getDefs: function (isForceCreating) {
- var svgRoot = this._svgRoot;
-
- var defs = this._svgRoot.getElementsByTagName('defs');
+ var svgRoot = this._svgDom;
+ var defs = svgRoot.getElementsByTagName('defs');
if (defs.length === 0) {
// Not exist
@@ -287,11 +314,17 @@ SVGPainter.prototype = {
var viewportStyle = viewport.style;
viewportStyle.width = width + 'px';
viewportStyle.height = height + 'px';
- var svgRoot = this._svgRoot; // Set width by 'svgRoot.width = width' is invalid
+ var svgRoot = this._svgDom; // Set width by 'svgRoot.width = width' is invalid
svgRoot.setAttribute('width', width);
svgRoot.setAttribute('height', height);
}
+
+ if (this._backgroundNode) {
+ this._backgroundNode.setAttribute('width', width);
+
+ this._backgroundNode.setAttribute('height', height);
+ }
},
/**
@@ -325,16 +358,16 @@ SVGPainter.prototype = {
},
dispose: function () {
this.root.innerHTML = '';
- this._svgRoot = this._viewport = this.storage = null;
+ this._svgRoot = this._backgroundRoot = this._svgDom = this._backgroundNode = this._viewport = this.storage = null;
},
clear: function () {
if (this._viewport) {
this.root.removeChild(this._viewport);
}
},
- pathToDataUrl: function () {
+ toDataURL: function () {
this.refresh();
- var html = this._svgRoot.outerHTML;
+ var html = encodeURIComponent(this._svgDom.outerHTML.replace(/></g, '>\n\r<'));
return 'data:image/svg+xml;charset=UTF-8,' + html;
}
}; // Not supported methods
@@ -346,7 +379,7 @@ function createMethodNotSupport(method) {
} // Unsuppoted methods
-util.each(['getLayer', 'insertLayer', 'eachLayer', 'eachBuiltinLayer', 'eachOtherLayer', 'getLayers', 'modLayer', 'delLayer', 'clearLayer', 'toDataURL', 'pathToImage'], function (name) {
+util.each(['getLayer', 'insertLayer', 'eachLayer', 'eachBuiltinLayer', 'eachOtherLayer', 'getLayers', 'modLayer', 'delLayer', 'clearLayer', 'pathToImage'], function (name) {
SVGPainter.prototype[name] = createMethodNotSupport(name);
});
export default SVGPainter;
\ No newline at end of file
diff --git a/en/builder/src/zrender/zrender.js b/en/builder/src/zrender/zrender.js
index 40649b3..a237ab5 100644
--- a/en/builder/src/zrender/zrender.js
+++ b/en/builder/src/zrender/zrender.js
@@ -25,7 +25,7 @@ var instances = {}; // ZRender实例map索引
* @type {string}
*/
-export var version = '4.3.0';
+export var version = '4.3.1';
/**
* Initializing a zrender instance
* @param {HTMLElement} dom
diff --git a/en/changelog.html b/en/changelog.html
index a624b80..09550ae 100644
--- a/en/changelog.html
+++ b/en/changelog.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/en/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
@@ -7,7 +7,50 @@
document.head.insertBefore(el, document.getElementById('font-hack'));
}
</script><title>Changelog - Apache ECharts (incubating)</title><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/jquery@2.2.4/dist/jquery.min.js"></script></head><!--[if lte IE 8]><body class="lower-ie"><div id="lowie-main"><img src="https://echarts.cdn.apache.org/en/images/forie.png" alt="ie tip"></div></body><![endif]-->
-<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Apache ECharts is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.</p><p>We are working on redirecting this Website to <a href="https://echarts.apache.org" target="_blank">https://echarts.apache.org</a>. You may visit our new official Website now.</p></div><a href="https://echarts.apache.org" target="_blank" onclick="lo [...]
+<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Apache ECharts is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.</p><p>We are working on redirecting this Website to <a href="https://echarts.apache.org" target="_blank">https://echarts.apache.org</a>. You may visit our new official Website now.</p></div><a href="https://echarts.apache.org" target="_blank" onclick="lo [...]
+<div class="time">2020-05-25</div>
+
+<ul>
+<li><p>[Feature] [toolbox] Support download SVG file in toolbox when using SVG render mode. <a href="https://github.com/apache/incubator-echarts/pull/12144">#12144</a> (<a href="https://github.com/Ovilia">Zhang Wenli</a>)</p>
+</li>
+<li><p>[Feature] Add more parameters in the loading effect. <a href="https://github.com/apache/incubator-echarts/pull/12414">#12414</a> (<a href="https://github.com/yufeng04">Yu Feng</a>)</p>
+</li>
+<li><p>[Feature] Support callback for <code>symbolRotate</code>. <a href="https://github.com/apache/incubator-echarts/pull/12348">#12348</a> <a href="https://github.com/apache/incubator-echarts/pull/12354">#12354</a> (<a href="https://github.com/plainheart">plainheart</a>)</p>
+</li>
+<li><p>[Feature] [axis] Callbacks of <code>min</code>, <code>max</code> can return <code>null</code> to use the default value now. <a href="https://github.com/apache/incubator-echarts/pull/12215">#11829</a> (<a href="https://github.com/susiwen8">Su Siwen</a>), <a href="https://github.com/apache/incubator-echarts/pull/12371">#12371</a> (<a href="https://github.com/100pah">Su Shuang</a>)</p>
+</li>
+<li><p>[Feature] [geo] Add <code>nameProperty</code> to specify the name field of GeoJSON source. <a href="https://github.com/apache/incubator-echarts/pull/12156">#12156</a> (<a href="https://github.com/alex2wong">alex2wong</a>)</p>
+</li>
+<li><p>[Fix] [sankey] Fix tooltip not displayed on edges. <a href="https://github.com/apache/incubator-echarts/pull/12011">#12011</a> (<a href="https://github.com/susiwen8">Su Siwen</a>)</p>
+</li>
+<li><p>[Fix] [sankey] Fix node may disappear when link value is 0. <a href="https://github.com/apache/incubator-echarts/pull/12191">#12191</a> (<a href="https://github.com/susiwen8">Su Siwen</a>), <a href="https://github.com/apache/incubator-echarts/pull/12472">#12472</a> (<a href="https://github.com/100pah">Su Shuang</a>)</p>
+</li>
+<li><p>[Fix] [treemap] Add missing params in the foramtter callback. <a href="https://github.com/apache/incubator-echarts/pull/11854">#11854</a> (<a href="https://github.com/susiwen8">Su Siwen</a>, <a href="https://github.com/100pah">Su Shuang</a>)</p>
+</li>
+<li><p>[Fix] [calendar] Fix calendar chart layout when user is in a timezone with DST. <a href="https://github.com/apache/incubator-echarts/pull/12172">#12172</a> (<a href="https://github.com/mikeyshing88">mikeyshing88</a>), <a href="https://github.com/apache/incubator-echarts/pull/12466">#12466</a> (<a href="https://github.com/100pah">Su Shuang</a>)</p>
+</li>
+<li><p>[Fix] [line] Fix safari may crash because of memory explosion when using gradient, shadow with large wide-range animation. <a href="https://github.com/apache/incubator-echarts/pull/12410">#12410</a> (<a href="https://github.com/pissang">Shen Yi</a>)</p>
+</li>
+<li><p>[Fix] [line] Fix clip bug in chromium when chart size over 18000px. <a href="https://github.com/apache/incubator-echarts/pull/12393">#12393</a> (<a href="https://github.com/zhanfang">Zhan Fang</a>)</p>
+</li>
+<li><p>[Fix] [pie] Fix label may disappear when animation is disabled. <a href="https://github.com/apache/incubator-echarts/issues/12243">#12243</a> (<a href="https://github.com/Ovilia">Zhang Wenli</a>)</p>
+</li>
+<li><p>[Fix] [title] Fix potential security risk when <code>'_blank'</code> target for link. <a href="https://github.com/apache/incubator-echarts/issues/12380">#12380</a> (<a href="https://github.com/susiwen8">Su Siwen</a>)</p>
+</li>
+<li><p>[Fix] [geo] Fix animation not work when change <code>center</code> or <code>zoom</code> with <code>setOption</code>. <a href="https://github.com/apache/incubator-echarts/pull/12340">#12340</a> (<a href="https://github.com/Ovilia">Zhang Wenli</a>)</p>
+</li>
+<li><p>[Fix] [heatmap] Remove the 1px gap. <a href="https://github.com/apache/incubator-echarts/pull/12342">#12342</a> (<a href="https://github.com/SnailSword">SnailSword</a>)</p>
+</li>
+<li><p>[Fix] [sunburst] Fix default downplay style not work bug. <a href="https://github.com/apache/incubator-echarts/pull/12264">#12264</a> (<a href="https://github.com/pissang">Shen Yi</a>)</p>
+</li>
+<li><p>[Fix] [visualMap] <code>minOpen</code> and <code>maxOpen</code> is not counted into pieces number now. <a href="https://github.com/apache/incubator-echarts/pull/12147">#12147</a> (<a href="https://github.com/susiwen8">Su Siwen</a>)</p>
+</li>
+<li><p>[Fix] [bmap] [extension] Fix layer may not been cleared when using progressive rendering. (<a href="https://github.com/pissang">Shen Yi</a>)</p>
+</li>
+<li><p>[Fix] [bmap] [extension] Fix unexpected refresh bug.<a href="https://github.com/apache/incubator-echarts/pull/12411">#12411</a> (<a href="https://github.com/pissang">Shen Yi</a>)</p>
+</li>
+</ul>
+<h2 id="v4-7-0">v4.7.0</h2>
<div class="time">2020-03-18</div>
<ul>
diff --git a/en/cheat-sheet.html b/en/cheat-sheet.html
index 6939822..c2f42e5 100644
--- a/en/cheat-sheet.html
+++ b/en/cheat-sheet.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/en/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
diff --git a/en/coding-standard.html b/en/coding-standard.html
index 5aa1aad..77206e2 100644
--- a/en/coding-standard.html
+++ b/en/coding-standard.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/en/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
diff --git a/en/committers.html b/en/committers.html
index 8982ad1..5695861 100644
--- a/en/committers.html
+++ b/en/committers.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/en/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
diff --git a/en/dependencies.html b/en/dependencies.html
index 336282f..a168daa 100644
--- a/en/dependencies.html
+++ b/en/dependencies.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/en/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
diff --git a/en/dist/echarts-en.common.js b/en/dist/echarts-en.common.js
index beb0f26..900be34 100644
--- a/en/dist/echarts-en.common.js
+++ b/en/dist/echarts-en.common.js
@@ -10252,6 +10252,10 @@ Painter.prototype = {
if (this._layerConfig[zlevel]) {
merge(layer, this._layerConfig[zlevel], true);
}
+ // TODO Remove EL_AFTER_INCREMENTAL_INC magic number
+ else if (this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC]) {
+ merge(layer, this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC], true);
+ }
if (virtual) {
layer.virtual = virtual;
@@ -10404,12 +10408,26 @@ Painter.prototype = {
var prevLayer = null;
var incrementalLayerCount = 0;
+ var prevZlevel;
for (var i = 0; i < list.length; i++) {
var el = list[i];
var zlevel = el.zlevel;
var layer;
- // PENDING If change one incremental element style ?
- // TODO Where there are non-incremental elements between incremental elements.
+
+ if (prevZlevel !== zlevel) {
+ prevZlevel = zlevel;
+ incrementalLayerCount = 0;
+ }
+
+ // TODO Not use magic number on zlevel.
+
+ // Each layer with increment element can be separated to 3 layers.
+ // (Other Element drawn after incremental element)
+ // -----------------zlevel + EL_AFTER_INCREMENTAL_INC--------------------
+ // (Incremental element)
+ // ----------------------zlevel + INCREMENTAL_INC------------------------
+ // (Element drawn before incremental element)
+ // --------------------------------zlevel--------------------------------
if (el.incremental) {
layer = this.getLayer(zlevel + INCREMENTAL_INC, this._needsManuallyCompositing);
layer.incremental = true;
@@ -10504,6 +10522,7 @@ Painter.prototype = {
for (var i = 0; i < this._zlevelList.length; i++) {
var _zlevel = this._zlevelList[i];
+ // TODO Remove EL_AFTER_INCREMENTAL_INC magic number
if (_zlevel === zlevel || _zlevel === zlevel + EL_AFTER_INCREMENTAL_INC) {
var layer = this._layers[_zlevel];
merge(layer, layerConfig[zlevel], true);
@@ -11576,7 +11595,7 @@ var instances$1 = {}; // ZRender实例map索引
/**
* @type {string}
*/
-var version$1 = '4.3.0';
+var version$1 = '4.3.1';
/**
* Initializing a zrender instance
@@ -17782,11 +17801,13 @@ function getHighlightDigit(highlightKey) {
* @param {Object} opt Check `opt` of `setTextStyleCommon` to find other props.
* @param {string|Function} [opt.defaultText]
* @param {module:echarts/model/Model} [opt.labelFetcher] Fetch text by
- * `opt.labelFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex)`
- * @param {module:echarts/model/Model} [opt.labelDataIndex] Fetch text by
- * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex)`
- * @param {module:echarts/model/Model} [opt.labelDimIndex] Fetch text by
- * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex)`
+ * `opt.labelFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
+ * @param {number} [opt.labelDataIndex] Fetch text by
+ * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
+ * @param {number} [opt.labelDimIndex] Fetch text by
+ * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
+ * @param {string} [opt.labelProp] Fetch text by
+ * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
* @param {Object} [normalSpecified]
* @param {Object} [emphasisSpecified]
*/
@@ -17800,6 +17821,7 @@ function setLabelStyle(
var labelFetcher = opt.labelFetcher;
var labelDataIndex = opt.labelDataIndex;
var labelDimIndex = opt.labelDimIndex;
+ var labelProp = opt.labelProp;
// This scenario, `label.normal.show = true; label.emphasis.show = false`,
// is not supported util someone requests.
@@ -17813,7 +17835,7 @@ function setLabelStyle(
var baseText;
if (showNormal || showEmphasis) {
if (labelFetcher) {
- baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex);
+ baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex, labelProp);
}
if (baseText == null) {
baseText = isFunction$1(opt.defaultText) ? opt.defaultText(labelDataIndex, opt) : opt.defaultText;
@@ -17823,7 +17845,7 @@ function setLabelStyle(
var emphasisStyleText = showEmphasis
? retrieve2(
labelFetcher
- ? labelFetcher.getFormattedLabel(labelDataIndex, 'emphasis', null, labelDimIndex)
+ ? labelFetcher.getFormattedLabel(labelDataIndex, 'emphasis', null, labelDimIndex, labelProp)
: null,
baseText
)
@@ -19734,7 +19756,7 @@ var number = (Object.freeze || Object)({
// import Text from 'zrender/src/graphic/Text';
/**
- * 每三位默认加,格式化
+ * add commas after every three numbers
* @param {string|number} x
* @return {string}
*/
@@ -19987,6 +20009,22 @@ function getTextRect(
);
}
+/**
+ * open new tab
+ * @param {string} link url
+ * @param {string} target blank or self
+ */
+function windowOpen(link, target) {
+ if (target === '_blank' || target === 'blank') {
+ var blank = window.open();
+ blank.opener = null;
+ blank.location = link;
+ }
+ else {
+ window.open(link, target);
+ }
+}
+
var format = (Object.freeze || Object)({
addCommas: addCommas,
@@ -20000,7 +20038,8 @@ var format = (Object.freeze || Object)({
capitalFirst: capitalFirst,
truncateText: truncateText$1,
getTextBoundingRect: getTextBoundingRect,
- getTextRect: getTextRect
+ getTextRect: getTextRect,
+ windowOpen: windowOpen
});
/*
@@ -24981,7 +25020,7 @@ function dataTaskReset(context) {
function dataTaskProgress(param, context) {
// Avoid repead cloneShallow when data just created in reset.
- if (param.end > context.outputData.count()) {
+ if (context.outputData && param.end > context.outputData.count()) {
context.model.getRawData().cloneShallow(context.outputData);
}
}
@@ -25703,6 +25742,32 @@ var lang = {
lang: ['Right Click to Save Image']
}
},
+ series: {
+ typeNames: {
+ pie: 'Pie chart',
+ bar: 'Bar chart',
+ line: 'Line chart',
+ scatter: 'Scatter plot',
+ effectScatter: 'Ripple scatter plot',
+ radar: 'Radar chart',
+ tree: 'Tree',
+ treemap: 'Treemap',
+ boxplot: 'Boxplot',
+ candlestick: 'Candlestick',
+ k: 'K line chart',
+ heatmap: 'Heat map',
+ map: 'Map',
+ parallel: 'Parallel coordinate map',
+ lines: 'Line graph',
+ graph: 'Relationship graph',
+ sankey: 'Sankey diagram',
+ funnel: 'Funnel chart',
+ gauge: 'Guage',
+ pictorialBar: 'Pictorial bar',
+ themeRiver: 'Theme River Map',
+ sunburst: 'Sunburst'
+ }
+ },
aria: {
general: {
withTitle: 'This is a chart about "{title}"',
@@ -25935,11 +26000,16 @@ var loadingDefault = function (api, opts) {
opts = opts || {};
defaults(opts, {
text: 'loading',
- color: '#c23531',
textColor: '#000',
+ fontSize: '12px',
maskColor: 'rgba(255, 255, 255, 0.8)',
+ showSpinner: true,
+ color: '#c23531',
+ spinnerRadius: 10,
+ lineWidth: 5,
zlevel: 0
});
+ var group = new Group();
var mask = new Rect({
style: {
fill: opts.maskColor
@@ -25947,24 +26017,13 @@ var loadingDefault = function (api, opts) {
zlevel: opts.zlevel,
z: 10000
});
- var arc = new Arc({
- shape: {
- startAngle: -PI$1 / 2,
- endAngle: -PI$1 / 2 + 0.1,
- r: 10
- },
- style: {
- stroke: opts.color,
- lineCap: 'round',
- lineWidth: 5
- },
- zlevel: opts.zlevel,
- z: 10001
- });
+ group.add(mask);
+ var font = opts.fontSize + ' sans-serif';
var labelRect = new Rect({
style: {
fill: 'none',
text: opts.text,
+ font: font,
textPosition: 'right',
textDistance: 10,
textFill: opts.textColor
@@ -25972,32 +26031,49 @@ var loadingDefault = function (api, opts) {
zlevel: opts.zlevel,
z: 10001
});
-
- arc.animateShape(true)
- .when(1000, {
- endAngle: PI$1 * 3 / 2
- })
- .start('circularInOut');
- arc.animateShape(true)
- .when(1000, {
- startAngle: PI$1 * 3 / 2
- })
- .delay(300)
- .start('circularInOut');
-
- var group = new Group();
- group.add(arc);
group.add(labelRect);
- group.add(mask);
+ if (opts.showSpinner) {
+ var arc = new Arc({
+ shape: {
+ startAngle: -PI$1 / 2,
+ endAngle: -PI$1 / 2 + 0.1,
+ r: opts.spinnerRadius
+ },
+ style: {
+ stroke: opts.color,
+ lineCap: 'round',
+ lineWidth: opts.lineWidth
+ },
+ zlevel: opts.zlevel,
+ z: 10001
+ });
+ arc.animateShape(true)
+ .when(1000, {
+ endAngle: PI$1 * 3 / 2
+ })
+ .start('circularInOut');
+ arc.animateShape(true)
+ .when(1000, {
+ startAngle: PI$1 * 3 / 2
+ })
+ .delay(300)
+ .start('circularInOut');
+ group.add(arc);
+ }
// Inject resize
group.resize = function () {
- var cx = api.getWidth() / 2;
+ var textWidth = getWidth(opts.text, font);
+ var r = opts.showSpinner ? opts.spinnerRadius : 0;
+ // cx = (containerWidth - arcDiameter - textDistance - textWidth) / 2
+ // textDistance needs to be calculated when both animation and text exist
+ var cx = (api.getWidth() - r * 2 - (opts.showSpinner && textWidth ? 10 : 0) - textWidth) / 2
+ // only show the text
+ - (opts.showSpinner ? 0 : textWidth / 2);
var cy = api.getHeight() / 2;
- arc.setShape({
+ opts.showSpinner && arc.setShape({
cx: cx,
cy: cy
});
- var r = arc.shape.r;
labelRect.setShape({
x: cx - r,
y: cy - r,
@@ -27653,10 +27729,10 @@ var isFunction = isFunction$1;
var isObject = isObject$1;
var parseClassType = ComponentModel.parseClassType;
-var version = '4.7.0';
+var version = '4.8.0';
var dependencies = {
- zrender: '4.3.0'
+ zrender: '4.3.1'
};
var TEST_FRAME_REMAIN_TIME = 1;
@@ -28075,7 +28151,7 @@ echartsProto.getRenderedCanvas = function (opts) {
* Get svg data url
* @return {string}
*/
-echartsProto.getSvgDataUrl = function () {
+echartsProto.getSvgDataURL = function () {
if (!env$1.svgSupported) {
return;
}
@@ -28087,7 +28163,7 @@ echartsProto.getSvgDataUrl = function () {
el.stopAnimation(true);
});
- return zr.painter.pathToDataUrl();
+ return zr.painter.toDataURL();
};
/**
@@ -28123,7 +28199,7 @@ echartsProto.getDataURL = function (opts) {
});
var url = this._zr.painter.getType() === 'svg'
- ? this.getSvgDataUrl()
+ ? this.getSvgDataURL()
: this.getRenderedCanvas(opts).toDataURL(
'image/' + (opts && opts.type || 'png')
);
@@ -28152,6 +28228,7 @@ echartsProto.getConnectedDataURL = function (opts) {
if (!env$1.canvasSupported) {
return;
}
+ var isSvg = opts.type === 'svg';
var groupId = this.group;
var mathMin = Math.min;
var mathMax = Math.max;
@@ -28166,9 +28243,9 @@ echartsProto.getConnectedDataURL = function (opts) {
each$1(instances, function (chart, id) {
if (chart.group === groupId) {
- var canvas = chart.getRenderedCanvas(
- clone(opts)
- );
+ var canvas = isSvg
+ ? chart.getZr().painter.getSvgDom().innerHTML
+ : chart.getRenderedCanvas(clone(opts));
var boundingRect = chart.getDom().getBoundingClientRect();
left = mathMin(boundingRect.left, left);
top = mathMin(boundingRect.top, top);
@@ -28189,38 +28266,61 @@ echartsProto.getConnectedDataURL = function (opts) {
var width = right - left;
var height = bottom - top;
var targetCanvas = createCanvas();
- targetCanvas.width = width;
- targetCanvas.height = height;
- var zr = init$1(targetCanvas);
+ var zr = init$1(targetCanvas, {
+ renderer: isSvg ? 'svg' : 'canvas'
+ });
+ zr.resize({
+ width: width,
+ height: height
+ });
- // Background between the charts
- if (opts.connectedBackgroundColor) {
- zr.add(new Rect({
- shape: {
- x: 0,
- y: 0,
- width: width,
- height: height
- },
- style: {
- fill: opts.connectedBackgroundColor
- }
- }));
+ if (isSvg) {
+ var content = '';
+ each(canvasList, function (item) {
+ var x = item.left - left;
+ var y = item.top - top;
+ content += '<g transform="translate(' + x + ','
+ + y + ')">' + item.dom + '</g>';
+ });
+ zr.painter.getSvgRoot().innerHTML = content;
+
+ if (opts.connectedBackgroundColor) {
+ zr.painter.setBackgroundColor(opts.connectedBackgroundColor);
+ }
+
+ zr.refreshImmediately();
+ return zr.painter.toDataURL();
}
+ else {
+ // Background between the charts
+ if (opts.connectedBackgroundColor) {
+ zr.add(new Rect({
+ shape: {
+ x: 0,
+ y: 0,
+ width: width,
+ height: height
+ },
+ style: {
+ fill: opts.connectedBackgroundColor
+ }
+ }));
+ }
- each(canvasList, function (item) {
- var img = new ZImage({
- style: {
- x: item.left * dpr - left,
- y: item.top * dpr - top,
- image: item.dom
- }
+ each(canvasList, function (item) {
+ var img = new ZImage({
+ style: {
+ x: item.left * dpr - left,
+ y: item.top * dpr - top,
+ image: item.dom
+ }
+ });
+ zr.add(img);
});
- zr.add(img);
- });
- zr.refreshImmediately();
- return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png'));
+ zr.refreshImmediately();
+ return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png'));
+ }
}
else {
return this.getDataURL(opts);
@@ -34628,9 +34728,11 @@ var largeLayout = {
coord = cartesian.dataToPoint(valuePair, null, coord);
// Data index might not be in order, depends on `progressiveChunkMode`.
- largeBackgroundPoints[pointsOffset] = valueAxisHorizontal ? coordLayout.x + coordLayout.width : coord[0];
+ largeBackgroundPoints[pointsOffset] = valueAxisHorizontal
+ ? coordLayout.x + coordLayout.width : coord[0];
largePoints[pointsOffset++] = coord[0];
- largeBackgroundPoints[pointsOffset] = valueAxisHorizontal ? coord[1] : coordLayout.y + coordLayout.height;
+ largeBackgroundPoints[pointsOffset] = valueAxisHorizontal
+ ? coord[1] : coordLayout.y + coordLayout.height;
largePoints[pointsOffset++] = coord[1];
largeDataIndices[idxOffset++] = dataIndex;
}
@@ -35120,8 +35222,6 @@ function getScaleExtent(scale, model) {
var min = model.getMin();
var max = model.getMax();
- var fixMin = min != null;
- var fixMax = max != null;
var originalExtent = scale.getExtent();
var axisDataLen;
@@ -35165,17 +35265,6 @@ function getScaleExtent(scale, model) {
// (2) When `needCrossZero` and all data is positive/negative, should it be ensured
// that the results processed by boundaryGap are positive/negative?
- if (min == null) {
- min = scaleType === 'ordinal'
- ? (axisDataLen ? 0 : NaN)
- : originalExtent[0] - boundaryGap[0] * span;
- }
- if (max == null) {
- max = scaleType === 'ordinal'
- ? (axisDataLen ? axisDataLen - 1 : NaN)
- : originalExtent[1] + boundaryGap[1] * span;
- }
-
if (min === 'dataMin') {
min = originalExtent[0];
}
@@ -35196,6 +35285,20 @@ function getScaleExtent(scale, model) {
});
}
+ var fixMin = min != null;
+ var fixMax = max != null;
+
+ if (min == null) {
+ min = scaleType === 'ordinal'
+ ? (axisDataLen ? 0 : NaN)
+ : originalExtent[0] - boundaryGap[0] * span;
+ }
+ if (max == null) {
+ max = scaleType === 'ordinal'
+ ? (axisDataLen ? axisDataLen - 1 : NaN)
+ : originalExtent[1] + boundaryGap[1] * span;
+ }
+
(min == null || !isFinite(min)) && (min = NaN);
(max == null || !isFinite(max)) && (max = NaN);
@@ -35246,7 +35349,13 @@ function getScaleExtent(scale, model) {
}
}
- return [min, max];
+ return {
+ extent: [min, max],
+ // "fix" means "fixed", the value should not be
+ // changed in the subsequent steps.
+ fixMin: fixMin,
+ fixMax: fixMax
+ };
}
function adjustScaleForOverflow(min, max, model, barWidthAndOffset) {
@@ -35285,9 +35394,9 @@ function adjustScaleForOverflow(min, max, model, barWidthAndOffset) {
}
function niceScaleExtent(scale, model) {
- var extent = getScaleExtent(scale, model);
- var fixMin = model.getMin() != null;
- var fixMax = model.getMax() != null;
+ var extentInfo = getScaleExtent(scale, model);
+ var extent = extentInfo.extent;
+
var splitNumber = model.get('splitNumber');
if (scale.type === 'log') {
@@ -35298,8 +35407,8 @@ function niceScaleExtent(scale, model) {
scale.setExtent(extent[0], extent[1]);
scale.niceExtent({
splitNumber: splitNumber,
- fixMin: fixMin,
- fixMax: fixMax,
+ fixMin: extentInfo.fixMin,
+ fixMax: extentInfo.fixMax,
minInterval: (scaleType === 'interval' || scaleType === 'time')
? model.get('minInterval') : null,
maxInterval: (scaleType === 'interval' || scaleType === 'time')
@@ -36332,9 +36441,10 @@ function decodePolygon(coordinate, encodeOffsets, encodeScale) {
/**
* @alias module:echarts/coord/geo/parseGeoJson
* @param {Object} geoJson
+ * @param {string} nameProperty
* @return {module:zrender/container/Group}
*/
-var parseGeoJSON = function (geoJson) {
+var parseGeoJSON = function (geoJson, nameProperty) {
decode(geoJson);
@@ -36372,7 +36482,7 @@ var parseGeoJSON = function (geoJson) {
}
var region = new Region(
- properties.name,
+ properties[nameProperty || 'name'],
geometries,
properties.cp
);
@@ -37569,7 +37679,6 @@ symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {
var itemStyle = seriesScope && seriesScope.itemStyle;
var hoverItemStyle = seriesScope && seriesScope.hoverItemStyle;
- var symbolRotate = seriesScope && seriesScope.symbolRotate;
var symbolOffset = seriesScope && seriesScope.symbolOffset;
var labelModel = seriesScope && seriesScope.labelModel;
var hoverLabelModel = seriesScope && seriesScope.hoverLabelModel;
@@ -37585,7 +37694,6 @@ symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {
itemStyle = itemModel.getModel(normalStyleAccessPath).getItemStyle(['color']);
hoverItemStyle = itemModel.getModel(emphasisStyleAccessPath).getItemStyle();
- symbolRotate = itemModel.getShallow('symbolRotate');
symbolOffset = itemModel.getShallow('symbolOffset');
labelModel = itemModel.getModel(normalLabelAccessPath);
@@ -37599,6 +37707,8 @@ symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {
var elStyle = symbolPath.style;
+ var symbolRotate = data.getItemVisual(idx, 'symbolRotate');
+
symbolPath.attr('rotation', (symbolRotate || 0) * Math.PI / 180 || 0);
if (symbolOffset) {
@@ -38654,6 +38764,10 @@ function createGridClipPath(cartesian, hasAnimation, seriesModel) {
width += lineWidth;
height += lineWidth;
+ // fix: https://github.com/apache/incubator-echarts/issues/11369
+ x = Math.floor(x);
+ width = Math.round(width);
+
var clipPath = new Rect({
shape: {
x: x,
@@ -38751,6 +38865,26 @@ function isPointsSame(points1, points2) {
return true;
}
+function getBoundingDiff(points1, points2) {
+ var min1 = [];
+ var max1 = [];
+
+ var min2 = [];
+ var max2 = [];
+
+ fromPoints(points1, min1, max1);
+ fromPoints(points2, min2, max2);
+
+ // Get a max value from each corner of two boundings.
+ return Math.max(
+ Math.abs(min1[0] - min2[0]),
+ Math.abs(min1[1] - min2[1]),
+
+ Math.abs(max1[0] - max2[0]),
+ Math.abs(max1[1] - max2[1])
+ );
+}
+
function getSmooth(smooth) {
return typeof (smooth) === 'number' ? smooth : (smooth ? 0.5 : 0);
}
@@ -39363,6 +39497,24 @@ Chart.extend({
next = turnPointsIntoStep(diff.next, coordSys, step);
stackedOnNext = turnPointsIntoStep(diff.stackedOnNext, coordSys, step);
}
+ // Don't apply animation if diff is large.
+ // For better result and avoid memory explosion problems like
+ // https://github.com/apache/incubator-echarts/issues/12229
+ if (getBoundingDiff(current, next) > 3000
+ || (polygon && getBoundingDiff(stackedOnCurrent, stackedOnNext) > 3000)
+ ) {
+ polyline.setShape({
+ points: next
+ });
+ if (polygon) {
+ polygon.setShape({
+ points: next,
+ stackedOnPoints: stackedOnNext
+ });
+ }
+ return;
+ }
+
// `diff.current` is subset of `current` (which should be ensured by
// turnPointsIntoStep), so points in `__points` can be updated when
// points in `current` are update during animation.
@@ -39469,13 +39621,14 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
var symbolType = seriesModel.get('symbol');
var symbolSize = seriesModel.get('symbolSize');
var keepAspect = seriesModel.get('symbolKeepAspect');
+ var symbolRotate = seriesModel.get('symbolRotate');
var hasSymbolTypeCallback = isFunction$1(symbolType);
var hasSymbolSizeCallback = isFunction$1(symbolSize);
- var hasCallback = hasSymbolTypeCallback || hasSymbolSizeCallback;
+ var hasSymbolRotateCallback = isFunction$1(symbolRotate);
+ var hasCallback = hasSymbolTypeCallback || hasSymbolSizeCallback || hasSymbolRotateCallback;
var seriesSymbol = (!hasSymbolTypeCallback && symbolType) ? symbolType : defaultSymbolType;
var seriesSymbolSize = !hasSymbolSizeCallback ? symbolSize : null;
-
data.setVisual({
legendSymbol: legendSymbol || seriesSymbol,
// If seting callback functions on `symbol` or `symbolSize`, for simplicity and avoiding
@@ -39484,7 +39637,8 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
// some cases but generally it is not recommanded.
symbol: seriesSymbol,
symbolSize: seriesSymbolSize,
- symbolKeepAspect: keepAspect
+ symbolKeepAspect: keepAspect,
+ symbolRotate: symbolRotate
});
// Only visible series has each data be visual encoded
@@ -39498,12 +39652,14 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
var params = seriesModel.getDataParams(idx);
hasSymbolTypeCallback && data.setItemVisual(idx, 'symbol', symbolType(rawValue, params));
hasSymbolSizeCallback && data.setItemVisual(idx, 'symbolSize', symbolSize(rawValue, params));
+ hasSymbolRotateCallback && data.setItemVisual(idx, 'symbolRotate', symbolRotate(rawValue, params));
}
if (data.hasItemOption) {
var itemModel = data.getItemModel(idx);
var itemSymbolType = itemModel.getShallow('symbol', true);
var itemSymbolSize = itemModel.getShallow('symbolSize', true);
+ var itemSymbolRotate = itemModel.getShallow('symbolRotate', true);
var itemSymbolKeepAspect = itemModel.getShallow('symbolKeepAspect', true);
// If has item symbol
@@ -39514,6 +39670,9 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
// PENDING Transform symbolSize ?
data.setItemVisual(idx, 'symbolSize', itemSymbolSize);
}
+ if (itemSymbolRotate != null) {
+ data.setItemVisual(idx, 'symbolRotate', itemSymbolRotate);
+ }
if (itemSymbolKeepAspect != null) {
data.setItemVisual(idx, 'symbolKeepAspect', itemSymbolKeepAspect);
}
@@ -43389,6 +43548,7 @@ extendChartView({
var drawBackground = seriesModel.get('showBackground', true);
var backgroundModel = seriesModel.getModel('backgroundStyle');
+ var barBorderRadius = backgroundModel.get('barBorderRadius') || 0;
var bgEls = [];
var oldBgEls = this._backgroundEls || [];
@@ -43399,8 +43559,13 @@ extendChartView({
var layout = getLayout[coord.type](data, dataIndex, itemModel);
if (drawBackground) {
- var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, layout);
+ var bgLayout = getLayout[coord.type](data, dataIndex);
+ var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, bgLayout);
bgEl.useStyle(backgroundModel.getBarItemStyle());
+ // Only cartesian2d support borderRadius.
+ if (coord.type === 'cartesian2d') {
+ bgEl.setShape('r', barBorderRadius);
+ }
bgEls[dataIndex] = bgEl;
}
@@ -43437,9 +43602,14 @@ extendChartView({
if (drawBackground) {
var bgEl = oldBgEls[oldIndex];
bgEl.useStyle(backgroundModel.getBarItemStyle());
+ // Only cartesian2d support borderRadius.
+ if (coord.type === 'cartesian2d') {
+ bgEl.setShape('r', barBorderRadius);
+ }
bgEls[newIndex] = bgEl;
- var shape = createBackgroundShape(isHorizontalOrRadial, layout, coord);
+ var bgLayout = getLayout[coord.type](data, newIndex);
+ var shape = createBackgroundShape(isHorizontalOrRadial, bgLayout, coord);
updateProps(bgEl, { shape: shape }, animationModel, newIndex);
}
@@ -43689,9 +43859,11 @@ function removeSector(dataIndex, animationModel, el) {
}
var getLayout = {
+ // itemModel is only used to get borderWidth, which is not needed
+ // when calculating bar background layout.
cartesian2d: function (data, dataIndex, itemModel) {
var layout = data.getItemLayout(dataIndex);
- var fixedLineWidth = getLineWidth(itemModel, layout);
+ var fixedLineWidth = itemModel ? getLineWidth(itemModel, layout) : 0;
// fix layout with lineWidth
var signX = layout.width > 0 ? 1 : -1;
@@ -44565,31 +44737,36 @@ piePieceProto.updateData = function (data, idx, firstCreate) {
var withAnimation = !firstCreate && animationTypeUpdate === 'transition';
this._updateLabel(data, idx, withAnimation);
- this.highDownOnUpdate = (itemModel.get('hoverAnimation') && seriesModel.isAnimationEnabled())
+ this.highDownOnUpdate = !seriesModel.get('silent')
? function (fromState, toState) {
+ var hasAnimation = seriesModel.isAnimationEnabled() && itemModel.get('hoverAnimation');
if (toState === 'emphasis') {
labelLine.ignore = labelLine.hoverIgnore;
labelText.ignore = labelText.hoverIgnore;
// Sector may has animation of updating data. Force to move to the last frame
// Or it may stopped on the wrong shape
- sector.stopAnimation(true);
- sector.animateTo({
- shape: {
- r: layout.r + seriesModel.get('hoverOffset')
- }
- }, 300, 'elasticOut');
+ if (hasAnimation) {
+ sector.stopAnimation(true);
+ sector.animateTo({
+ shape: {
+ r: layout.r + seriesModel.get('hoverOffset')
+ }
+ }, 300, 'elasticOut');
+ }
}
else {
labelLine.ignore = labelLine.normalIgnore;
labelText.ignore = labelText.normalIgnore;
- sector.stopAnimation(true);
- sector.animateTo({
- shape: {
- r: layout.r
- }
- }, 300, 'elasticOut');
+ if (hasAnimation) {
+ sector.stopAnimation(true);
+ sector.animateTo({
+ shape: {
+ r: layout.r
+ }
+ }, 300, 'elasticOut');
+ }
}
}
: null;
@@ -49549,7 +49726,7 @@ extendComponentView({
var dataModel = el.dataModel || seriesModel;
var dataIndex = el.dataIndex;
var dataType = el.dataType;
- var data = dataModel.getData();
+ var data = dataModel.getData(dataType);
var tooltipModel = buildTooltipModel([
data.getItemModel(dataIndex),
@@ -51894,12 +52071,12 @@ extendComponentView({
if (link) {
textEl.on('click', function () {
- window.open(link, '_' + titleModel.get('target'));
+ windowOpen(link, '_' + titleModel.get('target'));
});
}
if (sublink) {
subTextEl.on('click', function () {
- window.open(sublink, '_' + titleModel.get('subtarget'));
+ windowOpen(link, '_' + titleModel.get('subtarget'));
});
}
@@ -53389,9 +53566,13 @@ lineDrawProto.incrementalPrepareUpdate = function (lineData) {
this.group.removeAll();
};
+function isEffectObject(el) {
+ return el.animators && el.animators.length > 0;
+}
+
lineDrawProto.incrementalUpdate = function (taskParams, lineData) {
function updateIncrementalAndHover(el) {
- if (!el.isGroup) {
+ if (!el.isGroup && !isEffectObject(el)) {
el.incremental = el.useHoverLayer = true;
}
}
@@ -57899,7 +58080,7 @@ extendComponentView({
var feature;
// FIX#11236, merge feature title from MagicType newOption. TODO: consider seriesIndex ?
- if (payload && payload.newTitle != null) {
+ if (payload && payload.newTitle != null && payload.featureName === featureName) {
featureOpt.title = payload.newTitle;
}
@@ -58172,7 +58353,8 @@ var proto$2 = SaveAsImage.prototype;
proto$2.onclick = function (ecModel, api) {
var model = this.model;
var title = model.get('name') || ecModel.get('title.0.text') || 'echarts';
- var type = model.get('type', true) || 'png';
+ var isSvg = api.getZr().painter.getType() === 'svg';
+ var type = isSvg ? 'svg' : model.get('type', true) || 'png';
var url = api.getConnectedDataURL({
type: type,
backgroundColor: model.get('backgroundColor', true)
@@ -58399,7 +58581,8 @@ proto$3.onclick = function (ecModel, api, type) {
type: 'changeMagicType',
currentType: type,
newOption: newOption,
- newTitle: newTitle
+ newTitle: newTitle,
+ featureName: 'magicType'
});
};
@@ -63928,11 +64111,16 @@ var SVGPainter = function (root, storage, opts, zrId) {
this.storage = storage;
this._opts = opts = extend({}, opts || {});
- var svgRoot = createElement('svg');
- svgRoot.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
- svgRoot.setAttribute('version', '1.1');
- svgRoot.setAttribute('baseProfile', 'full');
- svgRoot.style.cssText = 'user-select:none;position:absolute;left:0;top:0;';
+ var svgDom = createElement('svg');
+ svgDom.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
+ svgDom.setAttribute('version', '1.1');
+ svgDom.setAttribute('baseProfile', 'full');
+ svgDom.style.cssText = 'user-select:none;position:absolute;left:0;top:0;';
+
+ var bgRoot = createElement('g');
+ svgDom.appendChild(bgRoot);
+ var svgRoot = createElement('g');
+ svgDom.appendChild(svgRoot);
this.gradientManager = new GradientManager(zrId, svgRoot);
this.clipPathManager = new ClippathManager(zrId, svgRoot);
@@ -63941,11 +64129,13 @@ var SVGPainter = function (root, storage, opts, zrId) {
var viewport = document.createElement('div');
viewport.style.cssText = 'overflow:hidden;position:relative';
+ this._svgDom = svgDom;
this._svgRoot = svgRoot;
+ this._backgroundRoot = bgRoot;
this._viewport = viewport;
root.appendChild(viewport);
- viewport.appendChild(svgRoot);
+ viewport.appendChild(svgDom);
this.resize(opts.width, opts.height);
@@ -63964,6 +64154,14 @@ SVGPainter.prototype = {
return this._viewport;
},
+ getSvgDom: function () {
+ return this._svgDom;
+ },
+
+ getSvgRoot: function () {
+ return this._svgRoot;
+ },
+
getViewportRootOffset: function () {
var viewportRoot = this.getViewportRoot();
if (viewportRoot) {
@@ -63983,7 +64181,21 @@ SVGPainter.prototype = {
setBackgroundColor: function (backgroundColor) {
// TODO gradient
- this._viewport.style.background = backgroundColor;
+ // Insert a bg rect instead of setting background to viewport.
+ // Otherwise, the exported SVG don't have background.
+ if (this._backgroundRoot && this._backgroundNode) {
+ this._backgroundRoot.removeChild(this._backgroundNode);
+ }
+
+ var bgNode = createElement('rect');
+ bgNode.setAttribute('width', this.getWidth());
+ bgNode.setAttribute('height', this.getHeight());
+ bgNode.setAttribute('x', 0);
+ bgNode.setAttribute('y', 0);
+ bgNode.setAttribute('id', 0);
+ bgNode.style.fill = backgroundColor;
+ this._backgroundRoot.appendChild(bgNode);
+ this._backgroundNode = bgNode;
},
_paintList: function (list) {
@@ -64113,8 +64325,8 @@ SVGPainter.prototype = {
},
_getDefs: function (isForceCreating) {
- var svgRoot = this._svgRoot;
- var defs = this._svgRoot.getElementsByTagName('defs');
+ var svgRoot = this._svgDom;
+ var defs = svgRoot.getElementsByTagName('defs');
if (defs.length === 0) {
// Not exist
if (isForceCreating) {
@@ -64171,11 +64383,16 @@ SVGPainter.prototype = {
viewportStyle.width = width + 'px';
viewportStyle.height = height + 'px';
- var svgRoot = this._svgRoot;
+ var svgRoot = this._svgDom;
// Set width by 'svgRoot.width = width' is invalid
svgRoot.setAttribute('width', width);
svgRoot.setAttribute('height', height);
}
+
+ if (this._backgroundNode) {
+ this._backgroundNode.setAttribute('width', width);
+ this._backgroundNode.setAttribute('height', height);
+ }
},
/**
@@ -64217,10 +64434,13 @@ SVGPainter.prototype = {
dispose: function () {
this.root.innerHTML = '';
- this._svgRoot =
- this._viewport =
- this.storage =
- null;
+ this._svgRoot
+ = this._backgroundRoot
+ = this._svgDom
+ = this._backgroundNode
+ = this._viewport
+ = this.storage
+ = null;
},
clear: function () {
@@ -64229,9 +64449,9 @@ SVGPainter.prototype = {
}
},
- pathToDataUrl: function () {
+ toDataURL: function () {
this.refresh();
- var html = this._svgRoot.outerHTML;
+ var html = encodeURIComponent(this._svgDom.outerHTML.replace(/></g, '>\n\r<'));
return 'data:image/svg+xml;charset=UTF-8,' + html;
}
};
@@ -64247,7 +64467,7 @@ function createMethodNotSupport$1(method) {
each$1([
'getLayer', 'insertLayer', 'eachLayer', 'eachBuiltinLayer',
'eachOtherLayer', 'getLayers', 'modLayer', 'delLayer', 'clearLayer',
- 'toDataURL', 'pathToImage'
+ 'pathToImage'
], function (name) {
SVGPainter.prototype[name] = createMethodNotSupport$1(name);
});
diff --git a/en/dist/echarts-en.common.min.js b/en/dist/echarts-en.common.min.js
index 012873f..0e025de 100644
--- a/en/dist/echarts-en.common.min.js
+++ b/en/dist/echarts-en.common.min.js
@@ -19,4 +19,4 @@
*/
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,i=function(){return e++},v="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasS [...]
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,i=function(){return e++},v="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasS [...]
diff --git a/en/dist/echarts-en.js b/en/dist/echarts-en.js
index 34f3d5b..69dc8fc 100644
--- a/en/dist/echarts-en.js
+++ b/en/dist/echarts-en.js
@@ -10252,6 +10252,10 @@ Painter.prototype = {
if (this._layerConfig[zlevel]) {
merge(layer, this._layerConfig[zlevel], true);
}
+ // TODO Remove EL_AFTER_INCREMENTAL_INC magic number
+ else if (this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC]) {
+ merge(layer, this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC], true);
+ }
if (virtual) {
layer.virtual = virtual;
@@ -10404,12 +10408,26 @@ Painter.prototype = {
var prevLayer = null;
var incrementalLayerCount = 0;
+ var prevZlevel;
for (var i = 0; i < list.length; i++) {
var el = list[i];
var zlevel = el.zlevel;
var layer;
- // PENDING If change one incremental element style ?
- // TODO Where there are non-incremental elements between incremental elements.
+
+ if (prevZlevel !== zlevel) {
+ prevZlevel = zlevel;
+ incrementalLayerCount = 0;
+ }
+
+ // TODO Not use magic number on zlevel.
+
+ // Each layer with increment element can be separated to 3 layers.
+ // (Other Element drawn after incremental element)
+ // -----------------zlevel + EL_AFTER_INCREMENTAL_INC--------------------
+ // (Incremental element)
+ // ----------------------zlevel + INCREMENTAL_INC------------------------
+ // (Element drawn before incremental element)
+ // --------------------------------zlevel--------------------------------
if (el.incremental) {
layer = this.getLayer(zlevel + INCREMENTAL_INC, this._needsManuallyCompositing);
layer.incremental = true;
@@ -10504,6 +10522,7 @@ Painter.prototype = {
for (var i = 0; i < this._zlevelList.length; i++) {
var _zlevel = this._zlevelList[i];
+ // TODO Remove EL_AFTER_INCREMENTAL_INC magic number
if (_zlevel === zlevel || _zlevel === zlevel + EL_AFTER_INCREMENTAL_INC) {
var layer = this._layers[_zlevel];
merge(layer, layerConfig[zlevel], true);
@@ -11576,7 +11595,7 @@ var instances$1 = {}; // ZRender实例map索引
/**
* @type {string}
*/
-var version$1 = '4.3.0';
+var version$1 = '4.3.1';
/**
* Initializing a zrender instance
@@ -17838,11 +17857,13 @@ function getHighlightDigit(highlightKey) {
* @param {Object} opt Check `opt` of `setTextStyleCommon` to find other props.
* @param {string|Function} [opt.defaultText]
* @param {module:echarts/model/Model} [opt.labelFetcher] Fetch text by
- * `opt.labelFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex)`
- * @param {module:echarts/model/Model} [opt.labelDataIndex] Fetch text by
- * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex)`
- * @param {module:echarts/model/Model} [opt.labelDimIndex] Fetch text by
- * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex)`
+ * `opt.labelFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
+ * @param {number} [opt.labelDataIndex] Fetch text by
+ * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
+ * @param {number} [opt.labelDimIndex] Fetch text by
+ * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
+ * @param {string} [opt.labelProp] Fetch text by
+ * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
* @param {Object} [normalSpecified]
* @param {Object} [emphasisSpecified]
*/
@@ -17856,6 +17877,7 @@ function setLabelStyle(
var labelFetcher = opt.labelFetcher;
var labelDataIndex = opt.labelDataIndex;
var labelDimIndex = opt.labelDimIndex;
+ var labelProp = opt.labelProp;
// This scenario, `label.normal.show = true; label.emphasis.show = false`,
// is not supported util someone requests.
@@ -17869,7 +17891,7 @@ function setLabelStyle(
var baseText;
if (showNormal || showEmphasis) {
if (labelFetcher) {
- baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex);
+ baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex, labelProp);
}
if (baseText == null) {
baseText = isFunction$1(opt.defaultText) ? opt.defaultText(labelDataIndex, opt) : opt.defaultText;
@@ -17879,7 +17901,7 @@ function setLabelStyle(
var emphasisStyleText = showEmphasis
? retrieve2(
labelFetcher
- ? labelFetcher.getFormattedLabel(labelDataIndex, 'emphasis', null, labelDimIndex)
+ ? labelFetcher.getFormattedLabel(labelDataIndex, 'emphasis', null, labelDimIndex, labelProp)
: null,
baseText
)
@@ -19790,7 +19812,7 @@ var number = (Object.freeze || Object)({
// import Text from 'zrender/src/graphic/Text';
/**
- * 每三位默认加,格式化
+ * add commas after every three numbers
* @param {string|number} x
* @return {string}
*/
@@ -20043,6 +20065,22 @@ function getTextRect(
);
}
+/**
+ * open new tab
+ * @param {string} link url
+ * @param {string} target blank or self
+ */
+function windowOpen(link, target) {
+ if (target === '_blank' || target === 'blank') {
+ var blank = window.open();
+ blank.opener = null;
+ blank.location = link;
+ }
+ else {
+ window.open(link, target);
+ }
+}
+
var format = (Object.freeze || Object)({
addCommas: addCommas,
@@ -20056,7 +20094,8 @@ var format = (Object.freeze || Object)({
capitalFirst: capitalFirst,
truncateText: truncateText$1,
getTextBoundingRect: getTextBoundingRect,
- getTextRect: getTextRect
+ getTextRect: getTextRect,
+ windowOpen: windowOpen
});
/*
@@ -25060,7 +25099,7 @@ function dataTaskReset(context) {
function dataTaskProgress(param, context) {
// Avoid repead cloneShallow when data just created in reset.
- if (param.end > context.outputData.count()) {
+ if (context.outputData && param.end > context.outputData.count()) {
context.model.getRawData().cloneShallow(context.outputData);
}
}
@@ -25782,6 +25821,32 @@ var lang = {
lang: ['Right Click to Save Image']
}
},
+ series: {
+ typeNames: {
+ pie: 'Pie chart',
+ bar: 'Bar chart',
+ line: 'Line chart',
+ scatter: 'Scatter plot',
+ effectScatter: 'Ripple scatter plot',
+ radar: 'Radar chart',
+ tree: 'Tree',
+ treemap: 'Treemap',
+ boxplot: 'Boxplot',
+ candlestick: 'Candlestick',
+ k: 'K line chart',
+ heatmap: 'Heat map',
+ map: 'Map',
+ parallel: 'Parallel coordinate map',
+ lines: 'Line graph',
+ graph: 'Relationship graph',
+ sankey: 'Sankey diagram',
+ funnel: 'Funnel chart',
+ gauge: 'Guage',
+ pictorialBar: 'Pictorial bar',
+ themeRiver: 'Theme River Map',
+ sunburst: 'Sunburst'
+ }
+ },
aria: {
general: {
withTitle: 'This is a chart about "{title}"',
@@ -26014,11 +26079,16 @@ var loadingDefault = function (api, opts) {
opts = opts || {};
defaults(opts, {
text: 'loading',
- color: '#c23531',
textColor: '#000',
+ fontSize: '12px',
maskColor: 'rgba(255, 255, 255, 0.8)',
+ showSpinner: true,
+ color: '#c23531',
+ spinnerRadius: 10,
+ lineWidth: 5,
zlevel: 0
});
+ var group = new Group();
var mask = new Rect({
style: {
fill: opts.maskColor
@@ -26026,24 +26096,13 @@ var loadingDefault = function (api, opts) {
zlevel: opts.zlevel,
z: 10000
});
- var arc = new Arc({
- shape: {
- startAngle: -PI$1 / 2,
- endAngle: -PI$1 / 2 + 0.1,
- r: 10
- },
- style: {
- stroke: opts.color,
- lineCap: 'round',
- lineWidth: 5
- },
- zlevel: opts.zlevel,
- z: 10001
- });
+ group.add(mask);
+ var font = opts.fontSize + ' sans-serif';
var labelRect = new Rect({
style: {
fill: 'none',
text: opts.text,
+ font: font,
textPosition: 'right',
textDistance: 10,
textFill: opts.textColor
@@ -26051,32 +26110,49 @@ var loadingDefault = function (api, opts) {
zlevel: opts.zlevel,
z: 10001
});
-
- arc.animateShape(true)
- .when(1000, {
- endAngle: PI$1 * 3 / 2
- })
- .start('circularInOut');
- arc.animateShape(true)
- .when(1000, {
- startAngle: PI$1 * 3 / 2
- })
- .delay(300)
- .start('circularInOut');
-
- var group = new Group();
- group.add(arc);
group.add(labelRect);
- group.add(mask);
+ if (opts.showSpinner) {
+ var arc = new Arc({
+ shape: {
+ startAngle: -PI$1 / 2,
+ endAngle: -PI$1 / 2 + 0.1,
+ r: opts.spinnerRadius
+ },
+ style: {
+ stroke: opts.color,
+ lineCap: 'round',
+ lineWidth: opts.lineWidth
+ },
+ zlevel: opts.zlevel,
+ z: 10001
+ });
+ arc.animateShape(true)
+ .when(1000, {
+ endAngle: PI$1 * 3 / 2
+ })
+ .start('circularInOut');
+ arc.animateShape(true)
+ .when(1000, {
+ startAngle: PI$1 * 3 / 2
+ })
+ .delay(300)
+ .start('circularInOut');
+ group.add(arc);
+ }
// Inject resize
group.resize = function () {
- var cx = api.getWidth() / 2;
+ var textWidth = getWidth(opts.text, font);
+ var r = opts.showSpinner ? opts.spinnerRadius : 0;
+ // cx = (containerWidth - arcDiameter - textDistance - textWidth) / 2
+ // textDistance needs to be calculated when both animation and text exist
+ var cx = (api.getWidth() - r * 2 - (opts.showSpinner && textWidth ? 10 : 0) - textWidth) / 2
+ // only show the text
+ - (opts.showSpinner ? 0 : textWidth / 2);
var cy = api.getHeight() / 2;
- arc.setShape({
+ opts.showSpinner && arc.setShape({
cx: cx,
cy: cy
});
- var r = arc.shape.r;
labelRect.setShape({
x: cx - r,
y: cy - r,
@@ -27736,10 +27812,10 @@ var isFunction = isFunction$1;
var isObject = isObject$1;
var parseClassType = ComponentModel.parseClassType;
-var version = '4.7.0';
+var version = '4.8.0';
var dependencies = {
- zrender: '4.3.0'
+ zrender: '4.3.1'
};
var TEST_FRAME_REMAIN_TIME = 1;
@@ -28158,7 +28234,7 @@ echartsProto.getRenderedCanvas = function (opts) {
* Get svg data url
* @return {string}
*/
-echartsProto.getSvgDataUrl = function () {
+echartsProto.getSvgDataURL = function () {
if (!env$1.svgSupported) {
return;
}
@@ -28170,7 +28246,7 @@ echartsProto.getSvgDataUrl = function () {
el.stopAnimation(true);
});
- return zr.painter.pathToDataUrl();
+ return zr.painter.toDataURL();
};
/**
@@ -28206,7 +28282,7 @@ echartsProto.getDataURL = function (opts) {
});
var url = this._zr.painter.getType() === 'svg'
- ? this.getSvgDataUrl()
+ ? this.getSvgDataURL()
: this.getRenderedCanvas(opts).toDataURL(
'image/' + (opts && opts.type || 'png')
);
@@ -28235,6 +28311,7 @@ echartsProto.getConnectedDataURL = function (opts) {
if (!env$1.canvasSupported) {
return;
}
+ var isSvg = opts.type === 'svg';
var groupId = this.group;
var mathMin = Math.min;
var mathMax = Math.max;
@@ -28249,9 +28326,9 @@ echartsProto.getConnectedDataURL = function (opts) {
each$1(instances, function (chart, id) {
if (chart.group === groupId) {
- var canvas = chart.getRenderedCanvas(
- clone(opts)
- );
+ var canvas = isSvg
+ ? chart.getZr().painter.getSvgDom().innerHTML
+ : chart.getRenderedCanvas(clone(opts));
var boundingRect = chart.getDom().getBoundingClientRect();
left = mathMin(boundingRect.left, left);
top = mathMin(boundingRect.top, top);
@@ -28272,38 +28349,61 @@ echartsProto.getConnectedDataURL = function (opts) {
var width = right - left;
var height = bottom - top;
var targetCanvas = createCanvas();
- targetCanvas.width = width;
- targetCanvas.height = height;
- var zr = init$1(targetCanvas);
+ var zr = init$1(targetCanvas, {
+ renderer: isSvg ? 'svg' : 'canvas'
+ });
+ zr.resize({
+ width: width,
+ height: height
+ });
- // Background between the charts
- if (opts.connectedBackgroundColor) {
- zr.add(new Rect({
- shape: {
- x: 0,
- y: 0,
- width: width,
- height: height
- },
- style: {
- fill: opts.connectedBackgroundColor
- }
- }));
+ if (isSvg) {
+ var content = '';
+ each(canvasList, function (item) {
+ var x = item.left - left;
+ var y = item.top - top;
+ content += '<g transform="translate(' + x + ','
+ + y + ')">' + item.dom + '</g>';
+ });
+ zr.painter.getSvgRoot().innerHTML = content;
+
+ if (opts.connectedBackgroundColor) {
+ zr.painter.setBackgroundColor(opts.connectedBackgroundColor);
+ }
+
+ zr.refreshImmediately();
+ return zr.painter.toDataURL();
}
+ else {
+ // Background between the charts
+ if (opts.connectedBackgroundColor) {
+ zr.add(new Rect({
+ shape: {
+ x: 0,
+ y: 0,
+ width: width,
+ height: height
+ },
+ style: {
+ fill: opts.connectedBackgroundColor
+ }
+ }));
+ }
- each(canvasList, function (item) {
- var img = new ZImage({
- style: {
- x: item.left * dpr - left,
- y: item.top * dpr - top,
- image: item.dom
- }
+ each(canvasList, function (item) {
+ var img = new ZImage({
+ style: {
+ x: item.left * dpr - left,
+ y: item.top * dpr - top,
+ image: item.dom
+ }
+ });
+ zr.add(img);
});
- zr.add(img);
- });
- zr.refreshImmediately();
- return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png'));
+ zr.refreshImmediately();
+ return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png'));
+ }
}
else {
return this.getDataURL(opts);
@@ -34738,9 +34838,11 @@ var largeLayout = {
coord = cartesian.dataToPoint(valuePair, null, coord);
// Data index might not be in order, depends on `progressiveChunkMode`.
- largeBackgroundPoints[pointsOffset] = valueAxisHorizontal ? coordLayout.x + coordLayout.width : coord[0];
+ largeBackgroundPoints[pointsOffset] = valueAxisHorizontal
+ ? coordLayout.x + coordLayout.width : coord[0];
largePoints[pointsOffset++] = coord[0];
- largeBackgroundPoints[pointsOffset] = valueAxisHorizontal ? coord[1] : coordLayout.y + coordLayout.height;
+ largeBackgroundPoints[pointsOffset] = valueAxisHorizontal
+ ? coord[1] : coordLayout.y + coordLayout.height;
largePoints[pointsOffset++] = coord[1];
largeDataIndices[idxOffset++] = dataIndex;
}
@@ -35230,8 +35332,6 @@ function getScaleExtent(scale, model) {
var min = model.getMin();
var max = model.getMax();
- var fixMin = min != null;
- var fixMax = max != null;
var originalExtent = scale.getExtent();
var axisDataLen;
@@ -35275,17 +35375,6 @@ function getScaleExtent(scale, model) {
// (2) When `needCrossZero` and all data is positive/negative, should it be ensured
// that the results processed by boundaryGap are positive/negative?
- if (min == null) {
- min = scaleType === 'ordinal'
- ? (axisDataLen ? 0 : NaN)
- : originalExtent[0] - boundaryGap[0] * span;
- }
- if (max == null) {
- max = scaleType === 'ordinal'
- ? (axisDataLen ? axisDataLen - 1 : NaN)
- : originalExtent[1] + boundaryGap[1] * span;
- }
-
if (min === 'dataMin') {
min = originalExtent[0];
}
@@ -35306,6 +35395,20 @@ function getScaleExtent(scale, model) {
});
}
+ var fixMin = min != null;
+ var fixMax = max != null;
+
+ if (min == null) {
+ min = scaleType === 'ordinal'
+ ? (axisDataLen ? 0 : NaN)
+ : originalExtent[0] - boundaryGap[0] * span;
+ }
+ if (max == null) {
+ max = scaleType === 'ordinal'
+ ? (axisDataLen ? axisDataLen - 1 : NaN)
+ : originalExtent[1] + boundaryGap[1] * span;
+ }
+
(min == null || !isFinite(min)) && (min = NaN);
(max == null || !isFinite(max)) && (max = NaN);
@@ -35356,7 +35459,13 @@ function getScaleExtent(scale, model) {
}
}
- return [min, max];
+ return {
+ extent: [min, max],
+ // "fix" means "fixed", the value should not be
+ // changed in the subsequent steps.
+ fixMin: fixMin,
+ fixMax: fixMax
+ };
}
function adjustScaleForOverflow(min, max, model, barWidthAndOffset) {
@@ -35395,9 +35504,9 @@ function adjustScaleForOverflow(min, max, model, barWidthAndOffset) {
}
function niceScaleExtent(scale, model) {
- var extent = getScaleExtent(scale, model);
- var fixMin = model.getMin() != null;
- var fixMax = model.getMax() != null;
+ var extentInfo = getScaleExtent(scale, model);
+ var extent = extentInfo.extent;
+
var splitNumber = model.get('splitNumber');
if (scale.type === 'log') {
@@ -35408,8 +35517,8 @@ function niceScaleExtent(scale, model) {
scale.setExtent(extent[0], extent[1]);
scale.niceExtent({
splitNumber: splitNumber,
- fixMin: fixMin,
- fixMax: fixMax,
+ fixMin: extentInfo.fixMin,
+ fixMax: extentInfo.fixMax,
minInterval: (scaleType === 'interval' || scaleType === 'time')
? model.get('minInterval') : null,
maxInterval: (scaleType === 'interval' || scaleType === 'time')
@@ -36442,9 +36551,10 @@ function decodePolygon(coordinate, encodeOffsets, encodeScale) {
/**
* @alias module:echarts/coord/geo/parseGeoJson
* @param {Object} geoJson
+ * @param {string} nameProperty
* @return {module:zrender/container/Group}
*/
-var parseGeoJson$1 = function (geoJson) {
+var parseGeoJson$1 = function (geoJson, nameProperty) {
decode(geoJson);
@@ -36482,7 +36592,7 @@ var parseGeoJson$1 = function (geoJson) {
}
var region = new Region(
- properties.name,
+ properties[nameProperty || 'name'],
geometries,
properties.cp
);
@@ -37679,7 +37789,6 @@ symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {
var itemStyle = seriesScope && seriesScope.itemStyle;
var hoverItemStyle = seriesScope && seriesScope.hoverItemStyle;
- var symbolRotate = seriesScope && seriesScope.symbolRotate;
var symbolOffset = seriesScope && seriesScope.symbolOffset;
var labelModel = seriesScope && seriesScope.labelModel;
var hoverLabelModel = seriesScope && seriesScope.hoverLabelModel;
@@ -37695,7 +37804,6 @@ symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {
itemStyle = itemModel.getModel(normalStyleAccessPath).getItemStyle(['color']);
hoverItemStyle = itemModel.getModel(emphasisStyleAccessPath).getItemStyle();
- symbolRotate = itemModel.getShallow('symbolRotate');
symbolOffset = itemModel.getShallow('symbolOffset');
labelModel = itemModel.getModel(normalLabelAccessPath);
@@ -37709,6 +37817,8 @@ symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {
var elStyle = symbolPath.style;
+ var symbolRotate = data.getItemVisual(idx, 'symbolRotate');
+
symbolPath.attr('rotation', (symbolRotate || 0) * Math.PI / 180 || 0);
if (symbolOffset) {
@@ -38764,6 +38874,10 @@ function createGridClipPath(cartesian, hasAnimation, seriesModel) {
width += lineWidth;
height += lineWidth;
+ // fix: https://github.com/apache/incubator-echarts/issues/11369
+ x = Math.floor(x);
+ width = Math.round(width);
+
var clipPath = new Rect({
shape: {
x: x,
@@ -38861,6 +38975,26 @@ function isPointsSame(points1, points2) {
return true;
}
+function getBoundingDiff(points1, points2) {
+ var min1 = [];
+ var max1 = [];
+
+ var min2 = [];
+ var max2 = [];
+
+ fromPoints(points1, min1, max1);
+ fromPoints(points2, min2, max2);
+
+ // Get a max value from each corner of two boundings.
+ return Math.max(
+ Math.abs(min1[0] - min2[0]),
+ Math.abs(min1[1] - min2[1]),
+
+ Math.abs(max1[0] - max2[0]),
+ Math.abs(max1[1] - max2[1])
+ );
+}
+
function getSmooth(smooth) {
return typeof (smooth) === 'number' ? smooth : (smooth ? 0.5 : 0);
}
@@ -39473,6 +39607,24 @@ Chart.extend({
next = turnPointsIntoStep(diff.next, coordSys, step);
stackedOnNext = turnPointsIntoStep(diff.stackedOnNext, coordSys, step);
}
+ // Don't apply animation if diff is large.
+ // For better result and avoid memory explosion problems like
+ // https://github.com/apache/incubator-echarts/issues/12229
+ if (getBoundingDiff(current, next) > 3000
+ || (polygon && getBoundingDiff(stackedOnCurrent, stackedOnNext) > 3000)
+ ) {
+ polyline.setShape({
+ points: next
+ });
+ if (polygon) {
+ polygon.setShape({
+ points: next,
+ stackedOnPoints: stackedOnNext
+ });
+ }
+ return;
+ }
+
// `diff.current` is subset of `current` (which should be ensured by
// turnPointsIntoStep), so points in `__points` can be updated when
// points in `current` are update during animation.
@@ -39579,13 +39731,14 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
var symbolType = seriesModel.get('symbol');
var symbolSize = seriesModel.get('symbolSize');
var keepAspect = seriesModel.get('symbolKeepAspect');
+ var symbolRotate = seriesModel.get('symbolRotate');
var hasSymbolTypeCallback = isFunction$1(symbolType);
var hasSymbolSizeCallback = isFunction$1(symbolSize);
- var hasCallback = hasSymbolTypeCallback || hasSymbolSizeCallback;
+ var hasSymbolRotateCallback = isFunction$1(symbolRotate);
+ var hasCallback = hasSymbolTypeCallback || hasSymbolSizeCallback || hasSymbolRotateCallback;
var seriesSymbol = (!hasSymbolTypeCallback && symbolType) ? symbolType : defaultSymbolType;
var seriesSymbolSize = !hasSymbolSizeCallback ? symbolSize : null;
-
data.setVisual({
legendSymbol: legendSymbol || seriesSymbol,
// If seting callback functions on `symbol` or `symbolSize`, for simplicity and avoiding
@@ -39594,7 +39747,8 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
// some cases but generally it is not recommanded.
symbol: seriesSymbol,
symbolSize: seriesSymbolSize,
- symbolKeepAspect: keepAspect
+ symbolKeepAspect: keepAspect,
+ symbolRotate: symbolRotate
});
// Only visible series has each data be visual encoded
@@ -39608,12 +39762,14 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
var params = seriesModel.getDataParams(idx);
hasSymbolTypeCallback && data.setItemVisual(idx, 'symbol', symbolType(rawValue, params));
hasSymbolSizeCallback && data.setItemVisual(idx, 'symbolSize', symbolSize(rawValue, params));
+ hasSymbolRotateCallback && data.setItemVisual(idx, 'symbolRotate', symbolRotate(rawValue, params));
}
if (data.hasItemOption) {
var itemModel = data.getItemModel(idx);
var itemSymbolType = itemModel.getShallow('symbol', true);
var itemSymbolSize = itemModel.getShallow('symbolSize', true);
+ var itemSymbolRotate = itemModel.getShallow('symbolRotate', true);
var itemSymbolKeepAspect = itemModel.getShallow('symbolKeepAspect', true);
// If has item symbol
@@ -39624,6 +39780,9 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
// PENDING Transform symbolSize ?
data.setItemVisual(idx, 'symbolSize', itemSymbolSize);
}
+ if (itemSymbolRotate != null) {
+ data.setItemVisual(idx, 'symbolRotate', itemSymbolRotate);
+ }
if (itemSymbolKeepAspect != null) {
data.setItemVisual(idx, 'symbolKeepAspect', itemSymbolKeepAspect);
}
@@ -43499,6 +43658,7 @@ extendChartView({
var drawBackground = seriesModel.get('showBackground', true);
var backgroundModel = seriesModel.getModel('backgroundStyle');
+ var barBorderRadius = backgroundModel.get('barBorderRadius') || 0;
var bgEls = [];
var oldBgEls = this._backgroundEls || [];
@@ -43509,8 +43669,13 @@ extendChartView({
var layout = getLayout[coord.type](data, dataIndex, itemModel);
if (drawBackground) {
- var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, layout);
+ var bgLayout = getLayout[coord.type](data, dataIndex);
+ var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, bgLayout);
bgEl.useStyle(backgroundModel.getBarItemStyle());
+ // Only cartesian2d support borderRadius.
+ if (coord.type === 'cartesian2d') {
+ bgEl.setShape('r', barBorderRadius);
+ }
bgEls[dataIndex] = bgEl;
}
@@ -43547,9 +43712,14 @@ extendChartView({
if (drawBackground) {
var bgEl = oldBgEls[oldIndex];
bgEl.useStyle(backgroundModel.getBarItemStyle());
+ // Only cartesian2d support borderRadius.
+ if (coord.type === 'cartesian2d') {
+ bgEl.setShape('r', barBorderRadius);
+ }
bgEls[newIndex] = bgEl;
- var shape = createBackgroundShape(isHorizontalOrRadial, layout, coord);
+ var bgLayout = getLayout[coord.type](data, newIndex);
+ var shape = createBackgroundShape(isHorizontalOrRadial, bgLayout, coord);
updateProps(bgEl, { shape: shape }, animationModel, newIndex);
}
@@ -43799,9 +43969,11 @@ function removeSector(dataIndex, animationModel, el) {
}
var getLayout = {
+ // itemModel is only used to get borderWidth, which is not needed
+ // when calculating bar background layout.
cartesian2d: function (data, dataIndex, itemModel) {
var layout = data.getItemLayout(dataIndex);
- var fixedLineWidth = getLineWidth(itemModel, layout);
+ var fixedLineWidth = itemModel ? getLineWidth(itemModel, layout) : 0;
// fix layout with lineWidth
var signX = layout.width > 0 ? 1 : -1;
@@ -44675,31 +44847,36 @@ piePieceProto.updateData = function (data, idx, firstCreate) {
var withAnimation = !firstCreate && animationTypeUpdate === 'transition';
this._updateLabel(data, idx, withAnimation);
- this.highDownOnUpdate = (itemModel.get('hoverAnimation') && seriesModel.isAnimationEnabled())
+ this.highDownOnUpdate = !seriesModel.get('silent')
? function (fromState, toState) {
+ var hasAnimation = seriesModel.isAnimationEnabled() && itemModel.get('hoverAnimation');
if (toState === 'emphasis') {
labelLine.ignore = labelLine.hoverIgnore;
labelText.ignore = labelText.hoverIgnore;
// Sector may has animation of updating data. Force to move to the last frame
// Or it may stopped on the wrong shape
- sector.stopAnimation(true);
- sector.animateTo({
- shape: {
- r: layout.r + seriesModel.get('hoverOffset')
- }
- }, 300, 'elasticOut');
+ if (hasAnimation) {
+ sector.stopAnimation(true);
+ sector.animateTo({
+ shape: {
+ r: layout.r + seriesModel.get('hoverOffset')
+ }
+ }, 300, 'elasticOut');
+ }
}
else {
labelLine.ignore = labelLine.normalIgnore;
labelText.ignore = labelText.normalIgnore;
- sector.stopAnimation(true);
- sector.animateTo({
- shape: {
- r: layout.r
- }
- }, 300, 'elasticOut');
+ if (hasAnimation) {
+ sector.stopAnimation(true);
+ sector.animateTo({
+ shape: {
+ r: layout.r
+ }
+ }, 300, 'elasticOut');
+ }
}
}
: null;
@@ -46452,7 +46629,7 @@ Radar.prototype.update = function (ecModel, api) {
}
// Force all the axis fixing the maxSplitNumber.
each$1(indicatorAxes, function (indicatorAxis, idx) {
- var rawExtent = getScaleExtent(indicatorAxis.scale, indicatorAxis.model);
+ var rawExtent = getScaleExtent(indicatorAxis.scale, indicatorAxis.model).extent;
niceScaleExtent(indicatorAxis.scale, indicatorAxis.model);
var axisModel = indicatorAxis.model;
@@ -47572,9 +47749,10 @@ var geoJSONLoader = {
/**
* @param {string} mapName
* @param {Object} mapRecord {specialAreas, geoJSON}
+ * @param {string} nameProperty
* @return {Object} {regions, boundingRect}
*/
- load: function (mapName, mapRecord) {
+ load: function (mapName, mapRecord, nameProperty) {
var parsed = inner$7(mapRecord).parsed;
@@ -47588,7 +47766,7 @@ var geoJSONLoader = {
// https://jsperf.com/try-catch-performance-overhead
try {
- regions = geoJSON ? parseGeoJson$1(geoJSON) : [];
+ regions = geoJSON ? parseGeoJson$1(geoJSON, nameProperty) : [];
}
catch (e) {
throw new Error('Invalid geoJson format\n' + e.message);
@@ -47796,9 +47974,10 @@ var geoSourceManager = {
/**
* @param {string} mapName
* @param {Object} nameMap
+ * @param {string} nameProperty
* @return {Object} source {regions, regionsMap, nameCoordMap, boundingRect}
*/
- load: function (mapName, nameMap) {
+ load: function (mapName, nameMap, nameProperty) {
var regions = [];
var regionsMap = createHashMap();
var nameCoordMap = createHashMap();
@@ -47806,7 +47985,7 @@ var geoSourceManager = {
var mapRecords = retrieveMap(mapName);
each$1(mapRecords, function (record) {
- var singleSource = loaders[record.type].load(mapName, record);
+ var singleSource = loaders[record.type].load(mapName, record, nameProperty);
each$1(singleSource.regions, function (region) {
var regionName = region.name;
@@ -47945,7 +48124,7 @@ var MapSeries = SeriesModel.extend({
});
}
- var geoSource = geoSourceManager.load(this.getMapType(), this.option.nameMap);
+ var geoSource = geoSourceManager.load(this.getMapType(), this.option.nameMap, this.option.nameProperty);
each$1(geoSource.regions, function (region) {
var name = region.name;
if (!dataNameMap.get(name)) {
@@ -48135,7 +48314,8 @@ var MapSeries = SeriesModel.extend({
itemStyle: {
areaColor: 'rgba(255,215,0,0.8)'
}
- }
+ },
+ nameProperty: 'name'
}
});
@@ -48745,9 +48925,25 @@ MapDraw.prototype = {
var group = this.group;
var transformInfo = geo.getTransformInfo();
- group.transform = transformInfo.roamTransform;
- group.decomposeTransform();
- group.dirty();
+ // No animation when first draw or in action
+ var isFirstDraw = !regionsGroup.childAt(0) || payload;
+ var targetScale;
+ if (isFirstDraw) {
+ group.transform = transformInfo.roamTransform;
+ group.decomposeTransform();
+ group.dirty();
+ }
+ else {
+ var target = new Transformable();
+ target.transform = transformInfo.roamTransform;
+ target.decomposeTransform();
+ var props = {
+ scale: target.scale,
+ position: target.position
+ };
+ targetScale = target.scale;
+ updateProps(group, props, mapOrGeoModel);
+ }
var scale = transformInfo.rawScale;
var position = transformInfo.rawPosition;
@@ -48889,6 +49085,12 @@ MapDraw.prototype = {
}
);
+ if (!isFirstDraw) {
+ // Text animation
+ var textScale = [1 / targetScale[0], 1 / targetScale[1]];
+ updateProps(textEl, { scale: textScale }, mapOrGeoModel);
+ }
+
regionGroup.add(textEl);
}
@@ -50796,11 +50998,14 @@ TreeNode.prototype = {
var hostTree = this.hostTree;
var itemModel = hostTree.data.getItemModel(this.dataIndex);
var levelModel = this.getLevelModel();
- var leavesModel;
- if (!levelModel && (this.children.length === 0 || (this.children.length !== 0 && this.isExpand === false))) {
- leavesModel = this.getLeavesModel();
+
+ // FIXME: refactor levelModel to "beforeLink", and remove levelModel here.
+ if (levelModel) {
+ return itemModel.getModel(path, levelModel.getModel(path));
+ }
+ else {
+ return itemModel.getModel(path);
}
- return itemModel.getModel(path, (levelModel || leavesModel || hostTree.hostModel).getModel(path));
},
/**
@@ -50811,13 +51016,6 @@ TreeNode.prototype = {
},
/**
- * @return {module:echarts/model/Model}
- */
- getLeavesModel: function () {
- return this.hostTree.leavesModel;
- },
-
- /**
* @example
* setItemVisual('color', color);
* setItemVisual({
@@ -50887,9 +51085,8 @@ TreeNode.prototype = {
* @alias module:echarts/data/Tree
* @param {module:echarts/model/Model} hostModel
* @param {Array.<Object>} levelOptions
- * @param {Object} leavesOption
*/
-function Tree(hostModel, levelOptions, leavesOption) {
+function Tree(hostModel, levelOptions) {
/**
* @type {module:echarts/data/Tree~TreeNode}
* @readOnly
@@ -50925,7 +51122,6 @@ function Tree(hostModel, levelOptions, leavesOption) {
return new Model(levelDefine, hostModel, hostModel.ecModel);
});
- this.leavesModel = new Model(leavesOption || {}, hostModel, hostModel.ecModel);
}
Tree.prototype = {
@@ -51017,12 +51213,11 @@ Tree.prototype = {
* @param {module:echarts/model/Model} hostModel
* @param {Object} treeOptions
* @param {Array.<Object>} treeOptions.levels
- * @param {Array.<Object>} treeOptions.leaves
* @return module:echarts/data/Tree
*/
Tree.createTree = function (dataRoot, hostModel, treeOptions, beforeLink) {
- var tree = new Tree(hostModel, treeOptions.levels, treeOptions.leaves);
+ var tree = new Tree(hostModel, treeOptions && treeOptions.levels);
var listData = [];
var dimMax = 1;
@@ -51059,6 +51254,8 @@ Tree.createTree = function (dataRoot, hostModel, treeOptions, beforeLink) {
var list = new List(dimensionsInfo, hostModel);
list.initData(listData);
+ beforeLink && beforeLink(list);
+
linkList({
mainData: list,
struct: tree,
@@ -51067,8 +51264,6 @@ Tree.createTree = function (dataRoot, hostModel, treeOptions, beforeLink) {
tree.update();
- beforeLink && beforeLink(list);
-
return tree;
};
@@ -51128,17 +51323,13 @@ SeriesModel.extend({
var root = {name: option.name, children: option.data};
var leaves = option.leaves || {};
+ var leavesModel = new Model(leaves, this, this.ecModel);
- var treeOption = {};
-
- treeOption.leaves = leaves;
-
- var tree = Tree.createTree(root, this, treeOption, beforeLink);
+ var tree = Tree.createTree(root, this, {}, beforeLink);
function beforeLink(nodeData) {
nodeData.wrapMethod('getItemModel', function (model, idx) {
var node = tree.getNodeByDataIndex(idx);
- var leavesModel = node.getLeavesModel();
if (!node.children.length || !node.isExpand) {
model.parentModel = leavesModel;
}
@@ -52753,15 +52944,25 @@ SeriesModel.extend({
var levels = option.levels || [];
levels = option.levels = setDefault(levels, ecModel);
-
- var treeOption = {};
-
- treeOption.levels = levels;
+ var levelModels = map(levels || [], function (levelDefine) {
+ return new Model(levelDefine, this, ecModel);
+ }, this);
// Make sure always a new tree is created when setOption,
// in TreemapView, we check whether oldTree === newTree
// to choose mappings approach among old shapes and new shapes.
- return Tree.createTree(root, this, treeOption).data;
+ var tree = Tree.createTree(root, this, null, beforeLink);
+
+ function beforeLink(nodeData) {
+ nodeData.wrapMethod('getItemModel', function (model, idx) {
+ var node = tree.getNodeByDataIndex(idx);
+ var levelModel = levelModels[node.depth];
+ levelModel && (model.parentModel = levelModel);
+ return model;
+ });
+ }
+
+ return tree.data;
},
optionUpdated: function () {
@@ -53772,7 +53973,7 @@ extendChartView({
var itemModel = node.hostTree.data.getItemModel(node.dataIndex);
var link = itemModel.get('link', true);
var linkTarget = itemModel.get('target', true) || 'blank';
- link && window.open(link, linkTarget);
+ link && windowOpen(link, linkTarget);
}
}
@@ -53962,7 +54163,7 @@ function renderNode(
// Background
var bg = giveGraphic('background', Rect$1, depth, Z_BG);
- bg && renderBackground(group, bg, isParent && thisLayout.upperHeight);
+ bg && renderBackground(group, bg, isParent && thisLayout.upperLabelHeight);
// No children, render content.
if (isParent) {
@@ -54083,16 +54284,7 @@ function renderNode(
}
function prepareText(normalStyle, emphasisStyle, visualColor, width, height, upperLabelRect) {
- var text = retrieve(
- seriesModel.getFormattedLabel(
- thisNode.dataIndex, 'normal', null, null, upperLabelRect ? 'upperLabel' : 'label'
- ),
- nodeModel.get('name')
- );
- if (!upperLabelRect && thisLayout.isLeafRoot) {
- var iconChar = seriesModel.get('drillDownIcon', true);
- text = iconChar ? iconChar + ' ' + text : text;
- }
+ var defaultText = nodeModel.get('name');
var normalLabelModel = nodeModel.getModel(
upperLabelRect ? PATH_UPPERLABEL_NORMAL : PATH_LABEL_NOAMAL
@@ -54106,12 +54298,18 @@ function renderNode(
setLabelStyle(
normalStyle, emphasisStyle, normalLabelModel, emphasisLabelModel,
{
- defaultText: isShow ? text : null,
+ defaultText: isShow ? defaultText : null,
autoColor: visualColor,
- isRectText: true
+ isRectText: true,
+ labelFetcher: seriesModel,
+ labelDataIndex: thisNode.dataIndex,
+ labelProp: upperLabelRect ? 'upperLabel' : 'label'
}
);
+ addDrillDownIcon(normalStyle, upperLabelRect, thisLayout);
+ addDrillDownIcon(emphasisStyle, upperLabelRect, thisLayout);
+
upperLabelRect && (normalStyle.textRect = clone(upperLabelRect));
normalStyle.truncate = (isShow && normalLabelModel.get('ellipsis'))
@@ -54123,6 +54321,14 @@ function renderNode(
: null;
}
+ function addDrillDownIcon(style, upperLabelRect, thisLayout) {
+ var text = style.text;
+ if (!upperLabelRect && thisLayout.isLeafRoot && text != null) {
+ var iconChar = seriesModel.get('drillDownIcon', true);
+ style.text = iconChar ? iconChar + ' ' + text : text;
+ }
+ }
+
function giveGraphic(storageName, Ctor, depth, z) {
var element = oldRawIndex != null && oldStorage[storageName][oldRawIndex];
var lasts = lastsForAnimation[storageName];
@@ -57293,9 +57499,13 @@ lineDrawProto.incrementalPrepareUpdate = function (lineData) {
this.group.removeAll();
};
+function isEffectObject(el) {
+ return el.animators && el.animators.length > 0;
+}
+
lineDrawProto.incrementalUpdate = function (taskParams, lineData) {
function updateIncrementalAndHover(el) {
- if (!el.isGroup) {
+ if (!el.isGroup && !isEffectObject(el)) {
el.incremental = el.useHoverLayer = true;
}
}
@@ -64345,7 +64555,13 @@ function relaxRightToLeft(nodesByBreadth, alpha, orient) {
each$1(nodes, function (node) {
if (node.outEdges.length) {
var y = sum(node.outEdges, weightedTarget, orient)
- / sum(node.outEdges, getEdgeValue, orient);
+ / sum(node.outEdges, getEdgeValue, orient);
+
+ if (isNaN(y)) {
+ var len = node.outEdges.length;
+ y = len ? sum(node.outEdges, centerTarget, orient) / len : 0;
+ }
+
if (orient === 'vertical') {
var nodeX = node.getLayout().x + (y - center$1(node, orient)) * alpha;
node.setLayout({x: nodeX}, true);
@@ -64362,10 +64578,16 @@ function relaxRightToLeft(nodesByBreadth, alpha, orient) {
function weightedTarget(edge, orient) {
return center$1(edge.node2, orient) * edge.getValue();
}
+function centerTarget(edge, orient) {
+ return center$1(edge.node2, orient);
+}
function weightedSource(edge, orient) {
return center$1(edge.node1, orient) * edge.getValue();
}
+function centerSource(edge, orient) {
+ return center$1(edge.node1, orient);
+}
function center$1(node, orient) {
return orient === 'vertical'
@@ -64401,8 +64623,15 @@ function relaxLeftToRight(nodesByBreadth, alpha, orient) {
each$1(nodesByBreadth, function (nodes) {
each$1(nodes, function (node) {
if (node.inEdges.length) {
+
var y = sum(node.inEdges, weightedSource, orient)
- / sum(node.inEdges, getEdgeValue, orient);
+ / sum(node.inEdges, getEdgeValue, orient);
+
+ if (isNaN(y)) {
+ var len = node.inEdges.length;
+ y = len ? sum(node.inEdges, centerSource, orient) / len : 0;
+ }
+
if (orient === 'vertical') {
var nodeX = node.getLayout().x + (y - center$1(node, orient)) * alpha;
node.setLayout({x: nodeX}, true);
@@ -66242,7 +66471,8 @@ effectSymbolProto.updateData = function (data, idx) {
pos[0] = parsePercent$1(symbolOffset[0], symbolSize[0]);
pos[1] = parsePercent$1(symbolOffset[1], symbolSize[1]);
}
- rippleGroup.rotation = (itemModel.getShallow('symbolRotate') || 0) * Math.PI / 180 || 0;
+ var symbolRotate = data.getItemVisual(idx, 'symbolRotate');
+ rippleGroup.rotation = (symbolRotate || 0) * Math.PI / 180 || 0;
var effectCfg = {};
@@ -68160,8 +68390,8 @@ extendChartView({
rect = new Rect({
shape: {
- x: Math.floor(point[0] - width / 2),
- y: Math.floor(point[1] - height / 2),
+ x: Math.floor(Math.round(point[0]) - width / 2),
+ y: Math.floor(Math.round(point[1]) - height / 2),
width: Math.ceil(width),
height: Math.ceil(height)
},
@@ -72638,8 +72868,7 @@ SeriesModel.extend({
align: 'center',
position: 'inside',
distance: 5,
- silent: true,
- emphasis: {}
+ silent: true
},
itemStyle: {
borderWidth: 1,
@@ -72649,13 +72878,19 @@ SeriesModel.extend({
shadowColor: 'rgba(0, 0, 0, 0.2)',
shadowOffsetX: 0,
shadowOffsetY: 0,
- opacity: 1,
- emphasis: {},
- highlight: {
+ opacity: 1
+ },
+ highlight: {
+ itemStyle: {
opacity: 1
+ }
+ },
+ downplay: {
+ itemStyle: {
+ opacity: 0.5
},
- downplay: {
- opacity: 0.9
+ label: {
+ opacity: 0.6
}
},
@@ -72901,6 +73136,8 @@ SunburstPieceProto.updateData = function (
this._seriesModel = seriesModel || this._seriesModel;
this._ecModel = ecModel || this._ecModel;
+
+ setHoverStyle(this);
};
SunburstPieceProto.onEmphasis = function (highlightPolicy) {
@@ -73364,7 +73601,7 @@ var SunburstView = Chart.extend({
if (link) {
var linkTarget = itemModel.get('target', true)
|| '_blank';
- window.open(link, linkTarget);
+ windowOpen(link, linkTarget);
}
}
targetFound = true;
@@ -77288,7 +77525,10 @@ Calendar.prototype = {
var allDay = Math.floor(range[1].time / PROXIMATE_ONE_DAY)
- Math.floor(range[0].time / PROXIMATE_ONE_DAY) + 1;
- // Consider case:
+ // Consider case1 (#11677 #10430):
+ // Set the system timezone as "UK", set the range to `['2016-07-01', '2016-12-31']`
+
+ // Consider case2:
// Firstly set system timezone as "Time Zone: America/Toronto",
// ```
// var first = new Date(1478412000000 - 3600 * 1000 * 2.5);
@@ -77301,11 +77541,15 @@ Calendar.prototype = {
var endDateNum = range[1].date.getDate();
date.setDate(startDateNum + allDay - 1);
// The bias can not over a month, so just compare date.
- if (date.getDate() !== endDateNum) {
+ var dateNum = date.getDate();
+ if (dateNum !== endDateNum) {
var sign = date.getTime() - range[1].time > 0 ? 1 : -1;
- while (date.getDate() !== endDateNum && (date.getTime() - range[1].time) * sign > 0) {
+ while (
+ (dateNum = date.getDate()) !== endDateNum
+ && (date.getTime() - range[1].time) * sign > 0
+ ) {
allDay -= sign;
- date.setDate(startDateNum + allDay - 1);
+ date.setDate(dateNum - sign);
}
}
@@ -78892,7 +79136,7 @@ extendComponentView({
var feature;
// FIX#11236, merge feature title from MagicType newOption. TODO: consider seriesIndex ?
- if (payload && payload.newTitle != null) {
+ if (payload && payload.newTitle != null && payload.featureName === featureName) {
featureOpt.title = payload.newTitle;
}
@@ -79165,7 +79409,8 @@ var proto$2 = SaveAsImage.prototype;
proto$2.onclick = function (ecModel, api) {
var model = this.model;
var title = model.get('name') || ecModel.get('title.0.text') || 'echarts';
- var type = model.get('type', true) || 'png';
+ var isSvg = api.getZr().painter.getType() === 'svg';
+ var type = isSvg ? 'svg' : model.get('type', true) || 'png';
var url = api.getConnectedDataURL({
type: type,
backgroundColor: model.get('backgroundColor', true)
@@ -79392,7 +79637,8 @@ proto$3.onclick = function (ecModel, api, type) {
type: 'changeMagicType',
currentType: type,
newOption: newOption,
- newTitle: newTitle
+ newTitle: newTitle,
+ featureName: 'magicType'
});
};
@@ -83576,7 +83822,7 @@ extendComponentView({
var dataModel = el.dataModel || seriesModel;
var dataIndex = el.dataIndex;
var dataType = el.dataType;
- var data = dataModel.getData();
+ var data = dataModel.getData(dataType);
var tooltipModel = buildTooltipModel([
data.getItemModel(dataIndex),
@@ -85374,12 +85620,12 @@ extendComponentView({
if (link) {
textEl.on('click', function () {
- window.open(link, '_' + titleModel.get('target'));
+ windowOpen(link, '_' + titleModel.get('target'));
});
}
if (sublink) {
subTextEl.on('click', function () {
- window.open(sublink, '_' + titleModel.get('subtarget'));
+ windowOpen(link, '_' + titleModel.get('subtarget'));
});
}
@@ -94144,25 +94390,21 @@ var resetMethods = {
thisOption.precision = precision;
splitStep = +splitStep.toFixed(precision);
- var index = 0;
-
if (thisOption.minOpen) {
pieceList.push({
- index: index++,
interval: [-Infinity, dataExtent[0]],
close: [0, 0]
});
}
for (
- var curr = dataExtent[0], len = index + splitNumber;
- index < len;
- curr += splitStep
+ var index = 0, curr = dataExtent[0];
+ index < splitNumber;
+ curr += splitStep, index++
) {
var max = index === splitNumber - 1 ? dataExtent[1] : (curr + splitStep);
pieceList.push({
- index: index++,
interval: [curr, max],
close: [1, 1]
});
@@ -94170,7 +94412,6 @@ var resetMethods = {
if (thisOption.maxOpen) {
pieceList.push({
- index: index++,
interval: [dataExtent[1], Infinity],
close: [0, 0]
});
@@ -94178,7 +94419,8 @@ var resetMethods = {
reformIntervals(pieceList);
- each$1(pieceList, function (piece) {
+ each$1(pieceList, function (piece, index) {
+ piece.index = index;
piece.text = this.formatValueText(piece.interval);
}, this);
},
@@ -97487,11 +97729,16 @@ var SVGPainter = function (root, storage, opts, zrId) {
this.storage = storage;
this._opts = opts = extend({}, opts || {});
- var svgRoot = createElement('svg');
- svgRoot.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
- svgRoot.setAttribute('version', '1.1');
- svgRoot.setAttribute('baseProfile', 'full');
- svgRoot.style.cssText = 'user-select:none;position:absolute;left:0;top:0;';
+ var svgDom = createElement('svg');
+ svgDom.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
+ svgDom.setAttribute('version', '1.1');
+ svgDom.setAttribute('baseProfile', 'full');
+ svgDom.style.cssText = 'user-select:none;position:absolute;left:0;top:0;';
+
+ var bgRoot = createElement('g');
+ svgDom.appendChild(bgRoot);
+ var svgRoot = createElement('g');
+ svgDom.appendChild(svgRoot);
this.gradientManager = new GradientManager(zrId, svgRoot);
this.clipPathManager = new ClippathManager(zrId, svgRoot);
@@ -97500,11 +97747,13 @@ var SVGPainter = function (root, storage, opts, zrId) {
var viewport = document.createElement('div');
viewport.style.cssText = 'overflow:hidden;position:relative';
+ this._svgDom = svgDom;
this._svgRoot = svgRoot;
+ this._backgroundRoot = bgRoot;
this._viewport = viewport;
root.appendChild(viewport);
- viewport.appendChild(svgRoot);
+ viewport.appendChild(svgDom);
this.resize(opts.width, opts.height);
@@ -97523,6 +97772,14 @@ SVGPainter.prototype = {
return this._viewport;
},
+ getSvgDom: function () {
+ return this._svgDom;
+ },
+
+ getSvgRoot: function () {
+ return this._svgRoot;
+ },
+
getViewportRootOffset: function () {
var viewportRoot = this.getViewportRoot();
if (viewportRoot) {
@@ -97542,7 +97799,21 @@ SVGPainter.prototype = {
setBackgroundColor: function (backgroundColor) {
// TODO gradient
- this._viewport.style.background = backgroundColor;
+ // Insert a bg rect instead of setting background to viewport.
+ // Otherwise, the exported SVG don't have background.
+ if (this._backgroundRoot && this._backgroundNode) {
+ this._backgroundRoot.removeChild(this._backgroundNode);
+ }
+
+ var bgNode = createElement('rect');
+ bgNode.setAttribute('width', this.getWidth());
+ bgNode.setAttribute('height', this.getHeight());
+ bgNode.setAttribute('x', 0);
+ bgNode.setAttribute('y', 0);
+ bgNode.setAttribute('id', 0);
+ bgNode.style.fill = backgroundColor;
+ this._backgroundRoot.appendChild(bgNode);
+ this._backgroundNode = bgNode;
},
_paintList: function (list) {
@@ -97672,8 +97943,8 @@ SVGPainter.prototype = {
},
_getDefs: function (isForceCreating) {
- var svgRoot = this._svgRoot;
- var defs = this._svgRoot.getElementsByTagName('defs');
+ var svgRoot = this._svgDom;
+ var defs = svgRoot.getElementsByTagName('defs');
if (defs.length === 0) {
// Not exist
if (isForceCreating) {
@@ -97730,11 +98001,16 @@ SVGPainter.prototype = {
viewportStyle.width = width + 'px';
viewportStyle.height = height + 'px';
- var svgRoot = this._svgRoot;
+ var svgRoot = this._svgDom;
// Set width by 'svgRoot.width = width' is invalid
svgRoot.setAttribute('width', width);
svgRoot.setAttribute('height', height);
}
+
+ if (this._backgroundNode) {
+ this._backgroundNode.setAttribute('width', width);
+ this._backgroundNode.setAttribute('height', height);
+ }
},
/**
@@ -97776,10 +98052,13 @@ SVGPainter.prototype = {
dispose: function () {
this.root.innerHTML = '';
- this._svgRoot =
- this._viewport =
- this.storage =
- null;
+ this._svgRoot
+ = this._backgroundRoot
+ = this._svgDom
+ = this._backgroundNode
+ = this._viewport
+ = this.storage
+ = null;
},
clear: function () {
@@ -97788,9 +98067,9 @@ SVGPainter.prototype = {
}
},
- pathToDataUrl: function () {
+ toDataURL: function () {
this.refresh();
- var html = this._svgRoot.outerHTML;
+ var html = encodeURIComponent(this._svgDom.outerHTML.replace(/></g, '>\n\r<'));
return 'data:image/svg+xml;charset=UTF-8,' + html;
}
};
@@ -97806,7 +98085,7 @@ function createMethodNotSupport$1(method) {
each$1([
'getLayer', 'insertLayer', 'eachLayer', 'eachBuiltinLayer',
'eachOtherLayer', 'getLayers', 'modLayer', 'delLayer', 'clearLayer',
- 'toDataURL', 'pathToImage'
+ 'pathToImage'
], function (name) {
SVGPainter.prototype[name] = createMethodNotSupport$1(name);
});
diff --git a/en/dist/echarts-en.js.map b/en/dist/echarts-en.js.map
index 81951f0..85f8c54 100644
--- a/en/dist/echarts-en.js.map
+++ b/en/dist/echarts-en.js.map
@@ -1 +1 @@
-{"version":3,"file":"echarts-en.js","sources":["../src/config.js","../../zrender/src/core/guid.js","../../zrender/src/core/env.js","../../zrender/src/core/util.js","../../zrender/src/core/vector.js","../../zrender/src/mixin/Draggable.js","../../zrender/src/mixin/Eventful.js","../../zrender/src/core/fourPointsTransform.js","../../zrender/src/core/dom.js","../../zrender/src/core/event.js","../../zrender/src/core/GestureMgr.js","../../zrender/src/Handler.js","../../zrender/src/core/matrix.j [...]
\ No newline at end of file
+{"version":3,"file":"echarts-en.js","sources":["../src/config.js","../../zrender/src/core/guid.js","../../zrender/src/core/env.js","../../zrender/src/core/util.js","../../zrender/src/core/vector.js","../../zrender/src/mixin/Draggable.js","../../zrender/src/mixin/Eventful.js","../../zrender/src/core/fourPointsTransform.js","../../zrender/src/core/dom.js","../../zrender/src/core/event.js","../../zrender/src/core/GestureMgr.js","../../zrender/src/Handler.js","../../zrender/src/core/matrix.j [...]
\ No newline at end of file
diff --git a/en/dist/echarts-en.min.js b/en/dist/echarts-en.min.js
index d118440..9129d3e 100644
--- a/en/dist/echarts-en.min.js
+++ b/en/dist/echarts-en.min.js
@@ -19,4 +19,4 @@
*/
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,n=function(){return e++},v="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasS [...]
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,n=function(){return e++},v="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasS [...]
diff --git a/en/dist/echarts-en.simple.js b/en/dist/echarts-en.simple.js
index c282195..960a3a5 100644
--- a/en/dist/echarts-en.simple.js
+++ b/en/dist/echarts-en.simple.js
@@ -9948,6 +9948,10 @@ Painter.prototype = {
if (this._layerConfig[zlevel]) {
merge(layer, this._layerConfig[zlevel], true);
}
+ // TODO Remove EL_AFTER_INCREMENTAL_INC magic number
+ else if (this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC]) {
+ merge(layer, this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC], true);
+ }
if (virtual) {
layer.virtual = virtual;
@@ -10100,12 +10104,26 @@ Painter.prototype = {
var prevLayer = null;
var incrementalLayerCount = 0;
+ var prevZlevel;
for (var i = 0; i < list.length; i++) {
var el = list[i];
var zlevel = el.zlevel;
var layer;
- // PENDING If change one incremental element style ?
- // TODO Where there are non-incremental elements between incremental elements.
+
+ if (prevZlevel !== zlevel) {
+ prevZlevel = zlevel;
+ incrementalLayerCount = 0;
+ }
+
+ // TODO Not use magic number on zlevel.
+
+ // Each layer with increment element can be separated to 3 layers.
+ // (Other Element drawn after incremental element)
+ // -----------------zlevel + EL_AFTER_INCREMENTAL_INC--------------------
+ // (Incremental element)
+ // ----------------------zlevel + INCREMENTAL_INC------------------------
+ // (Element drawn before incremental element)
+ // --------------------------------zlevel--------------------------------
if (el.incremental) {
layer = this.getLayer(zlevel + INCREMENTAL_INC, this._needsManuallyCompositing);
layer.incremental = true;
@@ -10200,6 +10218,7 @@ Painter.prototype = {
for (var i = 0; i < this._zlevelList.length; i++) {
var _zlevel = this._zlevelList[i];
+ // TODO Remove EL_AFTER_INCREMENTAL_INC magic number
if (_zlevel === zlevel || _zlevel === zlevel + EL_AFTER_INCREMENTAL_INC) {
var layer = this._layers[_zlevel];
merge(layer, layerConfig[zlevel], true);
@@ -11270,7 +11289,7 @@ var painterCtors = {
/**
* @type {string}
*/
-var version$1 = '4.3.0';
+var version$1 = '4.3.1';
/**
* Initializing a zrender instance
@@ -13098,7 +13117,30 @@ var extremity = create();
* @param {number} min
* @param {number} max
*/
+function fromPoints(points, min$$1, max$$1) {
+ if (points.length === 0) {
+ return;
+ }
+ var p = points[0];
+ var left = p[0];
+ var right = p[0];
+ var top = p[1];
+ var bottom = p[1];
+ var i;
+ for (i = 1; i < points.length; i++) {
+ p = points[i];
+ left = mathMin$3(left, p[0]);
+ right = mathMax$3(right, p[0]);
+ top = mathMin$3(top, p[1]);
+ bottom = mathMax$3(bottom, p[1]);
+ }
+
+ min$$1[0] = left;
+ min$$1[1] = top;
+ max$$1[0] = right;
+ max$$1[1] = bottom;
+}
/**
* @memberOf module:zrender/core/bbox
@@ -17420,11 +17462,13 @@ function getHighlightDigit(highlightKey) {
* @param {Object} opt Check `opt` of `setTextStyleCommon` to find other props.
* @param {string|Function} [opt.defaultText]
* @param {module:echarts/model/Model} [opt.labelFetcher] Fetch text by
- * `opt.labelFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex)`
- * @param {module:echarts/model/Model} [opt.labelDataIndex] Fetch text by
- * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex)`
- * @param {module:echarts/model/Model} [opt.labelDimIndex] Fetch text by
- * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex)`
+ * `opt.labelFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
+ * @param {number} [opt.labelDataIndex] Fetch text by
+ * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
+ * @param {number} [opt.labelDimIndex] Fetch text by
+ * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
+ * @param {string} [opt.labelProp] Fetch text by
+ * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
* @param {Object} [normalSpecified]
* @param {Object} [emphasisSpecified]
*/
@@ -17438,6 +17482,7 @@ function setLabelStyle(
var labelFetcher = opt.labelFetcher;
var labelDataIndex = opt.labelDataIndex;
var labelDimIndex = opt.labelDimIndex;
+ var labelProp = opt.labelProp;
// This scenario, `label.normal.show = true; label.emphasis.show = false`,
// is not supported util someone requests.
@@ -17451,7 +17496,7 @@ function setLabelStyle(
var baseText;
if (showNormal || showEmphasis) {
if (labelFetcher) {
- baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex);
+ baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex, labelProp);
}
if (baseText == null) {
baseText = isFunction$1(opt.defaultText) ? opt.defaultText(labelDataIndex, opt) : opt.defaultText;
@@ -17461,7 +17506,7 @@ function setLabelStyle(
var emphasisStyleText = showEmphasis
? retrieve2(
labelFetcher
- ? labelFetcher.getFormattedLabel(labelDataIndex, 'emphasis', null, labelDimIndex)
+ ? labelFetcher.getFormattedLabel(labelDataIndex, 'emphasis', null, labelDimIndex, labelProp)
: null,
baseText
)
@@ -19280,7 +19325,7 @@ function nice(val, round) {
// import Text from 'zrender/src/graphic/Text';
/**
- * 每三位默认加,格式化
+ * add commas after every three numbers
* @param {string|number} x
* @return {string}
*/
@@ -19495,6 +19540,13 @@ var truncateText$1 = truncateText;
* But deprecated this interface. Please use `getTextBoundingRect` instead.
*/
+
+/**
+ * open new tab
+ * @param {string} link url
+ * @param {string} target blank or self
+ */
+
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -24429,7 +24481,7 @@ function dataTaskReset(context) {
function dataTaskProgress(param, context) {
// Avoid repead cloneShallow when data just created in reset.
- if (param.end > context.outputData.count()) {
+ if (context.outputData && param.end > context.outputData.count()) {
context.model.getRawData().cloneShallow(context.outputData);
}
}
@@ -25116,6 +25168,32 @@ var lang = {
lang: ['Right Click to Save Image']
}
},
+ series: {
+ typeNames: {
+ pie: 'Pie chart',
+ bar: 'Bar chart',
+ line: 'Line chart',
+ scatter: 'Scatter plot',
+ effectScatter: 'Ripple scatter plot',
+ radar: 'Radar chart',
+ tree: 'Tree',
+ treemap: 'Treemap',
+ boxplot: 'Boxplot',
+ candlestick: 'Candlestick',
+ k: 'K line chart',
+ heatmap: 'Heat map',
+ map: 'Map',
+ parallel: 'Parallel coordinate map',
+ lines: 'Line graph',
+ graph: 'Relationship graph',
+ sankey: 'Sankey diagram',
+ funnel: 'Funnel chart',
+ gauge: 'Guage',
+ pictorialBar: 'Pictorial bar',
+ themeRiver: 'Theme River Map',
+ sunburst: 'Sunburst'
+ }
+ },
aria: {
general: {
withTitle: 'This is a chart about "{title}"',
@@ -25348,11 +25426,16 @@ var loadingDefault = function (api, opts) {
opts = opts || {};
defaults(opts, {
text: 'loading',
- color: '#c23531',
textColor: '#000',
+ fontSize: '12px',
maskColor: 'rgba(255, 255, 255, 0.8)',
+ showSpinner: true,
+ color: '#c23531',
+ spinnerRadius: 10,
+ lineWidth: 5,
zlevel: 0
});
+ var group = new Group();
var mask = new Rect({
style: {
fill: opts.maskColor
@@ -25360,24 +25443,13 @@ var loadingDefault = function (api, opts) {
zlevel: opts.zlevel,
z: 10000
});
- var arc = new Arc({
- shape: {
- startAngle: -PI$1 / 2,
- endAngle: -PI$1 / 2 + 0.1,
- r: 10
- },
- style: {
- stroke: opts.color,
- lineCap: 'round',
- lineWidth: 5
- },
- zlevel: opts.zlevel,
- z: 10001
- });
+ group.add(mask);
+ var font = opts.fontSize + ' sans-serif';
var labelRect = new Rect({
style: {
fill: 'none',
text: opts.text,
+ font: font,
textPosition: 'right',
textDistance: 10,
textFill: opts.textColor
@@ -25385,32 +25457,49 @@ var loadingDefault = function (api, opts) {
zlevel: opts.zlevel,
z: 10001
});
-
- arc.animateShape(true)
- .when(1000, {
- endAngle: PI$1 * 3 / 2
- })
- .start('circularInOut');
- arc.animateShape(true)
- .when(1000, {
- startAngle: PI$1 * 3 / 2
- })
- .delay(300)
- .start('circularInOut');
-
- var group = new Group();
- group.add(arc);
group.add(labelRect);
- group.add(mask);
+ if (opts.showSpinner) {
+ var arc = new Arc({
+ shape: {
+ startAngle: -PI$1 / 2,
+ endAngle: -PI$1 / 2 + 0.1,
+ r: opts.spinnerRadius
+ },
+ style: {
+ stroke: opts.color,
+ lineCap: 'round',
+ lineWidth: opts.lineWidth
+ },
+ zlevel: opts.zlevel,
+ z: 10001
+ });
+ arc.animateShape(true)
+ .when(1000, {
+ endAngle: PI$1 * 3 / 2
+ })
+ .start('circularInOut');
+ arc.animateShape(true)
+ .when(1000, {
+ startAngle: PI$1 * 3 / 2
+ })
+ .delay(300)
+ .start('circularInOut');
+ group.add(arc);
+ }
// Inject resize
group.resize = function () {
- var cx = api.getWidth() / 2;
+ var textWidth = getWidth(opts.text, font);
+ var r = opts.showSpinner ? opts.spinnerRadius : 0;
+ // cx = (containerWidth - arcDiameter - textDistance - textWidth) / 2
+ // textDistance needs to be calculated when both animation and text exist
+ var cx = (api.getWidth() - r * 2 - (opts.showSpinner && textWidth ? 10 : 0) - textWidth) / 2
+ // only show the text
+ - (opts.showSpinner ? 0 : textWidth / 2);
var cy = api.getHeight() / 2;
- arc.setShape({
+ opts.showSpinner && arc.setShape({
cx: cx,
cy: cy
});
- var r = arc.shape.r;
labelRect.setShape({
x: cx - r,
y: cy - r,
@@ -27066,10 +27155,10 @@ var isFunction = isFunction$1;
var isObject = isObject$1;
var parseClassType = ComponentModel.parseClassType;
-var version = '4.7.0';
+var version = '4.8.0';
var dependencies = {
- zrender: '4.3.0'
+ zrender: '4.3.1'
};
var TEST_FRAME_REMAIN_TIME = 1;
@@ -27488,7 +27577,7 @@ echartsProto.getRenderedCanvas = function (opts) {
* Get svg data url
* @return {string}
*/
-echartsProto.getSvgDataUrl = function () {
+echartsProto.getSvgDataURL = function () {
if (!env$1.svgSupported) {
return;
}
@@ -27500,7 +27589,7 @@ echartsProto.getSvgDataUrl = function () {
el.stopAnimation(true);
});
- return zr.painter.pathToDataUrl();
+ return zr.painter.toDataURL();
};
/**
@@ -27536,7 +27625,7 @@ echartsProto.getDataURL = function (opts) {
});
var url = this._zr.painter.getType() === 'svg'
- ? this.getSvgDataUrl()
+ ? this.getSvgDataURL()
: this.getRenderedCanvas(opts).toDataURL(
'image/' + (opts && opts.type || 'png')
);
@@ -27565,6 +27654,7 @@ echartsProto.getConnectedDataURL = function (opts) {
if (!env$1.canvasSupported) {
return;
}
+ var isSvg = opts.type === 'svg';
var groupId = this.group;
var mathMin = Math.min;
var mathMax = Math.max;
@@ -27579,9 +27669,9 @@ echartsProto.getConnectedDataURL = function (opts) {
each$1(instances, function (chart, id) {
if (chart.group === groupId) {
- var canvas = chart.getRenderedCanvas(
- clone(opts)
- );
+ var canvas = isSvg
+ ? chart.getZr().painter.getSvgDom().innerHTML
+ : chart.getRenderedCanvas(clone(opts));
var boundingRect = chart.getDom().getBoundingClientRect();
left = mathMin(boundingRect.left, left);
top = mathMin(boundingRect.top, top);
@@ -27602,38 +27692,61 @@ echartsProto.getConnectedDataURL = function (opts) {
var width = right - left;
var height = bottom - top;
var targetCanvas = createCanvas();
- targetCanvas.width = width;
- targetCanvas.height = height;
- var zr = init$1(targetCanvas);
+ var zr = init$1(targetCanvas, {
+ renderer: isSvg ? 'svg' : 'canvas'
+ });
+ zr.resize({
+ width: width,
+ height: height
+ });
- // Background between the charts
- if (opts.connectedBackgroundColor) {
- zr.add(new Rect({
- shape: {
- x: 0,
- y: 0,
- width: width,
- height: height
- },
- style: {
- fill: opts.connectedBackgroundColor
- }
- }));
+ if (isSvg) {
+ var content = '';
+ each(canvasList, function (item) {
+ var x = item.left - left;
+ var y = item.top - top;
+ content += '<g transform="translate(' + x + ','
+ + y + ')">' + item.dom + '</g>';
+ });
+ zr.painter.getSvgRoot().innerHTML = content;
+
+ if (opts.connectedBackgroundColor) {
+ zr.painter.setBackgroundColor(opts.connectedBackgroundColor);
+ }
+
+ zr.refreshImmediately();
+ return zr.painter.toDataURL();
}
+ else {
+ // Background between the charts
+ if (opts.connectedBackgroundColor) {
+ zr.add(new Rect({
+ shape: {
+ x: 0,
+ y: 0,
+ width: width,
+ height: height
+ },
+ style: {
+ fill: opts.connectedBackgroundColor
+ }
+ }));
+ }
- each(canvasList, function (item) {
- var img = new ZImage({
- style: {
- x: item.left * dpr - left,
- y: item.top * dpr - top,
- image: item.dom
- }
+ each(canvasList, function (item) {
+ var img = new ZImage({
+ style: {
+ x: item.left * dpr - left,
+ y: item.top * dpr - top,
+ image: item.dom
+ }
+ });
+ zr.add(img);
});
- zr.add(img);
- });
- zr.refreshImmediately();
- return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png'));
+ zr.refreshImmediately();
+ return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png'));
+ }
}
else {
return this.getDataURL(opts);
@@ -33491,7 +33604,6 @@ symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {
var itemStyle = seriesScope && seriesScope.itemStyle;
var hoverItemStyle = seriesScope && seriesScope.hoverItemStyle;
- var symbolRotate = seriesScope && seriesScope.symbolRotate;
var symbolOffset = seriesScope && seriesScope.symbolOffset;
var labelModel = seriesScope && seriesScope.labelModel;
var hoverLabelModel = seriesScope && seriesScope.hoverLabelModel;
@@ -33507,7 +33619,6 @@ symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {
itemStyle = itemModel.getModel(normalStyleAccessPath).getItemStyle(['color']);
hoverItemStyle = itemModel.getModel(emphasisStyleAccessPath).getItemStyle();
- symbolRotate = itemModel.getShallow('symbolRotate');
symbolOffset = itemModel.getShallow('symbolOffset');
labelModel = itemModel.getModel(normalLabelAccessPath);
@@ -33521,6 +33632,8 @@ symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {
var elStyle = symbolPath.style;
+ var symbolRotate = data.getItemVisual(idx, 'symbolRotate');
+
symbolPath.attr('rotation', (symbolRotate || 0) * Math.PI / 180 || 0);
if (symbolOffset) {
@@ -34576,6 +34689,10 @@ function createGridClipPath(cartesian, hasAnimation, seriesModel) {
width += lineWidth;
height += lineWidth;
+ // fix: https://github.com/apache/incubator-echarts/issues/11369
+ x = Math.floor(x);
+ width = Math.round(width);
+
var clipPath = new Rect({
shape: {
x: x,
@@ -34673,6 +34790,26 @@ function isPointsSame(points1, points2) {
return true;
}
+function getBoundingDiff(points1, points2) {
+ var min1 = [];
+ var max1 = [];
+
+ var min2 = [];
+ var max2 = [];
+
+ fromPoints(points1, min1, max1);
+ fromPoints(points2, min2, max2);
+
+ // Get a max value from each corner of two boundings.
+ return Math.max(
+ Math.abs(min1[0] - min2[0]),
+ Math.abs(min1[1] - min2[1]),
+
+ Math.abs(max1[0] - max2[0]),
+ Math.abs(max1[1] - max2[1])
+ );
+}
+
function getSmooth(smooth) {
return typeof (smooth) === 'number' ? smooth : (smooth ? 0.5 : 0);
}
@@ -35285,6 +35422,24 @@ Chart.extend({
next = turnPointsIntoStep(diff.next, coordSys, step);
stackedOnNext = turnPointsIntoStep(diff.stackedOnNext, coordSys, step);
}
+ // Don't apply animation if diff is large.
+ // For better result and avoid memory explosion problems like
+ // https://github.com/apache/incubator-echarts/issues/12229
+ if (getBoundingDiff(current, next) > 3000
+ || (polygon && getBoundingDiff(stackedOnCurrent, stackedOnNext) > 3000)
+ ) {
+ polyline.setShape({
+ points: next
+ });
+ if (polygon) {
+ polygon.setShape({
+ points: next,
+ stackedOnPoints: stackedOnNext
+ });
+ }
+ return;
+ }
+
// `diff.current` is subset of `current` (which should be ensured by
// turnPointsIntoStep), so points in `__points` can be updated when
// points in `current` are update during animation.
@@ -35391,13 +35546,14 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
var symbolType = seriesModel.get('symbol');
var symbolSize = seriesModel.get('symbolSize');
var keepAspect = seriesModel.get('symbolKeepAspect');
+ var symbolRotate = seriesModel.get('symbolRotate');
var hasSymbolTypeCallback = isFunction$1(symbolType);
var hasSymbolSizeCallback = isFunction$1(symbolSize);
- var hasCallback = hasSymbolTypeCallback || hasSymbolSizeCallback;
+ var hasSymbolRotateCallback = isFunction$1(symbolRotate);
+ var hasCallback = hasSymbolTypeCallback || hasSymbolSizeCallback || hasSymbolRotateCallback;
var seriesSymbol = (!hasSymbolTypeCallback && symbolType) ? symbolType : defaultSymbolType;
var seriesSymbolSize = !hasSymbolSizeCallback ? symbolSize : null;
-
data.setVisual({
legendSymbol: legendSymbol || seriesSymbol,
// If seting callback functions on `symbol` or `symbolSize`, for simplicity and avoiding
@@ -35406,7 +35562,8 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
// some cases but generally it is not recommanded.
symbol: seriesSymbol,
symbolSize: seriesSymbolSize,
- symbolKeepAspect: keepAspect
+ symbolKeepAspect: keepAspect,
+ symbolRotate: symbolRotate
});
// Only visible series has each data be visual encoded
@@ -35420,12 +35577,14 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
var params = seriesModel.getDataParams(idx);
hasSymbolTypeCallback && data.setItemVisual(idx, 'symbol', symbolType(rawValue, params));
hasSymbolSizeCallback && data.setItemVisual(idx, 'symbolSize', symbolSize(rawValue, params));
+ hasSymbolRotateCallback && data.setItemVisual(idx, 'symbolRotate', symbolRotate(rawValue, params));
}
if (data.hasItemOption) {
var itemModel = data.getItemModel(idx);
var itemSymbolType = itemModel.getShallow('symbol', true);
var itemSymbolSize = itemModel.getShallow('symbolSize', true);
+ var itemSymbolRotate = itemModel.getShallow('symbolRotate', true);
var itemSymbolKeepAspect = itemModel.getShallow('symbolKeepAspect', true);
// If has item symbol
@@ -35436,6 +35595,9 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
// PENDING Transform symbolSize ?
data.setItemVisual(idx, 'symbolSize', itemSymbolSize);
}
+ if (itemSymbolRotate != null) {
+ data.setItemVisual(idx, 'symbolRotate', itemSymbolRotate);
+ }
if (itemSymbolKeepAspect != null) {
data.setItemVisual(idx, 'symbolKeepAspect', itemSymbolKeepAspect);
}
@@ -36944,9 +37106,11 @@ var largeLayout = {
coord = cartesian.dataToPoint(valuePair, null, coord);
// Data index might not be in order, depends on `progressiveChunkMode`.
- largeBackgroundPoints[pointsOffset] = valueAxisHorizontal ? coordLayout.x + coordLayout.width : coord[0];
+ largeBackgroundPoints[pointsOffset] = valueAxisHorizontal
+ ? coordLayout.x + coordLayout.width : coord[0];
largePoints[pointsOffset++] = coord[0];
- largeBackgroundPoints[pointsOffset] = valueAxisHorizontal ? coord[1] : coordLayout.y + coordLayout.height;
+ largeBackgroundPoints[pointsOffset] = valueAxisHorizontal
+ ? coord[1] : coordLayout.y + coordLayout.height;
largePoints[pointsOffset++] = coord[1];
largeDataIndices[idxOffset++] = dataIndex;
}
@@ -37436,8 +37600,6 @@ function getScaleExtent(scale, model) {
var min = model.getMin();
var max = model.getMax();
- var fixMin = min != null;
- var fixMax = max != null;
var originalExtent = scale.getExtent();
var axisDataLen;
@@ -37481,17 +37643,6 @@ function getScaleExtent(scale, model) {
// (2) When `needCrossZero` and all data is positive/negative, should it be ensured
// that the results processed by boundaryGap are positive/negative?
- if (min == null) {
- min = scaleType === 'ordinal'
- ? (axisDataLen ? 0 : NaN)
- : originalExtent[0] - boundaryGap[0] * span;
- }
- if (max == null) {
- max = scaleType === 'ordinal'
- ? (axisDataLen ? axisDataLen - 1 : NaN)
- : originalExtent[1] + boundaryGap[1] * span;
- }
-
if (min === 'dataMin') {
min = originalExtent[0];
}
@@ -37512,6 +37663,20 @@ function getScaleExtent(scale, model) {
});
}
+ var fixMin = min != null;
+ var fixMax = max != null;
+
+ if (min == null) {
+ min = scaleType === 'ordinal'
+ ? (axisDataLen ? 0 : NaN)
+ : originalExtent[0] - boundaryGap[0] * span;
+ }
+ if (max == null) {
+ max = scaleType === 'ordinal'
+ ? (axisDataLen ? axisDataLen - 1 : NaN)
+ : originalExtent[1] + boundaryGap[1] * span;
+ }
+
(min == null || !isFinite(min)) && (min = NaN);
(max == null || !isFinite(max)) && (max = NaN);
@@ -37562,7 +37727,13 @@ function getScaleExtent(scale, model) {
}
}
- return [min, max];
+ return {
+ extent: [min, max],
+ // "fix" means "fixed", the value should not be
+ // changed in the subsequent steps.
+ fixMin: fixMin,
+ fixMax: fixMax
+ };
}
function adjustScaleForOverflow(min, max, model, barWidthAndOffset) {
@@ -37601,9 +37772,9 @@ function adjustScaleForOverflow(min, max, model, barWidthAndOffset) {
}
function niceScaleExtent(scale, model) {
- var extent = getScaleExtent(scale, model);
- var fixMin = model.getMin() != null;
- var fixMax = model.getMax() != null;
+ var extentInfo = getScaleExtent(scale, model);
+ var extent = extentInfo.extent;
+
var splitNumber = model.get('splitNumber');
if (scale.type === 'log') {
@@ -37614,8 +37785,8 @@ function niceScaleExtent(scale, model) {
scale.setExtent(extent[0], extent[1]);
scale.niceExtent({
splitNumber: splitNumber,
- fixMin: fixMin,
- fixMax: fixMax,
+ fixMin: extentInfo.fixMin,
+ fixMax: extentInfo.fixMax,
minInterval: (scaleType === 'interval' || scaleType === 'time')
? model.get('minInterval') : null,
maxInterval: (scaleType === 'interval' || scaleType === 'time')
@@ -42055,6 +42226,7 @@ extendChartView({
var drawBackground = seriesModel.get('showBackground', true);
var backgroundModel = seriesModel.getModel('backgroundStyle');
+ var barBorderRadius = backgroundModel.get('barBorderRadius') || 0;
var bgEls = [];
var oldBgEls = this._backgroundEls || [];
@@ -42065,8 +42237,13 @@ extendChartView({
var layout = getLayout[coord.type](data, dataIndex, itemModel);
if (drawBackground) {
- var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, layout);
+ var bgLayout = getLayout[coord.type](data, dataIndex);
+ var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, bgLayout);
bgEl.useStyle(backgroundModel.getBarItemStyle());
+ // Only cartesian2d support borderRadius.
+ if (coord.type === 'cartesian2d') {
+ bgEl.setShape('r', barBorderRadius);
+ }
bgEls[dataIndex] = bgEl;
}
@@ -42103,9 +42280,14 @@ extendChartView({
if (drawBackground) {
var bgEl = oldBgEls[oldIndex];
bgEl.useStyle(backgroundModel.getBarItemStyle());
+ // Only cartesian2d support borderRadius.
+ if (coord.type === 'cartesian2d') {
+ bgEl.setShape('r', barBorderRadius);
+ }
bgEls[newIndex] = bgEl;
- var shape = createBackgroundShape(isHorizontalOrRadial, layout, coord);
+ var bgLayout = getLayout[coord.type](data, newIndex);
+ var shape = createBackgroundShape(isHorizontalOrRadial, bgLayout, coord);
updateProps(bgEl, { shape: shape }, animationModel, newIndex);
}
@@ -42355,9 +42537,11 @@ function removeSector(dataIndex, animationModel, el) {
}
var getLayout = {
+ // itemModel is only used to get borderWidth, which is not needed
+ // when calculating bar background layout.
cartesian2d: function (data, dataIndex, itemModel) {
var layout = data.getItemLayout(dataIndex);
- var fixedLineWidth = getLineWidth(itemModel, layout);
+ var fixedLineWidth = itemModel ? getLineWidth(itemModel, layout) : 0;
// fix layout with lineWidth
var signX = layout.width > 0 ? 1 : -1;
@@ -43231,31 +43415,36 @@ piePieceProto.updateData = function (data, idx, firstCreate) {
var withAnimation = !firstCreate && animationTypeUpdate === 'transition';
this._updateLabel(data, idx, withAnimation);
- this.highDownOnUpdate = (itemModel.get('hoverAnimation') && seriesModel.isAnimationEnabled())
+ this.highDownOnUpdate = !seriesModel.get('silent')
? function (fromState, toState) {
+ var hasAnimation = seriesModel.isAnimationEnabled() && itemModel.get('hoverAnimation');
if (toState === 'emphasis') {
labelLine.ignore = labelLine.hoverIgnore;
labelText.ignore = labelText.hoverIgnore;
// Sector may has animation of updating data. Force to move to the last frame
// Or it may stopped on the wrong shape
- sector.stopAnimation(true);
- sector.animateTo({
- shape: {
- r: layout.r + seriesModel.get('hoverOffset')
- }
- }, 300, 'elasticOut');
+ if (hasAnimation) {
+ sector.stopAnimation(true);
+ sector.animateTo({
+ shape: {
+ r: layout.r + seriesModel.get('hoverOffset')
+ }
+ }, 300, 'elasticOut');
+ }
}
else {
labelLine.ignore = labelLine.normalIgnore;
labelText.ignore = labelText.normalIgnore;
- sector.stopAnimation(true);
- sector.animateTo({
- shape: {
- r: layout.r
- }
- }, 300, 'elasticOut');
+ if (hasAnimation) {
+ sector.stopAnimation(true);
+ sector.animateTo({
+ shape: {
+ r: layout.r
+ }
+ }, 300, 'elasticOut');
+ }
}
}
: null;
diff --git a/en/dist/echarts-en.simple.min.js b/en/dist/echarts-en.simple.min.js
index f289ecd..0bdc6f3 100644
--- a/en/dist/echarts-en.simple.min.js
+++ b/en/dist/echarts-en.simple.min.js
@@ -19,4 +19,4 @@
*/
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,n=function(){return e++},m="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasS [...]
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,n=function(){return e++},m="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasS [...]
diff --git a/en/dist/echarts.common.js b/en/dist/echarts.common.js
index 96417af..1b2ee0f 100644
--- a/en/dist/echarts.common.js
+++ b/en/dist/echarts.common.js
@@ -10252,6 +10252,10 @@ Painter.prototype = {
if (this._layerConfig[zlevel]) {
merge(layer, this._layerConfig[zlevel], true);
}
+ // TODO Remove EL_AFTER_INCREMENTAL_INC magic number
+ else if (this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC]) {
+ merge(layer, this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC], true);
+ }
if (virtual) {
layer.virtual = virtual;
@@ -10404,12 +10408,26 @@ Painter.prototype = {
var prevLayer = null;
var incrementalLayerCount = 0;
+ var prevZlevel;
for (var i = 0; i < list.length; i++) {
var el = list[i];
var zlevel = el.zlevel;
var layer;
- // PENDING If change one incremental element style ?
- // TODO Where there are non-incremental elements between incremental elements.
+
+ if (prevZlevel !== zlevel) {
+ prevZlevel = zlevel;
+ incrementalLayerCount = 0;
+ }
+
+ // TODO Not use magic number on zlevel.
+
+ // Each layer with increment element can be separated to 3 layers.
+ // (Other Element drawn after incremental element)
+ // -----------------zlevel + EL_AFTER_INCREMENTAL_INC--------------------
+ // (Incremental element)
+ // ----------------------zlevel + INCREMENTAL_INC------------------------
+ // (Element drawn before incremental element)
+ // --------------------------------zlevel--------------------------------
if (el.incremental) {
layer = this.getLayer(zlevel + INCREMENTAL_INC, this._needsManuallyCompositing);
layer.incremental = true;
@@ -10504,6 +10522,7 @@ Painter.prototype = {
for (var i = 0; i < this._zlevelList.length; i++) {
var _zlevel = this._zlevelList[i];
+ // TODO Remove EL_AFTER_INCREMENTAL_INC magic number
if (_zlevel === zlevel || _zlevel === zlevel + EL_AFTER_INCREMENTAL_INC) {
var layer = this._layers[_zlevel];
merge(layer, layerConfig[zlevel], true);
@@ -11576,7 +11595,7 @@ var instances$1 = {}; // ZRender实例map索引
/**
* @type {string}
*/
-var version$1 = '4.3.0';
+var version$1 = '4.3.1';
/**
* Initializing a zrender instance
@@ -17782,11 +17801,13 @@ function getHighlightDigit(highlightKey) {
* @param {Object} opt Check `opt` of `setTextStyleCommon` to find other props.
* @param {string|Function} [opt.defaultText]
* @param {module:echarts/model/Model} [opt.labelFetcher] Fetch text by
- * `opt.labelFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex)`
- * @param {module:echarts/model/Model} [opt.labelDataIndex] Fetch text by
- * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex)`
- * @param {module:echarts/model/Model} [opt.labelDimIndex] Fetch text by
- * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex)`
+ * `opt.labelFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
+ * @param {number} [opt.labelDataIndex] Fetch text by
+ * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
+ * @param {number} [opt.labelDimIndex] Fetch text by
+ * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
+ * @param {string} [opt.labelProp] Fetch text by
+ * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
* @param {Object} [normalSpecified]
* @param {Object} [emphasisSpecified]
*/
@@ -17800,6 +17821,7 @@ function setLabelStyle(
var labelFetcher = opt.labelFetcher;
var labelDataIndex = opt.labelDataIndex;
var labelDimIndex = opt.labelDimIndex;
+ var labelProp = opt.labelProp;
// This scenario, `label.normal.show = true; label.emphasis.show = false`,
// is not supported util someone requests.
@@ -17813,7 +17835,7 @@ function setLabelStyle(
var baseText;
if (showNormal || showEmphasis) {
if (labelFetcher) {
- baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex);
+ baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex, labelProp);
}
if (baseText == null) {
baseText = isFunction$1(opt.defaultText) ? opt.defaultText(labelDataIndex, opt) : opt.defaultText;
@@ -17823,7 +17845,7 @@ function setLabelStyle(
var emphasisStyleText = showEmphasis
? retrieve2(
labelFetcher
- ? labelFetcher.getFormattedLabel(labelDataIndex, 'emphasis', null, labelDimIndex)
+ ? labelFetcher.getFormattedLabel(labelDataIndex, 'emphasis', null, labelDimIndex, labelProp)
: null,
baseText
)
@@ -19734,7 +19756,7 @@ var number = (Object.freeze || Object)({
// import Text from 'zrender/src/graphic/Text';
/**
- * 每三位默认加,格式化
+ * add commas after every three numbers
* @param {string|number} x
* @return {string}
*/
@@ -19987,6 +20009,22 @@ function getTextRect(
);
}
+/**
+ * open new tab
+ * @param {string} link url
+ * @param {string} target blank or self
+ */
+function windowOpen(link, target) {
+ if (target === '_blank' || target === 'blank') {
+ var blank = window.open();
+ blank.opener = null;
+ blank.location = link;
+ }
+ else {
+ window.open(link, target);
+ }
+}
+
var format = (Object.freeze || Object)({
addCommas: addCommas,
@@ -20000,7 +20038,8 @@ var format = (Object.freeze || Object)({
capitalFirst: capitalFirst,
truncateText: truncateText$1,
getTextBoundingRect: getTextBoundingRect,
- getTextRect: getTextRect
+ getTextRect: getTextRect,
+ windowOpen: windowOpen
});
/*
@@ -24981,7 +25020,7 @@ function dataTaskReset(context) {
function dataTaskProgress(param, context) {
// Avoid repead cloneShallow when data just created in reset.
- if (param.end > context.outputData.count()) {
+ if (context.outputData && param.end > context.outputData.count()) {
context.model.getRawData().cloneShallow(context.outputData);
}
}
@@ -25961,11 +26000,16 @@ var loadingDefault = function (api, opts) {
opts = opts || {};
defaults(opts, {
text: 'loading',
- color: '#c23531',
textColor: '#000',
+ fontSize: '12px',
maskColor: 'rgba(255, 255, 255, 0.8)',
+ showSpinner: true,
+ color: '#c23531',
+ spinnerRadius: 10,
+ lineWidth: 5,
zlevel: 0
});
+ var group = new Group();
var mask = new Rect({
style: {
fill: opts.maskColor
@@ -25973,24 +26017,13 @@ var loadingDefault = function (api, opts) {
zlevel: opts.zlevel,
z: 10000
});
- var arc = new Arc({
- shape: {
- startAngle: -PI$1 / 2,
- endAngle: -PI$1 / 2 + 0.1,
- r: 10
- },
- style: {
- stroke: opts.color,
- lineCap: 'round',
- lineWidth: 5
- },
- zlevel: opts.zlevel,
- z: 10001
- });
+ group.add(mask);
+ var font = opts.fontSize + ' sans-serif';
var labelRect = new Rect({
style: {
fill: 'none',
text: opts.text,
+ font: font,
textPosition: 'right',
textDistance: 10,
textFill: opts.textColor
@@ -25998,32 +26031,49 @@ var loadingDefault = function (api, opts) {
zlevel: opts.zlevel,
z: 10001
});
-
- arc.animateShape(true)
- .when(1000, {
- endAngle: PI$1 * 3 / 2
- })
- .start('circularInOut');
- arc.animateShape(true)
- .when(1000, {
- startAngle: PI$1 * 3 / 2
- })
- .delay(300)
- .start('circularInOut');
-
- var group = new Group();
- group.add(arc);
group.add(labelRect);
- group.add(mask);
+ if (opts.showSpinner) {
+ var arc = new Arc({
+ shape: {
+ startAngle: -PI$1 / 2,
+ endAngle: -PI$1 / 2 + 0.1,
+ r: opts.spinnerRadius
+ },
+ style: {
+ stroke: opts.color,
+ lineCap: 'round',
+ lineWidth: opts.lineWidth
+ },
+ zlevel: opts.zlevel,
+ z: 10001
+ });
+ arc.animateShape(true)
+ .when(1000, {
+ endAngle: PI$1 * 3 / 2
+ })
+ .start('circularInOut');
+ arc.animateShape(true)
+ .when(1000, {
+ startAngle: PI$1 * 3 / 2
+ })
+ .delay(300)
+ .start('circularInOut');
+ group.add(arc);
+ }
// Inject resize
group.resize = function () {
- var cx = api.getWidth() / 2;
+ var textWidth = getWidth(opts.text, font);
+ var r = opts.showSpinner ? opts.spinnerRadius : 0;
+ // cx = (containerWidth - arcDiameter - textDistance - textWidth) / 2
+ // textDistance needs to be calculated when both animation and text exist
+ var cx = (api.getWidth() - r * 2 - (opts.showSpinner && textWidth ? 10 : 0) - textWidth) / 2
+ // only show the text
+ - (opts.showSpinner ? 0 : textWidth / 2);
var cy = api.getHeight() / 2;
- arc.setShape({
+ opts.showSpinner && arc.setShape({
cx: cx,
cy: cy
});
- var r = arc.shape.r;
labelRect.setShape({
x: cx - r,
y: cy - r,
@@ -27679,10 +27729,10 @@ var isFunction = isFunction$1;
var isObject = isObject$1;
var parseClassType = ComponentModel.parseClassType;
-var version = '4.7.0';
+var version = '4.8.0';
var dependencies = {
- zrender: '4.3.0'
+ zrender: '4.3.1'
};
var TEST_FRAME_REMAIN_TIME = 1;
@@ -28101,7 +28151,7 @@ echartsProto.getRenderedCanvas = function (opts) {
* Get svg data url
* @return {string}
*/
-echartsProto.getSvgDataUrl = function () {
+echartsProto.getSvgDataURL = function () {
if (!env$1.svgSupported) {
return;
}
@@ -28113,7 +28163,7 @@ echartsProto.getSvgDataUrl = function () {
el.stopAnimation(true);
});
- return zr.painter.pathToDataUrl();
+ return zr.painter.toDataURL();
};
/**
@@ -28149,7 +28199,7 @@ echartsProto.getDataURL = function (opts) {
});
var url = this._zr.painter.getType() === 'svg'
- ? this.getSvgDataUrl()
+ ? this.getSvgDataURL()
: this.getRenderedCanvas(opts).toDataURL(
'image/' + (opts && opts.type || 'png')
);
@@ -28178,6 +28228,7 @@ echartsProto.getConnectedDataURL = function (opts) {
if (!env$1.canvasSupported) {
return;
}
+ var isSvg = opts.type === 'svg';
var groupId = this.group;
var mathMin = Math.min;
var mathMax = Math.max;
@@ -28192,9 +28243,9 @@ echartsProto.getConnectedDataURL = function (opts) {
each$1(instances, function (chart, id) {
if (chart.group === groupId) {
- var canvas = chart.getRenderedCanvas(
- clone(opts)
- );
+ var canvas = isSvg
+ ? chart.getZr().painter.getSvgDom().innerHTML
+ : chart.getRenderedCanvas(clone(opts));
var boundingRect = chart.getDom().getBoundingClientRect();
left = mathMin(boundingRect.left, left);
top = mathMin(boundingRect.top, top);
@@ -28215,38 +28266,61 @@ echartsProto.getConnectedDataURL = function (opts) {
var width = right - left;
var height = bottom - top;
var targetCanvas = createCanvas();
- targetCanvas.width = width;
- targetCanvas.height = height;
- var zr = init$1(targetCanvas);
+ var zr = init$1(targetCanvas, {
+ renderer: isSvg ? 'svg' : 'canvas'
+ });
+ zr.resize({
+ width: width,
+ height: height
+ });
- // Background between the charts
- if (opts.connectedBackgroundColor) {
- zr.add(new Rect({
- shape: {
- x: 0,
- y: 0,
- width: width,
- height: height
- },
- style: {
- fill: opts.connectedBackgroundColor
- }
- }));
+ if (isSvg) {
+ var content = '';
+ each(canvasList, function (item) {
+ var x = item.left - left;
+ var y = item.top - top;
+ content += '<g transform="translate(' + x + ','
+ + y + ')">' + item.dom + '</g>';
+ });
+ zr.painter.getSvgRoot().innerHTML = content;
+
+ if (opts.connectedBackgroundColor) {
+ zr.painter.setBackgroundColor(opts.connectedBackgroundColor);
+ }
+
+ zr.refreshImmediately();
+ return zr.painter.toDataURL();
}
+ else {
+ // Background between the charts
+ if (opts.connectedBackgroundColor) {
+ zr.add(new Rect({
+ shape: {
+ x: 0,
+ y: 0,
+ width: width,
+ height: height
+ },
+ style: {
+ fill: opts.connectedBackgroundColor
+ }
+ }));
+ }
- each(canvasList, function (item) {
- var img = new ZImage({
- style: {
- x: item.left * dpr - left,
- y: item.top * dpr - top,
- image: item.dom
- }
+ each(canvasList, function (item) {
+ var img = new ZImage({
+ style: {
+ x: item.left * dpr - left,
+ y: item.top * dpr - top,
+ image: item.dom
+ }
+ });
+ zr.add(img);
});
- zr.add(img);
- });
- zr.refreshImmediately();
- return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png'));
+ zr.refreshImmediately();
+ return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png'));
+ }
}
else {
return this.getDataURL(opts);
@@ -34654,9 +34728,11 @@ var largeLayout = {
coord = cartesian.dataToPoint(valuePair, null, coord);
// Data index might not be in order, depends on `progressiveChunkMode`.
- largeBackgroundPoints[pointsOffset] = valueAxisHorizontal ? coordLayout.x + coordLayout.width : coord[0];
+ largeBackgroundPoints[pointsOffset] = valueAxisHorizontal
+ ? coordLayout.x + coordLayout.width : coord[0];
largePoints[pointsOffset++] = coord[0];
- largeBackgroundPoints[pointsOffset] = valueAxisHorizontal ? coord[1] : coordLayout.y + coordLayout.height;
+ largeBackgroundPoints[pointsOffset] = valueAxisHorizontal
+ ? coord[1] : coordLayout.y + coordLayout.height;
largePoints[pointsOffset++] = coord[1];
largeDataIndices[idxOffset++] = dataIndex;
}
@@ -35146,8 +35222,6 @@ function getScaleExtent(scale, model) {
var min = model.getMin();
var max = model.getMax();
- var fixMin = min != null;
- var fixMax = max != null;
var originalExtent = scale.getExtent();
var axisDataLen;
@@ -35191,17 +35265,6 @@ function getScaleExtent(scale, model) {
// (2) When `needCrossZero` and all data is positive/negative, should it be ensured
// that the results processed by boundaryGap are positive/negative?
- if (min == null) {
- min = scaleType === 'ordinal'
- ? (axisDataLen ? 0 : NaN)
- : originalExtent[0] - boundaryGap[0] * span;
- }
- if (max == null) {
- max = scaleType === 'ordinal'
- ? (axisDataLen ? axisDataLen - 1 : NaN)
- : originalExtent[1] + boundaryGap[1] * span;
- }
-
if (min === 'dataMin') {
min = originalExtent[0];
}
@@ -35222,6 +35285,20 @@ function getScaleExtent(scale, model) {
});
}
+ var fixMin = min != null;
+ var fixMax = max != null;
+
+ if (min == null) {
+ min = scaleType === 'ordinal'
+ ? (axisDataLen ? 0 : NaN)
+ : originalExtent[0] - boundaryGap[0] * span;
+ }
+ if (max == null) {
+ max = scaleType === 'ordinal'
+ ? (axisDataLen ? axisDataLen - 1 : NaN)
+ : originalExtent[1] + boundaryGap[1] * span;
+ }
+
(min == null || !isFinite(min)) && (min = NaN);
(max == null || !isFinite(max)) && (max = NaN);
@@ -35272,7 +35349,13 @@ function getScaleExtent(scale, model) {
}
}
- return [min, max];
+ return {
+ extent: [min, max],
+ // "fix" means "fixed", the value should not be
+ // changed in the subsequent steps.
+ fixMin: fixMin,
+ fixMax: fixMax
+ };
}
function adjustScaleForOverflow(min, max, model, barWidthAndOffset) {
@@ -35311,9 +35394,9 @@ function adjustScaleForOverflow(min, max, model, barWidthAndOffset) {
}
function niceScaleExtent(scale, model) {
- var extent = getScaleExtent(scale, model);
- var fixMin = model.getMin() != null;
- var fixMax = model.getMax() != null;
+ var extentInfo = getScaleExtent(scale, model);
+ var extent = extentInfo.extent;
+
var splitNumber = model.get('splitNumber');
if (scale.type === 'log') {
@@ -35324,8 +35407,8 @@ function niceScaleExtent(scale, model) {
scale.setExtent(extent[0], extent[1]);
scale.niceExtent({
splitNumber: splitNumber,
- fixMin: fixMin,
- fixMax: fixMax,
+ fixMin: extentInfo.fixMin,
+ fixMax: extentInfo.fixMax,
minInterval: (scaleType === 'interval' || scaleType === 'time')
? model.get('minInterval') : null,
maxInterval: (scaleType === 'interval' || scaleType === 'time')
@@ -36358,9 +36441,10 @@ function decodePolygon(coordinate, encodeOffsets, encodeScale) {
/**
* @alias module:echarts/coord/geo/parseGeoJson
* @param {Object} geoJson
+ * @param {string} nameProperty
* @return {module:zrender/container/Group}
*/
-var parseGeoJSON = function (geoJson) {
+var parseGeoJSON = function (geoJson, nameProperty) {
decode(geoJson);
@@ -36398,7 +36482,7 @@ var parseGeoJSON = function (geoJson) {
}
var region = new Region(
- properties.name,
+ properties[nameProperty || 'name'],
geometries,
properties.cp
);
@@ -37595,7 +37679,6 @@ symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {
var itemStyle = seriesScope && seriesScope.itemStyle;
var hoverItemStyle = seriesScope && seriesScope.hoverItemStyle;
- var symbolRotate = seriesScope && seriesScope.symbolRotate;
var symbolOffset = seriesScope && seriesScope.symbolOffset;
var labelModel = seriesScope && seriesScope.labelModel;
var hoverLabelModel = seriesScope && seriesScope.hoverLabelModel;
@@ -37611,7 +37694,6 @@ symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {
itemStyle = itemModel.getModel(normalStyleAccessPath).getItemStyle(['color']);
hoverItemStyle = itemModel.getModel(emphasisStyleAccessPath).getItemStyle();
- symbolRotate = itemModel.getShallow('symbolRotate');
symbolOffset = itemModel.getShallow('symbolOffset');
labelModel = itemModel.getModel(normalLabelAccessPath);
@@ -37625,6 +37707,8 @@ symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {
var elStyle = symbolPath.style;
+ var symbolRotate = data.getItemVisual(idx, 'symbolRotate');
+
symbolPath.attr('rotation', (symbolRotate || 0) * Math.PI / 180 || 0);
if (symbolOffset) {
@@ -38680,6 +38764,10 @@ function createGridClipPath(cartesian, hasAnimation, seriesModel) {
width += lineWidth;
height += lineWidth;
+ // fix: https://github.com/apache/incubator-echarts/issues/11369
+ x = Math.floor(x);
+ width = Math.round(width);
+
var clipPath = new Rect({
shape: {
x: x,
@@ -38777,6 +38865,26 @@ function isPointsSame(points1, points2) {
return true;
}
+function getBoundingDiff(points1, points2) {
+ var min1 = [];
+ var max1 = [];
+
+ var min2 = [];
+ var max2 = [];
+
+ fromPoints(points1, min1, max1);
+ fromPoints(points2, min2, max2);
+
+ // Get a max value from each corner of two boundings.
+ return Math.max(
+ Math.abs(min1[0] - min2[0]),
+ Math.abs(min1[1] - min2[1]),
+
+ Math.abs(max1[0] - max2[0]),
+ Math.abs(max1[1] - max2[1])
+ );
+}
+
function getSmooth(smooth) {
return typeof (smooth) === 'number' ? smooth : (smooth ? 0.5 : 0);
}
@@ -39389,6 +39497,24 @@ Chart.extend({
next = turnPointsIntoStep(diff.next, coordSys, step);
stackedOnNext = turnPointsIntoStep(diff.stackedOnNext, coordSys, step);
}
+ // Don't apply animation if diff is large.
+ // For better result and avoid memory explosion problems like
+ // https://github.com/apache/incubator-echarts/issues/12229
+ if (getBoundingDiff(current, next) > 3000
+ || (polygon && getBoundingDiff(stackedOnCurrent, stackedOnNext) > 3000)
+ ) {
+ polyline.setShape({
+ points: next
+ });
+ if (polygon) {
+ polygon.setShape({
+ points: next,
+ stackedOnPoints: stackedOnNext
+ });
+ }
+ return;
+ }
+
// `diff.current` is subset of `current` (which should be ensured by
// turnPointsIntoStep), so points in `__points` can be updated when
// points in `current` are update during animation.
@@ -39495,13 +39621,14 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
var symbolType = seriesModel.get('symbol');
var symbolSize = seriesModel.get('symbolSize');
var keepAspect = seriesModel.get('symbolKeepAspect');
+ var symbolRotate = seriesModel.get('symbolRotate');
var hasSymbolTypeCallback = isFunction$1(symbolType);
var hasSymbolSizeCallback = isFunction$1(symbolSize);
- var hasCallback = hasSymbolTypeCallback || hasSymbolSizeCallback;
+ var hasSymbolRotateCallback = isFunction$1(symbolRotate);
+ var hasCallback = hasSymbolTypeCallback || hasSymbolSizeCallback || hasSymbolRotateCallback;
var seriesSymbol = (!hasSymbolTypeCallback && symbolType) ? symbolType : defaultSymbolType;
var seriesSymbolSize = !hasSymbolSizeCallback ? symbolSize : null;
-
data.setVisual({
legendSymbol: legendSymbol || seriesSymbol,
// If seting callback functions on `symbol` or `symbolSize`, for simplicity and avoiding
@@ -39510,7 +39637,8 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
// some cases but generally it is not recommanded.
symbol: seriesSymbol,
symbolSize: seriesSymbolSize,
- symbolKeepAspect: keepAspect
+ symbolKeepAspect: keepAspect,
+ symbolRotate: symbolRotate
});
// Only visible series has each data be visual encoded
@@ -39524,12 +39652,14 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
var params = seriesModel.getDataParams(idx);
hasSymbolTypeCallback && data.setItemVisual(idx, 'symbol', symbolType(rawValue, params));
hasSymbolSizeCallback && data.setItemVisual(idx, 'symbolSize', symbolSize(rawValue, params));
+ hasSymbolRotateCallback && data.setItemVisual(idx, 'symbolRotate', symbolRotate(rawValue, params));
}
if (data.hasItemOption) {
var itemModel = data.getItemModel(idx);
var itemSymbolType = itemModel.getShallow('symbol', true);
var itemSymbolSize = itemModel.getShallow('symbolSize', true);
+ var itemSymbolRotate = itemModel.getShallow('symbolRotate', true);
var itemSymbolKeepAspect = itemModel.getShallow('symbolKeepAspect', true);
// If has item symbol
@@ -39540,6 +39670,9 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
// PENDING Transform symbolSize ?
data.setItemVisual(idx, 'symbolSize', itemSymbolSize);
}
+ if (itemSymbolRotate != null) {
+ data.setItemVisual(idx, 'symbolRotate', itemSymbolRotate);
+ }
if (itemSymbolKeepAspect != null) {
data.setItemVisual(idx, 'symbolKeepAspect', itemSymbolKeepAspect);
}
@@ -43415,6 +43548,7 @@ extendChartView({
var drawBackground = seriesModel.get('showBackground', true);
var backgroundModel = seriesModel.getModel('backgroundStyle');
+ var barBorderRadius = backgroundModel.get('barBorderRadius') || 0;
var bgEls = [];
var oldBgEls = this._backgroundEls || [];
@@ -43425,8 +43559,13 @@ extendChartView({
var layout = getLayout[coord.type](data, dataIndex, itemModel);
if (drawBackground) {
- var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, layout);
+ var bgLayout = getLayout[coord.type](data, dataIndex);
+ var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, bgLayout);
bgEl.useStyle(backgroundModel.getBarItemStyle());
+ // Only cartesian2d support borderRadius.
+ if (coord.type === 'cartesian2d') {
+ bgEl.setShape('r', barBorderRadius);
+ }
bgEls[dataIndex] = bgEl;
}
@@ -43463,9 +43602,14 @@ extendChartView({
if (drawBackground) {
var bgEl = oldBgEls[oldIndex];
bgEl.useStyle(backgroundModel.getBarItemStyle());
+ // Only cartesian2d support borderRadius.
+ if (coord.type === 'cartesian2d') {
+ bgEl.setShape('r', barBorderRadius);
+ }
bgEls[newIndex] = bgEl;
- var shape = createBackgroundShape(isHorizontalOrRadial, layout, coord);
+ var bgLayout = getLayout[coord.type](data, newIndex);
+ var shape = createBackgroundShape(isHorizontalOrRadial, bgLayout, coord);
updateProps(bgEl, { shape: shape }, animationModel, newIndex);
}
@@ -43715,9 +43859,11 @@ function removeSector(dataIndex, animationModel, el) {
}
var getLayout = {
+ // itemModel is only used to get borderWidth, which is not needed
+ // when calculating bar background layout.
cartesian2d: function (data, dataIndex, itemModel) {
var layout = data.getItemLayout(dataIndex);
- var fixedLineWidth = getLineWidth(itemModel, layout);
+ var fixedLineWidth = itemModel ? getLineWidth(itemModel, layout) : 0;
// fix layout with lineWidth
var signX = layout.width > 0 ? 1 : -1;
@@ -44591,31 +44737,36 @@ piePieceProto.updateData = function (data, idx, firstCreate) {
var withAnimation = !firstCreate && animationTypeUpdate === 'transition';
this._updateLabel(data, idx, withAnimation);
- this.highDownOnUpdate = (itemModel.get('hoverAnimation') && seriesModel.isAnimationEnabled())
+ this.highDownOnUpdate = !seriesModel.get('silent')
? function (fromState, toState) {
+ var hasAnimation = seriesModel.isAnimationEnabled() && itemModel.get('hoverAnimation');
if (toState === 'emphasis') {
labelLine.ignore = labelLine.hoverIgnore;
labelText.ignore = labelText.hoverIgnore;
// Sector may has animation of updating data. Force to move to the last frame
// Or it may stopped on the wrong shape
- sector.stopAnimation(true);
- sector.animateTo({
- shape: {
- r: layout.r + seriesModel.get('hoverOffset')
- }
- }, 300, 'elasticOut');
+ if (hasAnimation) {
+ sector.stopAnimation(true);
+ sector.animateTo({
+ shape: {
+ r: layout.r + seriesModel.get('hoverOffset')
+ }
+ }, 300, 'elasticOut');
+ }
}
else {
labelLine.ignore = labelLine.normalIgnore;
labelText.ignore = labelText.normalIgnore;
- sector.stopAnimation(true);
- sector.animateTo({
- shape: {
- r: layout.r
- }
- }, 300, 'elasticOut');
+ if (hasAnimation) {
+ sector.stopAnimation(true);
+ sector.animateTo({
+ shape: {
+ r: layout.r
+ }
+ }, 300, 'elasticOut');
+ }
}
}
: null;
@@ -49575,7 +49726,7 @@ extendComponentView({
var dataModel = el.dataModel || seriesModel;
var dataIndex = el.dataIndex;
var dataType = el.dataType;
- var data = dataModel.getData();
+ var data = dataModel.getData(dataType);
var tooltipModel = buildTooltipModel([
data.getItemModel(dataIndex),
@@ -51920,12 +52071,12 @@ extendComponentView({
if (link) {
textEl.on('click', function () {
- window.open(link, '_' + titleModel.get('target'));
+ windowOpen(link, '_' + titleModel.get('target'));
});
}
if (sublink) {
subTextEl.on('click', function () {
- window.open(sublink, '_' + titleModel.get('subtarget'));
+ windowOpen(link, '_' + titleModel.get('subtarget'));
});
}
@@ -53415,9 +53566,13 @@ lineDrawProto.incrementalPrepareUpdate = function (lineData) {
this.group.removeAll();
};
+function isEffectObject(el) {
+ return el.animators && el.animators.length > 0;
+}
+
lineDrawProto.incrementalUpdate = function (taskParams, lineData) {
function updateIncrementalAndHover(el) {
- if (!el.isGroup) {
+ if (!el.isGroup && !isEffectObject(el)) {
el.incremental = el.useHoverLayer = true;
}
}
@@ -57925,7 +58080,7 @@ extendComponentView({
var feature;
// FIX#11236, merge feature title from MagicType newOption. TODO: consider seriesIndex ?
- if (payload && payload.newTitle != null) {
+ if (payload && payload.newTitle != null && payload.featureName === featureName) {
featureOpt.title = payload.newTitle;
}
@@ -58198,7 +58353,8 @@ var proto$2 = SaveAsImage.prototype;
proto$2.onclick = function (ecModel, api) {
var model = this.model;
var title = model.get('name') || ecModel.get('title.0.text') || 'echarts';
- var type = model.get('type', true) || 'png';
+ var isSvg = api.getZr().painter.getType() === 'svg';
+ var type = isSvg ? 'svg' : model.get('type', true) || 'png';
var url = api.getConnectedDataURL({
type: type,
backgroundColor: model.get('backgroundColor', true)
@@ -58425,7 +58581,8 @@ proto$3.onclick = function (ecModel, api, type) {
type: 'changeMagicType',
currentType: type,
newOption: newOption,
- newTitle: newTitle
+ newTitle: newTitle,
+ featureName: 'magicType'
});
};
@@ -63954,11 +64111,16 @@ var SVGPainter = function (root, storage, opts, zrId) {
this.storage = storage;
this._opts = opts = extend({}, opts || {});
- var svgRoot = createElement('svg');
- svgRoot.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
- svgRoot.setAttribute('version', '1.1');
- svgRoot.setAttribute('baseProfile', 'full');
- svgRoot.style.cssText = 'user-select:none;position:absolute;left:0;top:0;';
+ var svgDom = createElement('svg');
+ svgDom.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
+ svgDom.setAttribute('version', '1.1');
+ svgDom.setAttribute('baseProfile', 'full');
+ svgDom.style.cssText = 'user-select:none;position:absolute;left:0;top:0;';
+
+ var bgRoot = createElement('g');
+ svgDom.appendChild(bgRoot);
+ var svgRoot = createElement('g');
+ svgDom.appendChild(svgRoot);
this.gradientManager = new GradientManager(zrId, svgRoot);
this.clipPathManager = new ClippathManager(zrId, svgRoot);
@@ -63967,11 +64129,13 @@ var SVGPainter = function (root, storage, opts, zrId) {
var viewport = document.createElement('div');
viewport.style.cssText = 'overflow:hidden;position:relative';
+ this._svgDom = svgDom;
this._svgRoot = svgRoot;
+ this._backgroundRoot = bgRoot;
this._viewport = viewport;
root.appendChild(viewport);
- viewport.appendChild(svgRoot);
+ viewport.appendChild(svgDom);
this.resize(opts.width, opts.height);
@@ -63990,6 +64154,14 @@ SVGPainter.prototype = {
return this._viewport;
},
+ getSvgDom: function () {
+ return this._svgDom;
+ },
+
+ getSvgRoot: function () {
+ return this._svgRoot;
+ },
+
getViewportRootOffset: function () {
var viewportRoot = this.getViewportRoot();
if (viewportRoot) {
@@ -64009,7 +64181,21 @@ SVGPainter.prototype = {
setBackgroundColor: function (backgroundColor) {
// TODO gradient
- this._viewport.style.background = backgroundColor;
+ // Insert a bg rect instead of setting background to viewport.
+ // Otherwise, the exported SVG don't have background.
+ if (this._backgroundRoot && this._backgroundNode) {
+ this._backgroundRoot.removeChild(this._backgroundNode);
+ }
+
+ var bgNode = createElement('rect');
+ bgNode.setAttribute('width', this.getWidth());
+ bgNode.setAttribute('height', this.getHeight());
+ bgNode.setAttribute('x', 0);
+ bgNode.setAttribute('y', 0);
+ bgNode.setAttribute('id', 0);
+ bgNode.style.fill = backgroundColor;
+ this._backgroundRoot.appendChild(bgNode);
+ this._backgroundNode = bgNode;
},
_paintList: function (list) {
@@ -64139,8 +64325,8 @@ SVGPainter.prototype = {
},
_getDefs: function (isForceCreating) {
- var svgRoot = this._svgRoot;
- var defs = this._svgRoot.getElementsByTagName('defs');
+ var svgRoot = this._svgDom;
+ var defs = svgRoot.getElementsByTagName('defs');
if (defs.length === 0) {
// Not exist
if (isForceCreating) {
@@ -64197,11 +64383,16 @@ SVGPainter.prototype = {
viewportStyle.width = width + 'px';
viewportStyle.height = height + 'px';
- var svgRoot = this._svgRoot;
+ var svgRoot = this._svgDom;
// Set width by 'svgRoot.width = width' is invalid
svgRoot.setAttribute('width', width);
svgRoot.setAttribute('height', height);
}
+
+ if (this._backgroundNode) {
+ this._backgroundNode.setAttribute('width', width);
+ this._backgroundNode.setAttribute('height', height);
+ }
},
/**
@@ -64243,10 +64434,13 @@ SVGPainter.prototype = {
dispose: function () {
this.root.innerHTML = '';
- this._svgRoot =
- this._viewport =
- this.storage =
- null;
+ this._svgRoot
+ = this._backgroundRoot
+ = this._svgDom
+ = this._backgroundNode
+ = this._viewport
+ = this.storage
+ = null;
},
clear: function () {
@@ -64255,9 +64449,9 @@ SVGPainter.prototype = {
}
},
- pathToDataUrl: function () {
+ toDataURL: function () {
this.refresh();
- var html = this._svgRoot.outerHTML;
+ var html = encodeURIComponent(this._svgDom.outerHTML.replace(/></g, '>\n\r<'));
return 'data:image/svg+xml;charset=UTF-8,' + html;
}
};
@@ -64273,7 +64467,7 @@ function createMethodNotSupport$1(method) {
each$1([
'getLayer', 'insertLayer', 'eachLayer', 'eachBuiltinLayer',
'eachOtherLayer', 'getLayers', 'modLayer', 'delLayer', 'clearLayer',
- 'toDataURL', 'pathToImage'
+ 'pathToImage'
], function (name) {
SVGPainter.prototype[name] = createMethodNotSupport$1(name);
});
diff --git a/en/dist/echarts.common.min.js b/en/dist/echarts.common.min.js
index 0d97001..54d93ec 100644
--- a/en/dist/echarts.common.min.js
+++ b/en/dist/echarts.common.min.js
@@ -19,4 +19,4 @@
*/
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,i=function(){return e++},v="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasS [...]
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,i=function(){return e++},v="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasS [...]
diff --git a/en/dist/echarts.js b/en/dist/echarts.js
index 49a2582..dd55582 100644
--- a/en/dist/echarts.js
+++ b/en/dist/echarts.js
@@ -10252,6 +10252,10 @@ Painter.prototype = {
if (this._layerConfig[zlevel]) {
merge(layer, this._layerConfig[zlevel], true);
}
+ // TODO Remove EL_AFTER_INCREMENTAL_INC magic number
+ else if (this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC]) {
+ merge(layer, this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC], true);
+ }
if (virtual) {
layer.virtual = virtual;
@@ -10404,12 +10408,26 @@ Painter.prototype = {
var prevLayer = null;
var incrementalLayerCount = 0;
+ var prevZlevel;
for (var i = 0; i < list.length; i++) {
var el = list[i];
var zlevel = el.zlevel;
var layer;
- // PENDING If change one incremental element style ?
- // TODO Where there are non-incremental elements between incremental elements.
+
+ if (prevZlevel !== zlevel) {
+ prevZlevel = zlevel;
+ incrementalLayerCount = 0;
+ }
+
+ // TODO Not use magic number on zlevel.
+
+ // Each layer with increment element can be separated to 3 layers.
+ // (Other Element drawn after incremental element)
+ // -----------------zlevel + EL_AFTER_INCREMENTAL_INC--------------------
+ // (Incremental element)
+ // ----------------------zlevel + INCREMENTAL_INC------------------------
+ // (Element drawn before incremental element)
+ // --------------------------------zlevel--------------------------------
if (el.incremental) {
layer = this.getLayer(zlevel + INCREMENTAL_INC, this._needsManuallyCompositing);
layer.incremental = true;
@@ -10504,6 +10522,7 @@ Painter.prototype = {
for (var i = 0; i < this._zlevelList.length; i++) {
var _zlevel = this._zlevelList[i];
+ // TODO Remove EL_AFTER_INCREMENTAL_INC magic number
if (_zlevel === zlevel || _zlevel === zlevel + EL_AFTER_INCREMENTAL_INC) {
var layer = this._layers[_zlevel];
merge(layer, layerConfig[zlevel], true);
@@ -11576,7 +11595,7 @@ var instances$1 = {}; // ZRender实例map索引
/**
* @type {string}
*/
-var version$1 = '4.3.0';
+var version$1 = '4.3.1';
/**
* Initializing a zrender instance
@@ -17838,11 +17857,13 @@ function getHighlightDigit(highlightKey) {
* @param {Object} opt Check `opt` of `setTextStyleCommon` to find other props.
* @param {string|Function} [opt.defaultText]
* @param {module:echarts/model/Model} [opt.labelFetcher] Fetch text by
- * `opt.labelFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex)`
- * @param {module:echarts/model/Model} [opt.labelDataIndex] Fetch text by
- * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex)`
- * @param {module:echarts/model/Model} [opt.labelDimIndex] Fetch text by
- * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex)`
+ * `opt.labelFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
+ * @param {number} [opt.labelDataIndex] Fetch text by
+ * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
+ * @param {number} [opt.labelDimIndex] Fetch text by
+ * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
+ * @param {string} [opt.labelProp] Fetch text by
+ * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
* @param {Object} [normalSpecified]
* @param {Object} [emphasisSpecified]
*/
@@ -17856,6 +17877,7 @@ function setLabelStyle(
var labelFetcher = opt.labelFetcher;
var labelDataIndex = opt.labelDataIndex;
var labelDimIndex = opt.labelDimIndex;
+ var labelProp = opt.labelProp;
// This scenario, `label.normal.show = true; label.emphasis.show = false`,
// is not supported util someone requests.
@@ -17869,7 +17891,7 @@ function setLabelStyle(
var baseText;
if (showNormal || showEmphasis) {
if (labelFetcher) {
- baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex);
+ baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex, labelProp);
}
if (baseText == null) {
baseText = isFunction$1(opt.defaultText) ? opt.defaultText(labelDataIndex, opt) : opt.defaultText;
@@ -17879,7 +17901,7 @@ function setLabelStyle(
var emphasisStyleText = showEmphasis
? retrieve2(
labelFetcher
- ? labelFetcher.getFormattedLabel(labelDataIndex, 'emphasis', null, labelDimIndex)
+ ? labelFetcher.getFormattedLabel(labelDataIndex, 'emphasis', null, labelDimIndex, labelProp)
: null,
baseText
)
@@ -19790,7 +19812,7 @@ var number = (Object.freeze || Object)({
// import Text from 'zrender/src/graphic/Text';
/**
- * 每三位默认加,格式化
+ * add commas after every three numbers
* @param {string|number} x
* @return {string}
*/
@@ -20043,6 +20065,22 @@ function getTextRect(
);
}
+/**
+ * open new tab
+ * @param {string} link url
+ * @param {string} target blank or self
+ */
+function windowOpen(link, target) {
+ if (target === '_blank' || target === 'blank') {
+ var blank = window.open();
+ blank.opener = null;
+ blank.location = link;
+ }
+ else {
+ window.open(link, target);
+ }
+}
+
var format = (Object.freeze || Object)({
addCommas: addCommas,
@@ -20056,7 +20094,8 @@ var format = (Object.freeze || Object)({
capitalFirst: capitalFirst,
truncateText: truncateText$1,
getTextBoundingRect: getTextBoundingRect,
- getTextRect: getTextRect
+ getTextRect: getTextRect,
+ windowOpen: windowOpen
});
/*
@@ -25060,7 +25099,7 @@ function dataTaskReset(context) {
function dataTaskProgress(param, context) {
// Avoid repead cloneShallow when data just created in reset.
- if (param.end > context.outputData.count()) {
+ if (context.outputData && param.end > context.outputData.count()) {
context.model.getRawData().cloneShallow(context.outputData);
}
}
@@ -26040,11 +26079,16 @@ var loadingDefault = function (api, opts) {
opts = opts || {};
defaults(opts, {
text: 'loading',
- color: '#c23531',
textColor: '#000',
+ fontSize: '12px',
maskColor: 'rgba(255, 255, 255, 0.8)',
+ showSpinner: true,
+ color: '#c23531',
+ spinnerRadius: 10,
+ lineWidth: 5,
zlevel: 0
});
+ var group = new Group();
var mask = new Rect({
style: {
fill: opts.maskColor
@@ -26052,24 +26096,13 @@ var loadingDefault = function (api, opts) {
zlevel: opts.zlevel,
z: 10000
});
- var arc = new Arc({
- shape: {
- startAngle: -PI$1 / 2,
- endAngle: -PI$1 / 2 + 0.1,
- r: 10
- },
- style: {
- stroke: opts.color,
- lineCap: 'round',
- lineWidth: 5
- },
- zlevel: opts.zlevel,
- z: 10001
- });
+ group.add(mask);
+ var font = opts.fontSize + ' sans-serif';
var labelRect = new Rect({
style: {
fill: 'none',
text: opts.text,
+ font: font,
textPosition: 'right',
textDistance: 10,
textFill: opts.textColor
@@ -26077,32 +26110,49 @@ var loadingDefault = function (api, opts) {
zlevel: opts.zlevel,
z: 10001
});
-
- arc.animateShape(true)
- .when(1000, {
- endAngle: PI$1 * 3 / 2
- })
- .start('circularInOut');
- arc.animateShape(true)
- .when(1000, {
- startAngle: PI$1 * 3 / 2
- })
- .delay(300)
- .start('circularInOut');
-
- var group = new Group();
- group.add(arc);
group.add(labelRect);
- group.add(mask);
+ if (opts.showSpinner) {
+ var arc = new Arc({
+ shape: {
+ startAngle: -PI$1 / 2,
+ endAngle: -PI$1 / 2 + 0.1,
+ r: opts.spinnerRadius
+ },
+ style: {
+ stroke: opts.color,
+ lineCap: 'round',
+ lineWidth: opts.lineWidth
+ },
+ zlevel: opts.zlevel,
+ z: 10001
+ });
+ arc.animateShape(true)
+ .when(1000, {
+ endAngle: PI$1 * 3 / 2
+ })
+ .start('circularInOut');
+ arc.animateShape(true)
+ .when(1000, {
+ startAngle: PI$1 * 3 / 2
+ })
+ .delay(300)
+ .start('circularInOut');
+ group.add(arc);
+ }
// Inject resize
group.resize = function () {
- var cx = api.getWidth() / 2;
+ var textWidth = getWidth(opts.text, font);
+ var r = opts.showSpinner ? opts.spinnerRadius : 0;
+ // cx = (containerWidth - arcDiameter - textDistance - textWidth) / 2
+ // textDistance needs to be calculated when both animation and text exist
+ var cx = (api.getWidth() - r * 2 - (opts.showSpinner && textWidth ? 10 : 0) - textWidth) / 2
+ // only show the text
+ - (opts.showSpinner ? 0 : textWidth / 2);
var cy = api.getHeight() / 2;
- arc.setShape({
+ opts.showSpinner && arc.setShape({
cx: cx,
cy: cy
});
- var r = arc.shape.r;
labelRect.setShape({
x: cx - r,
y: cy - r,
@@ -27762,10 +27812,10 @@ var isFunction = isFunction$1;
var isObject = isObject$1;
var parseClassType = ComponentModel.parseClassType;
-var version = '4.7.0';
+var version = '4.8.0';
var dependencies = {
- zrender: '4.3.0'
+ zrender: '4.3.1'
};
var TEST_FRAME_REMAIN_TIME = 1;
@@ -28184,7 +28234,7 @@ echartsProto.getRenderedCanvas = function (opts) {
* Get svg data url
* @return {string}
*/
-echartsProto.getSvgDataUrl = function () {
+echartsProto.getSvgDataURL = function () {
if (!env$1.svgSupported) {
return;
}
@@ -28196,7 +28246,7 @@ echartsProto.getSvgDataUrl = function () {
el.stopAnimation(true);
});
- return zr.painter.pathToDataUrl();
+ return zr.painter.toDataURL();
};
/**
@@ -28232,7 +28282,7 @@ echartsProto.getDataURL = function (opts) {
});
var url = this._zr.painter.getType() === 'svg'
- ? this.getSvgDataUrl()
+ ? this.getSvgDataURL()
: this.getRenderedCanvas(opts).toDataURL(
'image/' + (opts && opts.type || 'png')
);
@@ -28261,6 +28311,7 @@ echartsProto.getConnectedDataURL = function (opts) {
if (!env$1.canvasSupported) {
return;
}
+ var isSvg = opts.type === 'svg';
var groupId = this.group;
var mathMin = Math.min;
var mathMax = Math.max;
@@ -28275,9 +28326,9 @@ echartsProto.getConnectedDataURL = function (opts) {
each$1(instances, function (chart, id) {
if (chart.group === groupId) {
- var canvas = chart.getRenderedCanvas(
- clone(opts)
- );
+ var canvas = isSvg
+ ? chart.getZr().painter.getSvgDom().innerHTML
+ : chart.getRenderedCanvas(clone(opts));
var boundingRect = chart.getDom().getBoundingClientRect();
left = mathMin(boundingRect.left, left);
top = mathMin(boundingRect.top, top);
@@ -28298,38 +28349,61 @@ echartsProto.getConnectedDataURL = function (opts) {
var width = right - left;
var height = bottom - top;
var targetCanvas = createCanvas();
- targetCanvas.width = width;
- targetCanvas.height = height;
- var zr = init$1(targetCanvas);
+ var zr = init$1(targetCanvas, {
+ renderer: isSvg ? 'svg' : 'canvas'
+ });
+ zr.resize({
+ width: width,
+ height: height
+ });
- // Background between the charts
- if (opts.connectedBackgroundColor) {
- zr.add(new Rect({
- shape: {
- x: 0,
- y: 0,
- width: width,
- height: height
- },
- style: {
- fill: opts.connectedBackgroundColor
- }
- }));
+ if (isSvg) {
+ var content = '';
+ each(canvasList, function (item) {
+ var x = item.left - left;
+ var y = item.top - top;
+ content += '<g transform="translate(' + x + ','
+ + y + ')">' + item.dom + '</g>';
+ });
+ zr.painter.getSvgRoot().innerHTML = content;
+
+ if (opts.connectedBackgroundColor) {
+ zr.painter.setBackgroundColor(opts.connectedBackgroundColor);
+ }
+
+ zr.refreshImmediately();
+ return zr.painter.toDataURL();
}
+ else {
+ // Background between the charts
+ if (opts.connectedBackgroundColor) {
+ zr.add(new Rect({
+ shape: {
+ x: 0,
+ y: 0,
+ width: width,
+ height: height
+ },
+ style: {
+ fill: opts.connectedBackgroundColor
+ }
+ }));
+ }
- each(canvasList, function (item) {
- var img = new ZImage({
- style: {
- x: item.left * dpr - left,
- y: item.top * dpr - top,
- image: item.dom
- }
+ each(canvasList, function (item) {
+ var img = new ZImage({
+ style: {
+ x: item.left * dpr - left,
+ y: item.top * dpr - top,
+ image: item.dom
+ }
+ });
+ zr.add(img);
});
- zr.add(img);
- });
- zr.refreshImmediately();
- return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png'));
+ zr.refreshImmediately();
+ return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png'));
+ }
}
else {
return this.getDataURL(opts);
@@ -34764,9 +34838,11 @@ var largeLayout = {
coord = cartesian.dataToPoint(valuePair, null, coord);
// Data index might not be in order, depends on `progressiveChunkMode`.
- largeBackgroundPoints[pointsOffset] = valueAxisHorizontal ? coordLayout.x + coordLayout.width : coord[0];
+ largeBackgroundPoints[pointsOffset] = valueAxisHorizontal
+ ? coordLayout.x + coordLayout.width : coord[0];
largePoints[pointsOffset++] = coord[0];
- largeBackgroundPoints[pointsOffset] = valueAxisHorizontal ? coord[1] : coordLayout.y + coordLayout.height;
+ largeBackgroundPoints[pointsOffset] = valueAxisHorizontal
+ ? coord[1] : coordLayout.y + coordLayout.height;
largePoints[pointsOffset++] = coord[1];
largeDataIndices[idxOffset++] = dataIndex;
}
@@ -35256,8 +35332,6 @@ function getScaleExtent(scale, model) {
var min = model.getMin();
var max = model.getMax();
- var fixMin = min != null;
- var fixMax = max != null;
var originalExtent = scale.getExtent();
var axisDataLen;
@@ -35301,17 +35375,6 @@ function getScaleExtent(scale, model) {
// (2) When `needCrossZero` and all data is positive/negative, should it be ensured
// that the results processed by boundaryGap are positive/negative?
- if (min == null) {
- min = scaleType === 'ordinal'
- ? (axisDataLen ? 0 : NaN)
- : originalExtent[0] - boundaryGap[0] * span;
- }
- if (max == null) {
- max = scaleType === 'ordinal'
- ? (axisDataLen ? axisDataLen - 1 : NaN)
- : originalExtent[1] + boundaryGap[1] * span;
- }
-
if (min === 'dataMin') {
min = originalExtent[0];
}
@@ -35332,6 +35395,20 @@ function getScaleExtent(scale, model) {
});
}
+ var fixMin = min != null;
+ var fixMax = max != null;
+
+ if (min == null) {
+ min = scaleType === 'ordinal'
+ ? (axisDataLen ? 0 : NaN)
+ : originalExtent[0] - boundaryGap[0] * span;
+ }
+ if (max == null) {
+ max = scaleType === 'ordinal'
+ ? (axisDataLen ? axisDataLen - 1 : NaN)
+ : originalExtent[1] + boundaryGap[1] * span;
+ }
+
(min == null || !isFinite(min)) && (min = NaN);
(max == null || !isFinite(max)) && (max = NaN);
@@ -35382,7 +35459,13 @@ function getScaleExtent(scale, model) {
}
}
- return [min, max];
+ return {
+ extent: [min, max],
+ // "fix" means "fixed", the value should not be
+ // changed in the subsequent steps.
+ fixMin: fixMin,
+ fixMax: fixMax
+ };
}
function adjustScaleForOverflow(min, max, model, barWidthAndOffset) {
@@ -35421,9 +35504,9 @@ function adjustScaleForOverflow(min, max, model, barWidthAndOffset) {
}
function niceScaleExtent(scale, model) {
- var extent = getScaleExtent(scale, model);
- var fixMin = model.getMin() != null;
- var fixMax = model.getMax() != null;
+ var extentInfo = getScaleExtent(scale, model);
+ var extent = extentInfo.extent;
+
var splitNumber = model.get('splitNumber');
if (scale.type === 'log') {
@@ -35434,8 +35517,8 @@ function niceScaleExtent(scale, model) {
scale.setExtent(extent[0], extent[1]);
scale.niceExtent({
splitNumber: splitNumber,
- fixMin: fixMin,
- fixMax: fixMax,
+ fixMin: extentInfo.fixMin,
+ fixMax: extentInfo.fixMax,
minInterval: (scaleType === 'interval' || scaleType === 'time')
? model.get('minInterval') : null,
maxInterval: (scaleType === 'interval' || scaleType === 'time')
@@ -36468,9 +36551,10 @@ function decodePolygon(coordinate, encodeOffsets, encodeScale) {
/**
* @alias module:echarts/coord/geo/parseGeoJson
* @param {Object} geoJson
+ * @param {string} nameProperty
* @return {module:zrender/container/Group}
*/
-var parseGeoJson$1 = function (geoJson) {
+var parseGeoJson$1 = function (geoJson, nameProperty) {
decode(geoJson);
@@ -36508,7 +36592,7 @@ var parseGeoJson$1 = function (geoJson) {
}
var region = new Region(
- properties.name,
+ properties[nameProperty || 'name'],
geometries,
properties.cp
);
@@ -37705,7 +37789,6 @@ symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {
var itemStyle = seriesScope && seriesScope.itemStyle;
var hoverItemStyle = seriesScope && seriesScope.hoverItemStyle;
- var symbolRotate = seriesScope && seriesScope.symbolRotate;
var symbolOffset = seriesScope && seriesScope.symbolOffset;
var labelModel = seriesScope && seriesScope.labelModel;
var hoverLabelModel = seriesScope && seriesScope.hoverLabelModel;
@@ -37721,7 +37804,6 @@ symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {
itemStyle = itemModel.getModel(normalStyleAccessPath).getItemStyle(['color']);
hoverItemStyle = itemModel.getModel(emphasisStyleAccessPath).getItemStyle();
- symbolRotate = itemModel.getShallow('symbolRotate');
symbolOffset = itemModel.getShallow('symbolOffset');
labelModel = itemModel.getModel(normalLabelAccessPath);
@@ -37735,6 +37817,8 @@ symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {
var elStyle = symbolPath.style;
+ var symbolRotate = data.getItemVisual(idx, 'symbolRotate');
+
symbolPath.attr('rotation', (symbolRotate || 0) * Math.PI / 180 || 0);
if (symbolOffset) {
@@ -38790,6 +38874,10 @@ function createGridClipPath(cartesian, hasAnimation, seriesModel) {
width += lineWidth;
height += lineWidth;
+ // fix: https://github.com/apache/incubator-echarts/issues/11369
+ x = Math.floor(x);
+ width = Math.round(width);
+
var clipPath = new Rect({
shape: {
x: x,
@@ -38887,6 +38975,26 @@ function isPointsSame(points1, points2) {
return true;
}
+function getBoundingDiff(points1, points2) {
+ var min1 = [];
+ var max1 = [];
+
+ var min2 = [];
+ var max2 = [];
+
+ fromPoints(points1, min1, max1);
+ fromPoints(points2, min2, max2);
+
+ // Get a max value from each corner of two boundings.
+ return Math.max(
+ Math.abs(min1[0] - min2[0]),
+ Math.abs(min1[1] - min2[1]),
+
+ Math.abs(max1[0] - max2[0]),
+ Math.abs(max1[1] - max2[1])
+ );
+}
+
function getSmooth(smooth) {
return typeof (smooth) === 'number' ? smooth : (smooth ? 0.5 : 0);
}
@@ -39499,6 +39607,24 @@ Chart.extend({
next = turnPointsIntoStep(diff.next, coordSys, step);
stackedOnNext = turnPointsIntoStep(diff.stackedOnNext, coordSys, step);
}
+ // Don't apply animation if diff is large.
+ // For better result and avoid memory explosion problems like
+ // https://github.com/apache/incubator-echarts/issues/12229
+ if (getBoundingDiff(current, next) > 3000
+ || (polygon && getBoundingDiff(stackedOnCurrent, stackedOnNext) > 3000)
+ ) {
+ polyline.setShape({
+ points: next
+ });
+ if (polygon) {
+ polygon.setShape({
+ points: next,
+ stackedOnPoints: stackedOnNext
+ });
+ }
+ return;
+ }
+
// `diff.current` is subset of `current` (which should be ensured by
// turnPointsIntoStep), so points in `__points` can be updated when
// points in `current` are update during animation.
@@ -39605,13 +39731,14 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
var symbolType = seriesModel.get('symbol');
var symbolSize = seriesModel.get('symbolSize');
var keepAspect = seriesModel.get('symbolKeepAspect');
+ var symbolRotate = seriesModel.get('symbolRotate');
var hasSymbolTypeCallback = isFunction$1(symbolType);
var hasSymbolSizeCallback = isFunction$1(symbolSize);
- var hasCallback = hasSymbolTypeCallback || hasSymbolSizeCallback;
+ var hasSymbolRotateCallback = isFunction$1(symbolRotate);
+ var hasCallback = hasSymbolTypeCallback || hasSymbolSizeCallback || hasSymbolRotateCallback;
var seriesSymbol = (!hasSymbolTypeCallback && symbolType) ? symbolType : defaultSymbolType;
var seriesSymbolSize = !hasSymbolSizeCallback ? symbolSize : null;
-
data.setVisual({
legendSymbol: legendSymbol || seriesSymbol,
// If seting callback functions on `symbol` or `symbolSize`, for simplicity and avoiding
@@ -39620,7 +39747,8 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
// some cases but generally it is not recommanded.
symbol: seriesSymbol,
symbolSize: seriesSymbolSize,
- symbolKeepAspect: keepAspect
+ symbolKeepAspect: keepAspect,
+ symbolRotate: symbolRotate
});
// Only visible series has each data be visual encoded
@@ -39634,12 +39762,14 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
var params = seriesModel.getDataParams(idx);
hasSymbolTypeCallback && data.setItemVisual(idx, 'symbol', symbolType(rawValue, params));
hasSymbolSizeCallback && data.setItemVisual(idx, 'symbolSize', symbolSize(rawValue, params));
+ hasSymbolRotateCallback && data.setItemVisual(idx, 'symbolRotate', symbolRotate(rawValue, params));
}
if (data.hasItemOption) {
var itemModel = data.getItemModel(idx);
var itemSymbolType = itemModel.getShallow('symbol', true);
var itemSymbolSize = itemModel.getShallow('symbolSize', true);
+ var itemSymbolRotate = itemModel.getShallow('symbolRotate', true);
var itemSymbolKeepAspect = itemModel.getShallow('symbolKeepAspect', true);
// If has item symbol
@@ -39650,6 +39780,9 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
// PENDING Transform symbolSize ?
data.setItemVisual(idx, 'symbolSize', itemSymbolSize);
}
+ if (itemSymbolRotate != null) {
+ data.setItemVisual(idx, 'symbolRotate', itemSymbolRotate);
+ }
if (itemSymbolKeepAspect != null) {
data.setItemVisual(idx, 'symbolKeepAspect', itemSymbolKeepAspect);
}
@@ -43525,6 +43658,7 @@ extendChartView({
var drawBackground = seriesModel.get('showBackground', true);
var backgroundModel = seriesModel.getModel('backgroundStyle');
+ var barBorderRadius = backgroundModel.get('barBorderRadius') || 0;
var bgEls = [];
var oldBgEls = this._backgroundEls || [];
@@ -43535,8 +43669,13 @@ extendChartView({
var layout = getLayout[coord.type](data, dataIndex, itemModel);
if (drawBackground) {
- var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, layout);
+ var bgLayout = getLayout[coord.type](data, dataIndex);
+ var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, bgLayout);
bgEl.useStyle(backgroundModel.getBarItemStyle());
+ // Only cartesian2d support borderRadius.
+ if (coord.type === 'cartesian2d') {
+ bgEl.setShape('r', barBorderRadius);
+ }
bgEls[dataIndex] = bgEl;
}
@@ -43573,9 +43712,14 @@ extendChartView({
if (drawBackground) {
var bgEl = oldBgEls[oldIndex];
bgEl.useStyle(backgroundModel.getBarItemStyle());
+ // Only cartesian2d support borderRadius.
+ if (coord.type === 'cartesian2d') {
+ bgEl.setShape('r', barBorderRadius);
+ }
bgEls[newIndex] = bgEl;
- var shape = createBackgroundShape(isHorizontalOrRadial, layout, coord);
+ var bgLayout = getLayout[coord.type](data, newIndex);
+ var shape = createBackgroundShape(isHorizontalOrRadial, bgLayout, coord);
updateProps(bgEl, { shape: shape }, animationModel, newIndex);
}
@@ -43825,9 +43969,11 @@ function removeSector(dataIndex, animationModel, el) {
}
var getLayout = {
+ // itemModel is only used to get borderWidth, which is not needed
+ // when calculating bar background layout.
cartesian2d: function (data, dataIndex, itemModel) {
var layout = data.getItemLayout(dataIndex);
- var fixedLineWidth = getLineWidth(itemModel, layout);
+ var fixedLineWidth = itemModel ? getLineWidth(itemModel, layout) : 0;
// fix layout with lineWidth
var signX = layout.width > 0 ? 1 : -1;
@@ -44701,31 +44847,36 @@ piePieceProto.updateData = function (data, idx, firstCreate) {
var withAnimation = !firstCreate && animationTypeUpdate === 'transition';
this._updateLabel(data, idx, withAnimation);
- this.highDownOnUpdate = (itemModel.get('hoverAnimation') && seriesModel.isAnimationEnabled())
+ this.highDownOnUpdate = !seriesModel.get('silent')
? function (fromState, toState) {
+ var hasAnimation = seriesModel.isAnimationEnabled() && itemModel.get('hoverAnimation');
if (toState === 'emphasis') {
labelLine.ignore = labelLine.hoverIgnore;
labelText.ignore = labelText.hoverIgnore;
// Sector may has animation of updating data. Force to move to the last frame
// Or it may stopped on the wrong shape
- sector.stopAnimation(true);
- sector.animateTo({
- shape: {
- r: layout.r + seriesModel.get('hoverOffset')
- }
- }, 300, 'elasticOut');
+ if (hasAnimation) {
+ sector.stopAnimation(true);
+ sector.animateTo({
+ shape: {
+ r: layout.r + seriesModel.get('hoverOffset')
+ }
+ }, 300, 'elasticOut');
+ }
}
else {
labelLine.ignore = labelLine.normalIgnore;
labelText.ignore = labelText.normalIgnore;
- sector.stopAnimation(true);
- sector.animateTo({
- shape: {
- r: layout.r
- }
- }, 300, 'elasticOut');
+ if (hasAnimation) {
+ sector.stopAnimation(true);
+ sector.animateTo({
+ shape: {
+ r: layout.r
+ }
+ }, 300, 'elasticOut');
+ }
}
}
: null;
@@ -46478,7 +46629,7 @@ Radar.prototype.update = function (ecModel, api) {
}
// Force all the axis fixing the maxSplitNumber.
each$1(indicatorAxes, function (indicatorAxis, idx) {
- var rawExtent = getScaleExtent(indicatorAxis.scale, indicatorAxis.model);
+ var rawExtent = getScaleExtent(indicatorAxis.scale, indicatorAxis.model).extent;
niceScaleExtent(indicatorAxis.scale, indicatorAxis.model);
var axisModel = indicatorAxis.model;
@@ -47598,9 +47749,10 @@ var geoJSONLoader = {
/**
* @param {string} mapName
* @param {Object} mapRecord {specialAreas, geoJSON}
+ * @param {string} nameProperty
* @return {Object} {regions, boundingRect}
*/
- load: function (mapName, mapRecord) {
+ load: function (mapName, mapRecord, nameProperty) {
var parsed = inner$7(mapRecord).parsed;
@@ -47614,7 +47766,7 @@ var geoJSONLoader = {
// https://jsperf.com/try-catch-performance-overhead
try {
- regions = geoJSON ? parseGeoJson$1(geoJSON) : [];
+ regions = geoJSON ? parseGeoJson$1(geoJSON, nameProperty) : [];
}
catch (e) {
throw new Error('Invalid geoJson format\n' + e.message);
@@ -47822,9 +47974,10 @@ var geoSourceManager = {
/**
* @param {string} mapName
* @param {Object} nameMap
+ * @param {string} nameProperty
* @return {Object} source {regions, regionsMap, nameCoordMap, boundingRect}
*/
- load: function (mapName, nameMap) {
+ load: function (mapName, nameMap, nameProperty) {
var regions = [];
var regionsMap = createHashMap();
var nameCoordMap = createHashMap();
@@ -47832,7 +47985,7 @@ var geoSourceManager = {
var mapRecords = retrieveMap(mapName);
each$1(mapRecords, function (record) {
- var singleSource = loaders[record.type].load(mapName, record);
+ var singleSource = loaders[record.type].load(mapName, record, nameProperty);
each$1(singleSource.regions, function (region) {
var regionName = region.name;
@@ -47971,7 +48124,7 @@ var MapSeries = SeriesModel.extend({
});
}
- var geoSource = geoSourceManager.load(this.getMapType(), this.option.nameMap);
+ var geoSource = geoSourceManager.load(this.getMapType(), this.option.nameMap, this.option.nameProperty);
each$1(geoSource.regions, function (region) {
var name = region.name;
if (!dataNameMap.get(name)) {
@@ -48161,7 +48314,8 @@ var MapSeries = SeriesModel.extend({
itemStyle: {
areaColor: 'rgba(255,215,0,0.8)'
}
- }
+ },
+ nameProperty: 'name'
}
});
@@ -48771,9 +48925,25 @@ MapDraw.prototype = {
var group = this.group;
var transformInfo = geo.getTransformInfo();
- group.transform = transformInfo.roamTransform;
- group.decomposeTransform();
- group.dirty();
+ // No animation when first draw or in action
+ var isFirstDraw = !regionsGroup.childAt(0) || payload;
+ var targetScale;
+ if (isFirstDraw) {
+ group.transform = transformInfo.roamTransform;
+ group.decomposeTransform();
+ group.dirty();
+ }
+ else {
+ var target = new Transformable();
+ target.transform = transformInfo.roamTransform;
+ target.decomposeTransform();
+ var props = {
+ scale: target.scale,
+ position: target.position
+ };
+ targetScale = target.scale;
+ updateProps(group, props, mapOrGeoModel);
+ }
var scale = transformInfo.rawScale;
var position = transformInfo.rawPosition;
@@ -48915,6 +49085,12 @@ MapDraw.prototype = {
}
);
+ if (!isFirstDraw) {
+ // Text animation
+ var textScale = [1 / targetScale[0], 1 / targetScale[1]];
+ updateProps(textEl, { scale: textScale }, mapOrGeoModel);
+ }
+
regionGroup.add(textEl);
}
@@ -50822,11 +50998,14 @@ TreeNode.prototype = {
var hostTree = this.hostTree;
var itemModel = hostTree.data.getItemModel(this.dataIndex);
var levelModel = this.getLevelModel();
- var leavesModel;
- if (!levelModel && (this.children.length === 0 || (this.children.length !== 0 && this.isExpand === false))) {
- leavesModel = this.getLeavesModel();
+
+ // FIXME: refactor levelModel to "beforeLink", and remove levelModel here.
+ if (levelModel) {
+ return itemModel.getModel(path, levelModel.getModel(path));
+ }
+ else {
+ return itemModel.getModel(path);
}
- return itemModel.getModel(path, (levelModel || leavesModel || hostTree.hostModel).getModel(path));
},
/**
@@ -50837,13 +51016,6 @@ TreeNode.prototype = {
},
/**
- * @return {module:echarts/model/Model}
- */
- getLeavesModel: function () {
- return this.hostTree.leavesModel;
- },
-
- /**
* @example
* setItemVisual('color', color);
* setItemVisual({
@@ -50913,9 +51085,8 @@ TreeNode.prototype = {
* @alias module:echarts/data/Tree
* @param {module:echarts/model/Model} hostModel
* @param {Array.<Object>} levelOptions
- * @param {Object} leavesOption
*/
-function Tree(hostModel, levelOptions, leavesOption) {
+function Tree(hostModel, levelOptions) {
/**
* @type {module:echarts/data/Tree~TreeNode}
* @readOnly
@@ -50951,7 +51122,6 @@ function Tree(hostModel, levelOptions, leavesOption) {
return new Model(levelDefine, hostModel, hostModel.ecModel);
});
- this.leavesModel = new Model(leavesOption || {}, hostModel, hostModel.ecModel);
}
Tree.prototype = {
@@ -51043,12 +51213,11 @@ Tree.prototype = {
* @param {module:echarts/model/Model} hostModel
* @param {Object} treeOptions
* @param {Array.<Object>} treeOptions.levels
- * @param {Array.<Object>} treeOptions.leaves
* @return module:echarts/data/Tree
*/
Tree.createTree = function (dataRoot, hostModel, treeOptions, beforeLink) {
- var tree = new Tree(hostModel, treeOptions.levels, treeOptions.leaves);
+ var tree = new Tree(hostModel, treeOptions && treeOptions.levels);
var listData = [];
var dimMax = 1;
@@ -51085,6 +51254,8 @@ Tree.createTree = function (dataRoot, hostModel, treeOptions, beforeLink) {
var list = new List(dimensionsInfo, hostModel);
list.initData(listData);
+ beforeLink && beforeLink(list);
+
linkList({
mainData: list,
struct: tree,
@@ -51093,8 +51264,6 @@ Tree.createTree = function (dataRoot, hostModel, treeOptions, beforeLink) {
tree.update();
- beforeLink && beforeLink(list);
-
return tree;
};
@@ -51154,17 +51323,13 @@ SeriesModel.extend({
var root = {name: option.name, children: option.data};
var leaves = option.leaves || {};
+ var leavesModel = new Model(leaves, this, this.ecModel);
- var treeOption = {};
-
- treeOption.leaves = leaves;
-
- var tree = Tree.createTree(root, this, treeOption, beforeLink);
+ var tree = Tree.createTree(root, this, {}, beforeLink);
function beforeLink(nodeData) {
nodeData.wrapMethod('getItemModel', function (model, idx) {
var node = tree.getNodeByDataIndex(idx);
- var leavesModel = node.getLeavesModel();
if (!node.children.length || !node.isExpand) {
model.parentModel = leavesModel;
}
@@ -52779,15 +52944,25 @@ SeriesModel.extend({
var levels = option.levels || [];
levels = option.levels = setDefault(levels, ecModel);
-
- var treeOption = {};
-
- treeOption.levels = levels;
+ var levelModels = map(levels || [], function (levelDefine) {
+ return new Model(levelDefine, this, ecModel);
+ }, this);
// Make sure always a new tree is created when setOption,
// in TreemapView, we check whether oldTree === newTree
// to choose mappings approach among old shapes and new shapes.
- return Tree.createTree(root, this, treeOption).data;
+ var tree = Tree.createTree(root, this, null, beforeLink);
+
+ function beforeLink(nodeData) {
+ nodeData.wrapMethod('getItemModel', function (model, idx) {
+ var node = tree.getNodeByDataIndex(idx);
+ var levelModel = levelModels[node.depth];
+ levelModel && (model.parentModel = levelModel);
+ return model;
+ });
+ }
+
+ return tree.data;
},
optionUpdated: function () {
@@ -53798,7 +53973,7 @@ extendChartView({
var itemModel = node.hostTree.data.getItemModel(node.dataIndex);
var link = itemModel.get('link', true);
var linkTarget = itemModel.get('target', true) || 'blank';
- link && window.open(link, linkTarget);
+ link && windowOpen(link, linkTarget);
}
}
@@ -53988,7 +54163,7 @@ function renderNode(
// Background
var bg = giveGraphic('background', Rect$1, depth, Z_BG);
- bg && renderBackground(group, bg, isParent && thisLayout.upperHeight);
+ bg && renderBackground(group, bg, isParent && thisLayout.upperLabelHeight);
// No children, render content.
if (isParent) {
@@ -54109,16 +54284,7 @@ function renderNode(
}
function prepareText(normalStyle, emphasisStyle, visualColor, width, height, upperLabelRect) {
- var text = retrieve(
- seriesModel.getFormattedLabel(
- thisNode.dataIndex, 'normal', null, null, upperLabelRect ? 'upperLabel' : 'label'
- ),
- nodeModel.get('name')
- );
- if (!upperLabelRect && thisLayout.isLeafRoot) {
- var iconChar = seriesModel.get('drillDownIcon', true);
- text = iconChar ? iconChar + ' ' + text : text;
- }
+ var defaultText = nodeModel.get('name');
var normalLabelModel = nodeModel.getModel(
upperLabelRect ? PATH_UPPERLABEL_NORMAL : PATH_LABEL_NOAMAL
@@ -54132,12 +54298,18 @@ function renderNode(
setLabelStyle(
normalStyle, emphasisStyle, normalLabelModel, emphasisLabelModel,
{
- defaultText: isShow ? text : null,
+ defaultText: isShow ? defaultText : null,
autoColor: visualColor,
- isRectText: true
+ isRectText: true,
+ labelFetcher: seriesModel,
+ labelDataIndex: thisNode.dataIndex,
+ labelProp: upperLabelRect ? 'upperLabel' : 'label'
}
);
+ addDrillDownIcon(normalStyle, upperLabelRect, thisLayout);
+ addDrillDownIcon(emphasisStyle, upperLabelRect, thisLayout);
+
upperLabelRect && (normalStyle.textRect = clone(upperLabelRect));
normalStyle.truncate = (isShow && normalLabelModel.get('ellipsis'))
@@ -54149,6 +54321,14 @@ function renderNode(
: null;
}
+ function addDrillDownIcon(style, upperLabelRect, thisLayout) {
+ var text = style.text;
+ if (!upperLabelRect && thisLayout.isLeafRoot && text != null) {
+ var iconChar = seriesModel.get('drillDownIcon', true);
+ style.text = iconChar ? iconChar + ' ' + text : text;
+ }
+ }
+
function giveGraphic(storageName, Ctor, depth, z) {
var element = oldRawIndex != null && oldStorage[storageName][oldRawIndex];
var lasts = lastsForAnimation[storageName];
@@ -57319,9 +57499,13 @@ lineDrawProto.incrementalPrepareUpdate = function (lineData) {
this.group.removeAll();
};
+function isEffectObject(el) {
+ return el.animators && el.animators.length > 0;
+}
+
lineDrawProto.incrementalUpdate = function (taskParams, lineData) {
function updateIncrementalAndHover(el) {
- if (!el.isGroup) {
+ if (!el.isGroup && !isEffectObject(el)) {
el.incremental = el.useHoverLayer = true;
}
}
@@ -64371,7 +64555,13 @@ function relaxRightToLeft(nodesByBreadth, alpha, orient) {
each$1(nodes, function (node) {
if (node.outEdges.length) {
var y = sum(node.outEdges, weightedTarget, orient)
- / sum(node.outEdges, getEdgeValue, orient);
+ / sum(node.outEdges, getEdgeValue, orient);
+
+ if (isNaN(y)) {
+ var len = node.outEdges.length;
+ y = len ? sum(node.outEdges, centerTarget, orient) / len : 0;
+ }
+
if (orient === 'vertical') {
var nodeX = node.getLayout().x + (y - center$1(node, orient)) * alpha;
node.setLayout({x: nodeX}, true);
@@ -64388,10 +64578,16 @@ function relaxRightToLeft(nodesByBreadth, alpha, orient) {
function weightedTarget(edge, orient) {
return center$1(edge.node2, orient) * edge.getValue();
}
+function centerTarget(edge, orient) {
+ return center$1(edge.node2, orient);
+}
function weightedSource(edge, orient) {
return center$1(edge.node1, orient) * edge.getValue();
}
+function centerSource(edge, orient) {
+ return center$1(edge.node1, orient);
+}
function center$1(node, orient) {
return orient === 'vertical'
@@ -64427,8 +64623,15 @@ function relaxLeftToRight(nodesByBreadth, alpha, orient) {
each$1(nodesByBreadth, function (nodes) {
each$1(nodes, function (node) {
if (node.inEdges.length) {
+
var y = sum(node.inEdges, weightedSource, orient)
- / sum(node.inEdges, getEdgeValue, orient);
+ / sum(node.inEdges, getEdgeValue, orient);
+
+ if (isNaN(y)) {
+ var len = node.inEdges.length;
+ y = len ? sum(node.inEdges, centerSource, orient) / len : 0;
+ }
+
if (orient === 'vertical') {
var nodeX = node.getLayout().x + (y - center$1(node, orient)) * alpha;
node.setLayout({x: nodeX}, true);
@@ -66268,7 +66471,8 @@ effectSymbolProto.updateData = function (data, idx) {
pos[0] = parsePercent$1(symbolOffset[0], symbolSize[0]);
pos[1] = parsePercent$1(symbolOffset[1], symbolSize[1]);
}
- rippleGroup.rotation = (itemModel.getShallow('symbolRotate') || 0) * Math.PI / 180 || 0;
+ var symbolRotate = data.getItemVisual(idx, 'symbolRotate');
+ rippleGroup.rotation = (symbolRotate || 0) * Math.PI / 180 || 0;
var effectCfg = {};
@@ -68186,8 +68390,8 @@ extendChartView({
rect = new Rect({
shape: {
- x: Math.floor(point[0] - width / 2),
- y: Math.floor(point[1] - height / 2),
+ x: Math.floor(Math.round(point[0]) - width / 2),
+ y: Math.floor(Math.round(point[1]) - height / 2),
width: Math.ceil(width),
height: Math.ceil(height)
},
@@ -72664,8 +72868,7 @@ SeriesModel.extend({
align: 'center',
position: 'inside',
distance: 5,
- silent: true,
- emphasis: {}
+ silent: true
},
itemStyle: {
borderWidth: 1,
@@ -72675,13 +72878,19 @@ SeriesModel.extend({
shadowColor: 'rgba(0, 0, 0, 0.2)',
shadowOffsetX: 0,
shadowOffsetY: 0,
- opacity: 1,
- emphasis: {},
- highlight: {
+ opacity: 1
+ },
+ highlight: {
+ itemStyle: {
opacity: 1
+ }
+ },
+ downplay: {
+ itemStyle: {
+ opacity: 0.5
},
- downplay: {
- opacity: 0.9
+ label: {
+ opacity: 0.6
}
},
@@ -72927,6 +73136,8 @@ SunburstPieceProto.updateData = function (
this._seriesModel = seriesModel || this._seriesModel;
this._ecModel = ecModel || this._ecModel;
+
+ setHoverStyle(this);
};
SunburstPieceProto.onEmphasis = function (highlightPolicy) {
@@ -73390,7 +73601,7 @@ var SunburstView = Chart.extend({
if (link) {
var linkTarget = itemModel.get('target', true)
|| '_blank';
- window.open(link, linkTarget);
+ windowOpen(link, linkTarget);
}
}
targetFound = true;
@@ -77314,7 +77525,10 @@ Calendar.prototype = {
var allDay = Math.floor(range[1].time / PROXIMATE_ONE_DAY)
- Math.floor(range[0].time / PROXIMATE_ONE_DAY) + 1;
- // Consider case:
+ // Consider case1 (#11677 #10430):
+ // Set the system timezone as "UK", set the range to `['2016-07-01', '2016-12-31']`
+
+ // Consider case2:
// Firstly set system timezone as "Time Zone: America/Toronto",
// ```
// var first = new Date(1478412000000 - 3600 * 1000 * 2.5);
@@ -77327,11 +77541,15 @@ Calendar.prototype = {
var endDateNum = range[1].date.getDate();
date.setDate(startDateNum + allDay - 1);
// The bias can not over a month, so just compare date.
- if (date.getDate() !== endDateNum) {
+ var dateNum = date.getDate();
+ if (dateNum !== endDateNum) {
var sign = date.getTime() - range[1].time > 0 ? 1 : -1;
- while (date.getDate() !== endDateNum && (date.getTime() - range[1].time) * sign > 0) {
+ while (
+ (dateNum = date.getDate()) !== endDateNum
+ && (date.getTime() - range[1].time) * sign > 0
+ ) {
allDay -= sign;
- date.setDate(startDateNum + allDay - 1);
+ date.setDate(dateNum - sign);
}
}
@@ -78918,7 +79136,7 @@ extendComponentView({
var feature;
// FIX#11236, merge feature title from MagicType newOption. TODO: consider seriesIndex ?
- if (payload && payload.newTitle != null) {
+ if (payload && payload.newTitle != null && payload.featureName === featureName) {
featureOpt.title = payload.newTitle;
}
@@ -79191,7 +79409,8 @@ var proto$2 = SaveAsImage.prototype;
proto$2.onclick = function (ecModel, api) {
var model = this.model;
var title = model.get('name') || ecModel.get('title.0.text') || 'echarts';
- var type = model.get('type', true) || 'png';
+ var isSvg = api.getZr().painter.getType() === 'svg';
+ var type = isSvg ? 'svg' : model.get('type', true) || 'png';
var url = api.getConnectedDataURL({
type: type,
backgroundColor: model.get('backgroundColor', true)
@@ -79418,7 +79637,8 @@ proto$3.onclick = function (ecModel, api, type) {
type: 'changeMagicType',
currentType: type,
newOption: newOption,
- newTitle: newTitle
+ newTitle: newTitle,
+ featureName: 'magicType'
});
};
@@ -83602,7 +83822,7 @@ extendComponentView({
var dataModel = el.dataModel || seriesModel;
var dataIndex = el.dataIndex;
var dataType = el.dataType;
- var data = dataModel.getData();
+ var data = dataModel.getData(dataType);
var tooltipModel = buildTooltipModel([
data.getItemModel(dataIndex),
@@ -85400,12 +85620,12 @@ extendComponentView({
if (link) {
textEl.on('click', function () {
- window.open(link, '_' + titleModel.get('target'));
+ windowOpen(link, '_' + titleModel.get('target'));
});
}
if (sublink) {
subTextEl.on('click', function () {
- window.open(sublink, '_' + titleModel.get('subtarget'));
+ windowOpen(link, '_' + titleModel.get('subtarget'));
});
}
@@ -94170,25 +94390,21 @@ var resetMethods = {
thisOption.precision = precision;
splitStep = +splitStep.toFixed(precision);
- var index = 0;
-
if (thisOption.minOpen) {
pieceList.push({
- index: index++,
interval: [-Infinity, dataExtent[0]],
close: [0, 0]
});
}
for (
- var curr = dataExtent[0], len = index + splitNumber;
- index < len;
- curr += splitStep
+ var index = 0, curr = dataExtent[0];
+ index < splitNumber;
+ curr += splitStep, index++
) {
var max = index === splitNumber - 1 ? dataExtent[1] : (curr + splitStep);
pieceList.push({
- index: index++,
interval: [curr, max],
close: [1, 1]
});
@@ -94196,7 +94412,6 @@ var resetMethods = {
if (thisOption.maxOpen) {
pieceList.push({
- index: index++,
interval: [dataExtent[1], Infinity],
close: [0, 0]
});
@@ -94204,7 +94419,8 @@ var resetMethods = {
reformIntervals(pieceList);
- each$1(pieceList, function (piece) {
+ each$1(pieceList, function (piece, index) {
+ piece.index = index;
piece.text = this.formatValueText(piece.interval);
}, this);
},
@@ -97513,11 +97729,16 @@ var SVGPainter = function (root, storage, opts, zrId) {
this.storage = storage;
this._opts = opts = extend({}, opts || {});
- var svgRoot = createElement('svg');
- svgRoot.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
- svgRoot.setAttribute('version', '1.1');
- svgRoot.setAttribute('baseProfile', 'full');
- svgRoot.style.cssText = 'user-select:none;position:absolute;left:0;top:0;';
+ var svgDom = createElement('svg');
+ svgDom.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
+ svgDom.setAttribute('version', '1.1');
+ svgDom.setAttribute('baseProfile', 'full');
+ svgDom.style.cssText = 'user-select:none;position:absolute;left:0;top:0;';
+
+ var bgRoot = createElement('g');
+ svgDom.appendChild(bgRoot);
+ var svgRoot = createElement('g');
+ svgDom.appendChild(svgRoot);
this.gradientManager = new GradientManager(zrId, svgRoot);
this.clipPathManager = new ClippathManager(zrId, svgRoot);
@@ -97526,11 +97747,13 @@ var SVGPainter = function (root, storage, opts, zrId) {
var viewport = document.createElement('div');
viewport.style.cssText = 'overflow:hidden;position:relative';
+ this._svgDom = svgDom;
this._svgRoot = svgRoot;
+ this._backgroundRoot = bgRoot;
this._viewport = viewport;
root.appendChild(viewport);
- viewport.appendChild(svgRoot);
+ viewport.appendChild(svgDom);
this.resize(opts.width, opts.height);
@@ -97549,6 +97772,14 @@ SVGPainter.prototype = {
return this._viewport;
},
+ getSvgDom: function () {
+ return this._svgDom;
+ },
+
+ getSvgRoot: function () {
+ return this._svgRoot;
+ },
+
getViewportRootOffset: function () {
var viewportRoot = this.getViewportRoot();
if (viewportRoot) {
@@ -97568,7 +97799,21 @@ SVGPainter.prototype = {
setBackgroundColor: function (backgroundColor) {
// TODO gradient
- this._viewport.style.background = backgroundColor;
+ // Insert a bg rect instead of setting background to viewport.
+ // Otherwise, the exported SVG don't have background.
+ if (this._backgroundRoot && this._backgroundNode) {
+ this._backgroundRoot.removeChild(this._backgroundNode);
+ }
+
+ var bgNode = createElement('rect');
+ bgNode.setAttribute('width', this.getWidth());
+ bgNode.setAttribute('height', this.getHeight());
+ bgNode.setAttribute('x', 0);
+ bgNode.setAttribute('y', 0);
+ bgNode.setAttribute('id', 0);
+ bgNode.style.fill = backgroundColor;
+ this._backgroundRoot.appendChild(bgNode);
+ this._backgroundNode = bgNode;
},
_paintList: function (list) {
@@ -97698,8 +97943,8 @@ SVGPainter.prototype = {
},
_getDefs: function (isForceCreating) {
- var svgRoot = this._svgRoot;
- var defs = this._svgRoot.getElementsByTagName('defs');
+ var svgRoot = this._svgDom;
+ var defs = svgRoot.getElementsByTagName('defs');
if (defs.length === 0) {
// Not exist
if (isForceCreating) {
@@ -97756,11 +98001,16 @@ SVGPainter.prototype = {
viewportStyle.width = width + 'px';
viewportStyle.height = height + 'px';
- var svgRoot = this._svgRoot;
+ var svgRoot = this._svgDom;
// Set width by 'svgRoot.width = width' is invalid
svgRoot.setAttribute('width', width);
svgRoot.setAttribute('height', height);
}
+
+ if (this._backgroundNode) {
+ this._backgroundNode.setAttribute('width', width);
+ this._backgroundNode.setAttribute('height', height);
+ }
},
/**
@@ -97802,10 +98052,13 @@ SVGPainter.prototype = {
dispose: function () {
this.root.innerHTML = '';
- this._svgRoot =
- this._viewport =
- this.storage =
- null;
+ this._svgRoot
+ = this._backgroundRoot
+ = this._svgDom
+ = this._backgroundNode
+ = this._viewport
+ = this.storage
+ = null;
},
clear: function () {
@@ -97814,9 +98067,9 @@ SVGPainter.prototype = {
}
},
- pathToDataUrl: function () {
+ toDataURL: function () {
this.refresh();
- var html = this._svgRoot.outerHTML;
+ var html = encodeURIComponent(this._svgDom.outerHTML.replace(/></g, '>\n\r<'));
return 'data:image/svg+xml;charset=UTF-8,' + html;
}
};
@@ -97832,7 +98085,7 @@ function createMethodNotSupport$1(method) {
each$1([
'getLayer', 'insertLayer', 'eachLayer', 'eachBuiltinLayer',
'eachOtherLayer', 'getLayers', 'modLayer', 'delLayer', 'clearLayer',
- 'toDataURL', 'pathToImage'
+ 'pathToImage'
], function (name) {
SVGPainter.prototype[name] = createMethodNotSupport$1(name);
});
diff --git a/en/dist/echarts.js.map b/en/dist/echarts.js.map
index d989128..479d634 100644
--- a/en/dist/echarts.js.map
+++ b/en/dist/echarts.js.map
@@ -1 +1 @@
-{"version":3,"file":"echarts.js","sources":["../src/config.js","../../zrender/src/core/guid.js","../../zrender/src/core/env.js","../../zrender/src/core/util.js","../../zrender/src/core/vector.js","../../zrender/src/mixin/Draggable.js","../../zrender/src/mixin/Eventful.js","../../zrender/src/core/fourPointsTransform.js","../../zrender/src/core/dom.js","../../zrender/src/core/event.js","../../zrender/src/core/GestureMgr.js","../../zrender/src/Handler.js","../../zrender/src/core/matrix.js", [...]
\ No newline at end of file
+{"version":3,"file":"echarts.js","sources":["../src/config.js","../../zrender/src/core/guid.js","../../zrender/src/core/env.js","../../zrender/src/core/util.js","../../zrender/src/core/vector.js","../../zrender/src/mixin/Draggable.js","../../zrender/src/mixin/Eventful.js","../../zrender/src/core/fourPointsTransform.js","../../zrender/src/core/dom.js","../../zrender/src/core/event.js","../../zrender/src/core/GestureMgr.js","../../zrender/src/Handler.js","../../zrender/src/core/matrix.js", [...]
\ No newline at end of file
diff --git a/en/dist/echarts.min.js b/en/dist/echarts.min.js
index 35d375c..dc78df6 100644
--- a/en/dist/echarts.min.js
+++ b/en/dist/echarts.min.js
@@ -19,4 +19,4 @@
*/
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,n=function(){return e++},v="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasS [...]
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,n=function(){return e++},v="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasS [...]
diff --git a/en/dist/echarts.simple.js b/en/dist/echarts.simple.js
index 23cb6d2..4bb3088 100644
--- a/en/dist/echarts.simple.js
+++ b/en/dist/echarts.simple.js
@@ -9948,6 +9948,10 @@ Painter.prototype = {
if (this._layerConfig[zlevel]) {
merge(layer, this._layerConfig[zlevel], true);
}
+ // TODO Remove EL_AFTER_INCREMENTAL_INC magic number
+ else if (this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC]) {
+ merge(layer, this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC], true);
+ }
if (virtual) {
layer.virtual = virtual;
@@ -10100,12 +10104,26 @@ Painter.prototype = {
var prevLayer = null;
var incrementalLayerCount = 0;
+ var prevZlevel;
for (var i = 0; i < list.length; i++) {
var el = list[i];
var zlevel = el.zlevel;
var layer;
- // PENDING If change one incremental element style ?
- // TODO Where there are non-incremental elements between incremental elements.
+
+ if (prevZlevel !== zlevel) {
+ prevZlevel = zlevel;
+ incrementalLayerCount = 0;
+ }
+
+ // TODO Not use magic number on zlevel.
+
+ // Each layer with increment element can be separated to 3 layers.
+ // (Other Element drawn after incremental element)
+ // -----------------zlevel + EL_AFTER_INCREMENTAL_INC--------------------
+ // (Incremental element)
+ // ----------------------zlevel + INCREMENTAL_INC------------------------
+ // (Element drawn before incremental element)
+ // --------------------------------zlevel--------------------------------
if (el.incremental) {
layer = this.getLayer(zlevel + INCREMENTAL_INC, this._needsManuallyCompositing);
layer.incremental = true;
@@ -10200,6 +10218,7 @@ Painter.prototype = {
for (var i = 0; i < this._zlevelList.length; i++) {
var _zlevel = this._zlevelList[i];
+ // TODO Remove EL_AFTER_INCREMENTAL_INC magic number
if (_zlevel === zlevel || _zlevel === zlevel + EL_AFTER_INCREMENTAL_INC) {
var layer = this._layers[_zlevel];
merge(layer, layerConfig[zlevel], true);
@@ -11270,7 +11289,7 @@ var painterCtors = {
/**
* @type {string}
*/
-var version$1 = '4.3.0';
+var version$1 = '4.3.1';
/**
* Initializing a zrender instance
@@ -13098,7 +13117,30 @@ var extremity = create();
* @param {number} min
* @param {number} max
*/
+function fromPoints(points, min$$1, max$$1) {
+ if (points.length === 0) {
+ return;
+ }
+ var p = points[0];
+ var left = p[0];
+ var right = p[0];
+ var top = p[1];
+ var bottom = p[1];
+ var i;
+ for (i = 1; i < points.length; i++) {
+ p = points[i];
+ left = mathMin$3(left, p[0]);
+ right = mathMax$3(right, p[0]);
+ top = mathMin$3(top, p[1]);
+ bottom = mathMax$3(bottom, p[1]);
+ }
+
+ min$$1[0] = left;
+ min$$1[1] = top;
+ max$$1[0] = right;
+ max$$1[1] = bottom;
+}
/**
* @memberOf module:zrender/core/bbox
@@ -17420,11 +17462,13 @@ function getHighlightDigit(highlightKey) {
* @param {Object} opt Check `opt` of `setTextStyleCommon` to find other props.
* @param {string|Function} [opt.defaultText]
* @param {module:echarts/model/Model} [opt.labelFetcher] Fetch text by
- * `opt.labelFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex)`
- * @param {module:echarts/model/Model} [opt.labelDataIndex] Fetch text by
- * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex)`
- * @param {module:echarts/model/Model} [opt.labelDimIndex] Fetch text by
- * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex)`
+ * `opt.labelFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
+ * @param {number} [opt.labelDataIndex] Fetch text by
+ * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
+ * @param {number} [opt.labelDimIndex] Fetch text by
+ * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
+ * @param {string} [opt.labelProp] Fetch text by
+ * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`
* @param {Object} [normalSpecified]
* @param {Object} [emphasisSpecified]
*/
@@ -17438,6 +17482,7 @@ function setLabelStyle(
var labelFetcher = opt.labelFetcher;
var labelDataIndex = opt.labelDataIndex;
var labelDimIndex = opt.labelDimIndex;
+ var labelProp = opt.labelProp;
// This scenario, `label.normal.show = true; label.emphasis.show = false`,
// is not supported util someone requests.
@@ -17451,7 +17496,7 @@ function setLabelStyle(
var baseText;
if (showNormal || showEmphasis) {
if (labelFetcher) {
- baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex);
+ baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex, labelProp);
}
if (baseText == null) {
baseText = isFunction$1(opt.defaultText) ? opt.defaultText(labelDataIndex, opt) : opt.defaultText;
@@ -17461,7 +17506,7 @@ function setLabelStyle(
var emphasisStyleText = showEmphasis
? retrieve2(
labelFetcher
- ? labelFetcher.getFormattedLabel(labelDataIndex, 'emphasis', null, labelDimIndex)
+ ? labelFetcher.getFormattedLabel(labelDataIndex, 'emphasis', null, labelDimIndex, labelProp)
: null,
baseText
)
@@ -19280,7 +19325,7 @@ function nice(val, round) {
// import Text from 'zrender/src/graphic/Text';
/**
- * 每三位默认加,格式化
+ * add commas after every three numbers
* @param {string|number} x
* @return {string}
*/
@@ -19495,6 +19540,13 @@ var truncateText$1 = truncateText;
* But deprecated this interface. Please use `getTextBoundingRect` instead.
*/
+
+/**
+ * open new tab
+ * @param {string} link url
+ * @param {string} target blank or self
+ */
+
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -24429,7 +24481,7 @@ function dataTaskReset(context) {
function dataTaskProgress(param, context) {
// Avoid repead cloneShallow when data just created in reset.
- if (param.end > context.outputData.count()) {
+ if (context.outputData && param.end > context.outputData.count()) {
context.model.getRawData().cloneShallow(context.outputData);
}
}
@@ -25374,11 +25426,16 @@ var loadingDefault = function (api, opts) {
opts = opts || {};
defaults(opts, {
text: 'loading',
- color: '#c23531',
textColor: '#000',
+ fontSize: '12px',
maskColor: 'rgba(255, 255, 255, 0.8)',
+ showSpinner: true,
+ color: '#c23531',
+ spinnerRadius: 10,
+ lineWidth: 5,
zlevel: 0
});
+ var group = new Group();
var mask = new Rect({
style: {
fill: opts.maskColor
@@ -25386,24 +25443,13 @@ var loadingDefault = function (api, opts) {
zlevel: opts.zlevel,
z: 10000
});
- var arc = new Arc({
- shape: {
- startAngle: -PI$1 / 2,
- endAngle: -PI$1 / 2 + 0.1,
- r: 10
- },
- style: {
- stroke: opts.color,
- lineCap: 'round',
- lineWidth: 5
- },
- zlevel: opts.zlevel,
- z: 10001
- });
+ group.add(mask);
+ var font = opts.fontSize + ' sans-serif';
var labelRect = new Rect({
style: {
fill: 'none',
text: opts.text,
+ font: font,
textPosition: 'right',
textDistance: 10,
textFill: opts.textColor
@@ -25411,32 +25457,49 @@ var loadingDefault = function (api, opts) {
zlevel: opts.zlevel,
z: 10001
});
-
- arc.animateShape(true)
- .when(1000, {
- endAngle: PI$1 * 3 / 2
- })
- .start('circularInOut');
- arc.animateShape(true)
- .when(1000, {
- startAngle: PI$1 * 3 / 2
- })
- .delay(300)
- .start('circularInOut');
-
- var group = new Group();
- group.add(arc);
group.add(labelRect);
- group.add(mask);
+ if (opts.showSpinner) {
+ var arc = new Arc({
+ shape: {
+ startAngle: -PI$1 / 2,
+ endAngle: -PI$1 / 2 + 0.1,
+ r: opts.spinnerRadius
+ },
+ style: {
+ stroke: opts.color,
+ lineCap: 'round',
+ lineWidth: opts.lineWidth
+ },
+ zlevel: opts.zlevel,
+ z: 10001
+ });
+ arc.animateShape(true)
+ .when(1000, {
+ endAngle: PI$1 * 3 / 2
+ })
+ .start('circularInOut');
+ arc.animateShape(true)
+ .when(1000, {
+ startAngle: PI$1 * 3 / 2
+ })
+ .delay(300)
+ .start('circularInOut');
+ group.add(arc);
+ }
// Inject resize
group.resize = function () {
- var cx = api.getWidth() / 2;
+ var textWidth = getWidth(opts.text, font);
+ var r = opts.showSpinner ? opts.spinnerRadius : 0;
+ // cx = (containerWidth - arcDiameter - textDistance - textWidth) / 2
+ // textDistance needs to be calculated when both animation and text exist
+ var cx = (api.getWidth() - r * 2 - (opts.showSpinner && textWidth ? 10 : 0) - textWidth) / 2
+ // only show the text
+ - (opts.showSpinner ? 0 : textWidth / 2);
var cy = api.getHeight() / 2;
- arc.setShape({
+ opts.showSpinner && arc.setShape({
cx: cx,
cy: cy
});
- var r = arc.shape.r;
labelRect.setShape({
x: cx - r,
y: cy - r,
@@ -27092,10 +27155,10 @@ var isFunction = isFunction$1;
var isObject = isObject$1;
var parseClassType = ComponentModel.parseClassType;
-var version = '4.7.0';
+var version = '4.8.0';
var dependencies = {
- zrender: '4.3.0'
+ zrender: '4.3.1'
};
var TEST_FRAME_REMAIN_TIME = 1;
@@ -27514,7 +27577,7 @@ echartsProto.getRenderedCanvas = function (opts) {
* Get svg data url
* @return {string}
*/
-echartsProto.getSvgDataUrl = function () {
+echartsProto.getSvgDataURL = function () {
if (!env$1.svgSupported) {
return;
}
@@ -27526,7 +27589,7 @@ echartsProto.getSvgDataUrl = function () {
el.stopAnimation(true);
});
- return zr.painter.pathToDataUrl();
+ return zr.painter.toDataURL();
};
/**
@@ -27562,7 +27625,7 @@ echartsProto.getDataURL = function (opts) {
});
var url = this._zr.painter.getType() === 'svg'
- ? this.getSvgDataUrl()
+ ? this.getSvgDataURL()
: this.getRenderedCanvas(opts).toDataURL(
'image/' + (opts && opts.type || 'png')
);
@@ -27591,6 +27654,7 @@ echartsProto.getConnectedDataURL = function (opts) {
if (!env$1.canvasSupported) {
return;
}
+ var isSvg = opts.type === 'svg';
var groupId = this.group;
var mathMin = Math.min;
var mathMax = Math.max;
@@ -27605,9 +27669,9 @@ echartsProto.getConnectedDataURL = function (opts) {
each$1(instances, function (chart, id) {
if (chart.group === groupId) {
- var canvas = chart.getRenderedCanvas(
- clone(opts)
- );
+ var canvas = isSvg
+ ? chart.getZr().painter.getSvgDom().innerHTML
+ : chart.getRenderedCanvas(clone(opts));
var boundingRect = chart.getDom().getBoundingClientRect();
left = mathMin(boundingRect.left, left);
top = mathMin(boundingRect.top, top);
@@ -27628,38 +27692,61 @@ echartsProto.getConnectedDataURL = function (opts) {
var width = right - left;
var height = bottom - top;
var targetCanvas = createCanvas();
- targetCanvas.width = width;
- targetCanvas.height = height;
- var zr = init$1(targetCanvas);
+ var zr = init$1(targetCanvas, {
+ renderer: isSvg ? 'svg' : 'canvas'
+ });
+ zr.resize({
+ width: width,
+ height: height
+ });
- // Background between the charts
- if (opts.connectedBackgroundColor) {
- zr.add(new Rect({
- shape: {
- x: 0,
- y: 0,
- width: width,
- height: height
- },
- style: {
- fill: opts.connectedBackgroundColor
- }
- }));
+ if (isSvg) {
+ var content = '';
+ each(canvasList, function (item) {
+ var x = item.left - left;
+ var y = item.top - top;
+ content += '<g transform="translate(' + x + ','
+ + y + ')">' + item.dom + '</g>';
+ });
+ zr.painter.getSvgRoot().innerHTML = content;
+
+ if (opts.connectedBackgroundColor) {
+ zr.painter.setBackgroundColor(opts.connectedBackgroundColor);
+ }
+
+ zr.refreshImmediately();
+ return zr.painter.toDataURL();
}
+ else {
+ // Background between the charts
+ if (opts.connectedBackgroundColor) {
+ zr.add(new Rect({
+ shape: {
+ x: 0,
+ y: 0,
+ width: width,
+ height: height
+ },
+ style: {
+ fill: opts.connectedBackgroundColor
+ }
+ }));
+ }
- each(canvasList, function (item) {
- var img = new ZImage({
- style: {
- x: item.left * dpr - left,
- y: item.top * dpr - top,
- image: item.dom
- }
+ each(canvasList, function (item) {
+ var img = new ZImage({
+ style: {
+ x: item.left * dpr - left,
+ y: item.top * dpr - top,
+ image: item.dom
+ }
+ });
+ zr.add(img);
});
- zr.add(img);
- });
- zr.refreshImmediately();
- return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png'));
+ zr.refreshImmediately();
+ return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png'));
+ }
}
else {
return this.getDataURL(opts);
@@ -33517,7 +33604,6 @@ symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {
var itemStyle = seriesScope && seriesScope.itemStyle;
var hoverItemStyle = seriesScope && seriesScope.hoverItemStyle;
- var symbolRotate = seriesScope && seriesScope.symbolRotate;
var symbolOffset = seriesScope && seriesScope.symbolOffset;
var labelModel = seriesScope && seriesScope.labelModel;
var hoverLabelModel = seriesScope && seriesScope.hoverLabelModel;
@@ -33533,7 +33619,6 @@ symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {
itemStyle = itemModel.getModel(normalStyleAccessPath).getItemStyle(['color']);
hoverItemStyle = itemModel.getModel(emphasisStyleAccessPath).getItemStyle();
- symbolRotate = itemModel.getShallow('symbolRotate');
symbolOffset = itemModel.getShallow('symbolOffset');
labelModel = itemModel.getModel(normalLabelAccessPath);
@@ -33547,6 +33632,8 @@ symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {
var elStyle = symbolPath.style;
+ var symbolRotate = data.getItemVisual(idx, 'symbolRotate');
+
symbolPath.attr('rotation', (symbolRotate || 0) * Math.PI / 180 || 0);
if (symbolOffset) {
@@ -34602,6 +34689,10 @@ function createGridClipPath(cartesian, hasAnimation, seriesModel) {
width += lineWidth;
height += lineWidth;
+ // fix: https://github.com/apache/incubator-echarts/issues/11369
+ x = Math.floor(x);
+ width = Math.round(width);
+
var clipPath = new Rect({
shape: {
x: x,
@@ -34699,6 +34790,26 @@ function isPointsSame(points1, points2) {
return true;
}
+function getBoundingDiff(points1, points2) {
+ var min1 = [];
+ var max1 = [];
+
+ var min2 = [];
+ var max2 = [];
+
+ fromPoints(points1, min1, max1);
+ fromPoints(points2, min2, max2);
+
+ // Get a max value from each corner of two boundings.
+ return Math.max(
+ Math.abs(min1[0] - min2[0]),
+ Math.abs(min1[1] - min2[1]),
+
+ Math.abs(max1[0] - max2[0]),
+ Math.abs(max1[1] - max2[1])
+ );
+}
+
function getSmooth(smooth) {
return typeof (smooth) === 'number' ? smooth : (smooth ? 0.5 : 0);
}
@@ -35311,6 +35422,24 @@ Chart.extend({
next = turnPointsIntoStep(diff.next, coordSys, step);
stackedOnNext = turnPointsIntoStep(diff.stackedOnNext, coordSys, step);
}
+ // Don't apply animation if diff is large.
+ // For better result and avoid memory explosion problems like
+ // https://github.com/apache/incubator-echarts/issues/12229
+ if (getBoundingDiff(current, next) > 3000
+ || (polygon && getBoundingDiff(stackedOnCurrent, stackedOnNext) > 3000)
+ ) {
+ polyline.setShape({
+ points: next
+ });
+ if (polygon) {
+ polygon.setShape({
+ points: next,
+ stackedOnPoints: stackedOnNext
+ });
+ }
+ return;
+ }
+
// `diff.current` is subset of `current` (which should be ensured by
// turnPointsIntoStep), so points in `__points` can be updated when
// points in `current` are update during animation.
@@ -35417,13 +35546,14 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
var symbolType = seriesModel.get('symbol');
var symbolSize = seriesModel.get('symbolSize');
var keepAspect = seriesModel.get('symbolKeepAspect');
+ var symbolRotate = seriesModel.get('symbolRotate');
var hasSymbolTypeCallback = isFunction$1(symbolType);
var hasSymbolSizeCallback = isFunction$1(symbolSize);
- var hasCallback = hasSymbolTypeCallback || hasSymbolSizeCallback;
+ var hasSymbolRotateCallback = isFunction$1(symbolRotate);
+ var hasCallback = hasSymbolTypeCallback || hasSymbolSizeCallback || hasSymbolRotateCallback;
var seriesSymbol = (!hasSymbolTypeCallback && symbolType) ? symbolType : defaultSymbolType;
var seriesSymbolSize = !hasSymbolSizeCallback ? symbolSize : null;
-
data.setVisual({
legendSymbol: legendSymbol || seriesSymbol,
// If seting callback functions on `symbol` or `symbolSize`, for simplicity and avoiding
@@ -35432,7 +35562,8 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
// some cases but generally it is not recommanded.
symbol: seriesSymbol,
symbolSize: seriesSymbolSize,
- symbolKeepAspect: keepAspect
+ symbolKeepAspect: keepAspect,
+ symbolRotate: symbolRotate
});
// Only visible series has each data be visual encoded
@@ -35446,12 +35577,14 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
var params = seriesModel.getDataParams(idx);
hasSymbolTypeCallback && data.setItemVisual(idx, 'symbol', symbolType(rawValue, params));
hasSymbolSizeCallback && data.setItemVisual(idx, 'symbolSize', symbolSize(rawValue, params));
+ hasSymbolRotateCallback && data.setItemVisual(idx, 'symbolRotate', symbolRotate(rawValue, params));
}
if (data.hasItemOption) {
var itemModel = data.getItemModel(idx);
var itemSymbolType = itemModel.getShallow('symbol', true);
var itemSymbolSize = itemModel.getShallow('symbolSize', true);
+ var itemSymbolRotate = itemModel.getShallow('symbolRotate', true);
var itemSymbolKeepAspect = itemModel.getShallow('symbolKeepAspect', true);
// If has item symbol
@@ -35462,6 +35595,9 @@ var visualSymbol = function (seriesType, defaultSymbolType, legendSymbol) {
// PENDING Transform symbolSize ?
data.setItemVisual(idx, 'symbolSize', itemSymbolSize);
}
+ if (itemSymbolRotate != null) {
+ data.setItemVisual(idx, 'symbolRotate', itemSymbolRotate);
+ }
if (itemSymbolKeepAspect != null) {
data.setItemVisual(idx, 'symbolKeepAspect', itemSymbolKeepAspect);
}
@@ -36970,9 +37106,11 @@ var largeLayout = {
coord = cartesian.dataToPoint(valuePair, null, coord);
// Data index might not be in order, depends on `progressiveChunkMode`.
- largeBackgroundPoints[pointsOffset] = valueAxisHorizontal ? coordLayout.x + coordLayout.width : coord[0];
+ largeBackgroundPoints[pointsOffset] = valueAxisHorizontal
+ ? coordLayout.x + coordLayout.width : coord[0];
largePoints[pointsOffset++] = coord[0];
- largeBackgroundPoints[pointsOffset] = valueAxisHorizontal ? coord[1] : coordLayout.y + coordLayout.height;
+ largeBackgroundPoints[pointsOffset] = valueAxisHorizontal
+ ? coord[1] : coordLayout.y + coordLayout.height;
largePoints[pointsOffset++] = coord[1];
largeDataIndices[idxOffset++] = dataIndex;
}
@@ -37462,8 +37600,6 @@ function getScaleExtent(scale, model) {
var min = model.getMin();
var max = model.getMax();
- var fixMin = min != null;
- var fixMax = max != null;
var originalExtent = scale.getExtent();
var axisDataLen;
@@ -37507,17 +37643,6 @@ function getScaleExtent(scale, model) {
// (2) When `needCrossZero` and all data is positive/negative, should it be ensured
// that the results processed by boundaryGap are positive/negative?
- if (min == null) {
- min = scaleType === 'ordinal'
- ? (axisDataLen ? 0 : NaN)
- : originalExtent[0] - boundaryGap[0] * span;
- }
- if (max == null) {
- max = scaleType === 'ordinal'
- ? (axisDataLen ? axisDataLen - 1 : NaN)
- : originalExtent[1] + boundaryGap[1] * span;
- }
-
if (min === 'dataMin') {
min = originalExtent[0];
}
@@ -37538,6 +37663,20 @@ function getScaleExtent(scale, model) {
});
}
+ var fixMin = min != null;
+ var fixMax = max != null;
+
+ if (min == null) {
+ min = scaleType === 'ordinal'
+ ? (axisDataLen ? 0 : NaN)
+ : originalExtent[0] - boundaryGap[0] * span;
+ }
+ if (max == null) {
+ max = scaleType === 'ordinal'
+ ? (axisDataLen ? axisDataLen - 1 : NaN)
+ : originalExtent[1] + boundaryGap[1] * span;
+ }
+
(min == null || !isFinite(min)) && (min = NaN);
(max == null || !isFinite(max)) && (max = NaN);
@@ -37588,7 +37727,13 @@ function getScaleExtent(scale, model) {
}
}
- return [min, max];
+ return {
+ extent: [min, max],
+ // "fix" means "fixed", the value should not be
+ // changed in the subsequent steps.
+ fixMin: fixMin,
+ fixMax: fixMax
+ };
}
function adjustScaleForOverflow(min, max, model, barWidthAndOffset) {
@@ -37627,9 +37772,9 @@ function adjustScaleForOverflow(min, max, model, barWidthAndOffset) {
}
function niceScaleExtent(scale, model) {
- var extent = getScaleExtent(scale, model);
- var fixMin = model.getMin() != null;
- var fixMax = model.getMax() != null;
+ var extentInfo = getScaleExtent(scale, model);
+ var extent = extentInfo.extent;
+
var splitNumber = model.get('splitNumber');
if (scale.type === 'log') {
@@ -37640,8 +37785,8 @@ function niceScaleExtent(scale, model) {
scale.setExtent(extent[0], extent[1]);
scale.niceExtent({
splitNumber: splitNumber,
- fixMin: fixMin,
- fixMax: fixMax,
+ fixMin: extentInfo.fixMin,
+ fixMax: extentInfo.fixMax,
minInterval: (scaleType === 'interval' || scaleType === 'time')
? model.get('minInterval') : null,
maxInterval: (scaleType === 'interval' || scaleType === 'time')
@@ -42081,6 +42226,7 @@ extendChartView({
var drawBackground = seriesModel.get('showBackground', true);
var backgroundModel = seriesModel.getModel('backgroundStyle');
+ var barBorderRadius = backgroundModel.get('barBorderRadius') || 0;
var bgEls = [];
var oldBgEls = this._backgroundEls || [];
@@ -42091,8 +42237,13 @@ extendChartView({
var layout = getLayout[coord.type](data, dataIndex, itemModel);
if (drawBackground) {
- var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, layout);
+ var bgLayout = getLayout[coord.type](data, dataIndex);
+ var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, bgLayout);
bgEl.useStyle(backgroundModel.getBarItemStyle());
+ // Only cartesian2d support borderRadius.
+ if (coord.type === 'cartesian2d') {
+ bgEl.setShape('r', barBorderRadius);
+ }
bgEls[dataIndex] = bgEl;
}
@@ -42129,9 +42280,14 @@ extendChartView({
if (drawBackground) {
var bgEl = oldBgEls[oldIndex];
bgEl.useStyle(backgroundModel.getBarItemStyle());
+ // Only cartesian2d support borderRadius.
+ if (coord.type === 'cartesian2d') {
+ bgEl.setShape('r', barBorderRadius);
+ }
bgEls[newIndex] = bgEl;
- var shape = createBackgroundShape(isHorizontalOrRadial, layout, coord);
+ var bgLayout = getLayout[coord.type](data, newIndex);
+ var shape = createBackgroundShape(isHorizontalOrRadial, bgLayout, coord);
updateProps(bgEl, { shape: shape }, animationModel, newIndex);
}
@@ -42381,9 +42537,11 @@ function removeSector(dataIndex, animationModel, el) {
}
var getLayout = {
+ // itemModel is only used to get borderWidth, which is not needed
+ // when calculating bar background layout.
cartesian2d: function (data, dataIndex, itemModel) {
var layout = data.getItemLayout(dataIndex);
- var fixedLineWidth = getLineWidth(itemModel, layout);
+ var fixedLineWidth = itemModel ? getLineWidth(itemModel, layout) : 0;
// fix layout with lineWidth
var signX = layout.width > 0 ? 1 : -1;
@@ -43257,31 +43415,36 @@ piePieceProto.updateData = function (data, idx, firstCreate) {
var withAnimation = !firstCreate && animationTypeUpdate === 'transition';
this._updateLabel(data, idx, withAnimation);
- this.highDownOnUpdate = (itemModel.get('hoverAnimation') && seriesModel.isAnimationEnabled())
+ this.highDownOnUpdate = !seriesModel.get('silent')
? function (fromState, toState) {
+ var hasAnimation = seriesModel.isAnimationEnabled() && itemModel.get('hoverAnimation');
if (toState === 'emphasis') {
labelLine.ignore = labelLine.hoverIgnore;
labelText.ignore = labelText.hoverIgnore;
// Sector may has animation of updating data. Force to move to the last frame
// Or it may stopped on the wrong shape
- sector.stopAnimation(true);
- sector.animateTo({
- shape: {
- r: layout.r + seriesModel.get('hoverOffset')
- }
- }, 300, 'elasticOut');
+ if (hasAnimation) {
+ sector.stopAnimation(true);
+ sector.animateTo({
+ shape: {
+ r: layout.r + seriesModel.get('hoverOffset')
+ }
+ }, 300, 'elasticOut');
+ }
}
else {
labelLine.ignore = labelLine.normalIgnore;
labelText.ignore = labelText.normalIgnore;
- sector.stopAnimation(true);
- sector.animateTo({
- shape: {
- r: layout.r
- }
- }, 300, 'elasticOut');
+ if (hasAnimation) {
+ sector.stopAnimation(true);
+ sector.animateTo({
+ shape: {
+ r: layout.r
+ }
+ }, 300, 'elasticOut');
+ }
}
}
: null;
diff --git a/en/dist/echarts.simple.min.js b/en/dist/echarts.simple.min.js
index ca23401..7e2efe8 100644
--- a/en/dist/echarts.simple.min.js
+++ b/en/dist/echarts.simple.min.js
@@ -19,4 +19,4 @@
*/
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,n=function(){return e++},m="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasS [...]
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,n=function(){return e++},m="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasS [...]
diff --git a/en/dist/extension/bmap.js b/en/dist/extension/bmap.js
index e60ea12..e3bd8a2 100644
--- a/en/dist/extension/bmap.js
+++ b/en/dist/extension/bmap.js
@@ -270,6 +270,340 @@ echarts.extendComponentModel({
}
});
+/**
+ * @module zrender/core/util
+ */
+
+// 用于处理merge时无法遍历Date等对象的问题
+var BUILTIN_OBJECT = {
+ '[object Function]': 1,
+ '[object RegExp]': 1,
+ '[object Date]': 1,
+ '[object Error]': 1,
+ '[object CanvasGradient]': 1,
+ '[object CanvasPattern]': 1,
+ // For node-canvas
+ '[object Image]': 1,
+ '[object Canvas]': 1
+};
+
+var TYPED_ARRAY = {
+ '[object Int8Array]': 1,
+ '[object Uint8Array]': 1,
+ '[object Uint8ClampedArray]': 1,
+ '[object Int16Array]': 1,
+ '[object Uint16Array]': 1,
+ '[object Int32Array]': 1,
+ '[object Uint32Array]': 1,
+ '[object Float32Array]': 1,
+ '[object Float64Array]': 1
+};
+
+var objToString = Object.prototype.toString;
+
+
+
+/**
+ * Those data types can be cloned:
+ * Plain object, Array, TypedArray, number, string, null, undefined.
+ * Those data types will be assgined using the orginal data:
+ * BUILTIN_OBJECT
+ * Instance of user defined class will be cloned to a plain object, without
+ * properties in prototype.
+ * Other data types is not supported (not sure what will happen).
+ *
+ * Caution: do not support clone Date, for performance consideration.
+ * (There might be a large number of date in `series.data`).
+ * So date should not be modified in and out of echarts.
+ *
+ * @param {*} source
+ * @return {*} new
+ */
+function clone(source) {
+ if (source == null || typeof source !== 'object') {
+ return source;
+ }
+
+ var result = source;
+ var typeStr = objToString.call(source);
+
+ if (typeStr === '[object Array]') {
+ if (!isPrimitive(source)) {
+ result = [];
+ for (var i = 0, len = source.length; i < len; i++) {
+ result[i] = clone(source[i]);
+ }
+ }
+ }
+ else if (TYPED_ARRAY[typeStr]) {
+ if (!isPrimitive(source)) {
+ var Ctor = source.constructor;
+ if (source.constructor.from) {
+ result = Ctor.from(source);
+ }
+ else {
+ result = new Ctor(source.length);
+ for (var i = 0, len = source.length; i < len; i++) {
+ result[i] = clone(source[i]);
+ }
+ }
+ }
+ }
+ else if (!BUILTIN_OBJECT[typeStr] && !isPrimitive(source) && !isDom(source)) {
+ result = {};
+ for (var key in source) {
+ if (source.hasOwnProperty(key)) {
+ result[key] = clone(source[key]);
+ }
+ }
+ }
+
+ return result;
+}
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {*} target
+ * @param {*} source
+ * @param {boolean} [overwrite=false]
+ */
+
+
+/**
+ * @param {Array} targetAndSources The first item is target, and the rests are source.
+ * @param {boolean} [overwrite=false]
+ * @return {*} target
+ */
+
+
+/**
+ * @param {*} target
+ * @param {*} source
+ * @memberOf module:zrender/core/util
+ */
+
+
+/**
+ * @param {*} target
+ * @param {*} source
+ * @param {boolean} [overlay=false]
+ * @memberOf module:zrender/core/util
+ */
+
+
+
+
+
+
+/**
+ * 查询数组中元素的index
+ * @memberOf module:zrender/core/util
+ */
+
+
+/**
+ * 构造类继承关系
+ *
+ * @memberOf module:zrender/core/util
+ * @param {Function} clazz 源类
+ * @param {Function} baseClazz 基类
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {Object|Function} target
+ * @param {Object|Function} sorce
+ * @param {boolean} overlay
+ */
+
+
+/**
+ * Consider typed array.
+ * @param {Array|TypedArray} data
+ */
+
+
+/**
+ * 数组或对象遍历
+ * @memberOf module:zrender/core/util
+ * @param {Object|Array} obj
+ * @param {Function} cb
+ * @param {*} [context]
+ */
+
+
+/**
+ * 数组映射
+ * @memberOf module:zrender/core/util
+ * @param {Array} obj
+ * @param {Function} cb
+ * @param {*} [context]
+ * @return {Array}
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {Array} obj
+ * @param {Function} cb
+ * @param {Object} [memo]
+ * @param {*} [context]
+ * @return {Array}
+ */
+
+
+/**
+ * 数组过滤
+ * @memberOf module:zrender/core/util
+ * @param {Array} obj
+ * @param {Function} cb
+ * @param {*} [context]
+ * @return {Array}
+ */
+
+
+/**
+ * 数组项查找
+ * @memberOf module:zrender/core/util
+ * @param {Array} obj
+ * @param {Function} cb
+ * @param {*} [context]
+ * @return {*}
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {Function} func
+ * @param {*} context
+ * @return {Function}
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {Function} func
+ * @return {Function}
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {*} value
+ * @return {boolean}
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {*} value
+ * @return {boolean}
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {*} value
+ * @return {boolean}
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {*} value
+ * @return {boolean}
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {*} value
+ * @return {boolean}
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {*} value
+ * @return {boolean}
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {*} value
+ * @return {boolean}
+ */
+function isDom(value) {
+ return typeof value === 'object'
+ && typeof value.nodeType === 'number'
+ && typeof value.ownerDocument === 'object';
+}
+
+/**
+ * Whether is exactly NaN. Notice isNaN('a') returns true.
+ * @param {*} value
+ * @return {boolean}
+ */
+
+
+/**
+ * If value1 is not null, then return value1, otherwise judget rest of values.
+ * Low performance.
+ * @memberOf module:zrender/core/util
+ * @return {*} Final value
+ */
+
+
+
+
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {Array} arr
+ * @param {number} startIndex
+ * @param {number} endIndex
+ * @return {Array}
+ */
+
+
+/**
+ * Normalize css liked array configuration
+ * e.g.
+ * 3 => [3, 3, 3, 3]
+ * [4, 2] => [4, 2, 4, 2]
+ * [4, 3, 2] => [4, 3, 2, 3]
+ * @param {number|Array.<number>} val
+ * @return {Array.<number>}
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {boolean} condition
+ * @param {string} message
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {string} str string to be trimed
+ * @return {string} trimed string
+ */
+
+
+var primitiveKey = '__ec_primitive__';
+/**
+ * Set an object as primitive to be ignored traversing children in clone or merge
+ */
+
+
+function isPrimitive(obj) {
+ return obj[primitiveKey];
+}
+
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -366,7 +700,7 @@ echarts.extendComponentView({
if (JSON.stringify(originalStyle) !== mapStyleStr) {
// FIXME May have blank tile when dragging if setMapStyle
if (Object.keys(newMapStyle).length) {
- bmap.setMapStyle(newMapStyle);
+ bmap.setMapStyle(clone(newMapStyle));
}
bMapModel.__mapStyle = JSON.parse(mapStyleStr);
}
@@ -380,7 +714,7 @@ echarts.extendComponentView({
if (JSON.stringify(originalStyle2) !== mapStyleStr2) {
// FIXME May have blank tile when dragging if setMapStyle
if (Object.keys(newMapStyle2).length) {
- bmap.setMapStyleV2(newMapStyle2);
+ bmap.setMapStyleV2(clone(newMapStyle2));
}
bMapModel.__mapStyle2 = JSON.parse(mapStyleStr2);
}
diff --git a/en/dist/extension/bmap.js.map b/en/dist/extension/bmap.js.map
index f4a67c9..21dbc5e 100644
--- a/en/dist/extension/bmap.js.map
+++ b/en/dist/extension/bmap.js.map
@@ -1 +1 @@
-{"version":3,"file":"bmap.js","sources":["../../extension-src/bmap/BMapCoordSys.js","../../extension-src/bmap/BMapModel.js","../../extension-src/bmap/BMapView.js","../../extension-src/bmap/bmap.js"],"sourcesContent":["/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache [...]
\ No newline at end of file
+{"version":3,"file":"bmap.js","sources":["../../extension-src/bmap/BMapCoordSys.js","../../extension-src/bmap/BMapModel.js","../../../zrender/src/core/util.js","../../extension-src/bmap/BMapView.js","../../extension-src/bmap/bmap.js"],"sourcesContent":["/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses [...]
\ No newline at end of file
diff --git a/en/dist/extension/bmap.min.js b/en/dist/extension/bmap.min.js
index 7f8893b..00f6917 100644
--- a/en/dist/extension/bmap.min.js
+++ b/en/dist/extension/bmap.min.js
@@ -19,4 +19,4 @@
*/
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("echarts")):"function"==typeof define&&define.amd?define(["exports","echarts"],e):e(t.bmap={},t.echarts)}(this,function(t,o){"use strict";function l(t,e){this._bmap=t,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=e,this._projection=new BMap.MercatorProjection}function n(a,r){return r=r||[0,0],o.util.map([0,1],function(t){var e=r[t],o=a[t]/2,n=[],i=[];return n[t]=e-o,i[t]=e+o,n[1-t]=i[1-t [...]
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("echarts")):"function"==typeof define&&define.amd?define(["exports","echarts"],e):e(t.bmap={},t.echarts)}(this,function(t,o){"use strict";function l(t,e){this._bmap=t,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=e,this._projection=new BMap.MercatorProjection}function n(i,a){return a=a||[0,0],o.util.map([0,1],function(t){var e=a[t],o=i[t]/2,n=[],r=[];return n[t]=e-o,r[t]=e+o,n[1-t]=r[1-t [...]
diff --git a/en/documents/option-parts/option.visualMap-continuous.json b/en/documents/option-parts/option.visualMap-continuous.json
index 6d7b9f0..fc0d720 100644
--- a/en/documents/option-parts/option.visualMap-continuous.json
+++ b/en/documents/option-parts/option.visualMap-continuous.json
@@ -17,11 +17,11 @@
"dimension": "<p>Specify which dimension should be used to fetch dataValue from <a href=\"#series.data\">series.data</a>, and then map them to visual channel.</p>\n<p><a href=\"#series.data\">series.data</a> can be regarded as a two-dimensional array, for instance:</p>\n<pre><code class=\"lang-javascript\">[\n [12, 23, 43],\n [12, 23, 43],\n [43, 545, 65],\n [92, 23, 33]\n]\n</code></pre>\n<p>Each column of the above array is regarded as a <code class=\"codespan\">dimension [...]
"seriesIndex": "<p>Specify visual mapping should be performed on which series, from which\n<a href=\"#series.data\">series.data</a> is fetched.</p>\n<p>All series are used by defualt.</p>\n",
"hoverLink": "<p><code class=\"codespan\">hoverLink</code> enable highlight certain graphical elements of chart when mouse hovers on some place of <code class=\"codespan\">visualMap</code> component that is coresponding to those graphical elements by visual mapping.</p>\n<p>Inversely, when mouse hovers a graphical element of chart, its value label will be displayed on its corresponding position in <code class=\"codespan\">visualMap</code>.</p>\n",
- "inRange": "<p>Define visual channels that will mapped from dataValues that are <strong>in selected range</strong>. (User can interact with visualMap component and make a seleced range by mouse or touch.)</p>\n<p>Possiable visual channels includes:</p>\n<ul>\n<li><code class=\"codespan\">symbol</code>: Type of symbol.</li>\n<li><code class=\"codespan\">symbolSize</code>: Symbol size.</li>\n<li><code class=\"codespan\">color</code>: Symbol color.</li>\n<li><code class=\"codespan\">color [...]
- "outOfRange": "<p>Define visual channels that will mapped from dataValues that are <strong>out of selected range</strong>. (User can interact with visualMap component and make a seleced range by mouse or touch.)</p>\n<p>Possiable visual channels includes:</p>\n<ul>\n<li><code class=\"codespan\">symbol</code>: Type of symbol.</li>\n<li><code class=\"codespan\">symbolSize</code>: Symbol size.</li>\n<li><code class=\"codespan\">color</code>: Symbol color.</li>\n<li><code class=\"codespan\ [...]
+ "inRange": "<p>Define visual channels that will mapped from dataValues that are <strong>in selected range</strong>. (User can interact with visualMap component and make a seleced range by mouse or touch.)</p>\n<p>Possiable visual channels includes:</p>\n<ul>\n<li><code class=\"codespan\">symbol</code>: Type of symbol.</li>\n<li><code class=\"codespan\">symbolSize</code>: Symbol size.</li>\n<li><code class=\"codespan\">color</code>: Symbol color.</li>\n<li><code class=\"codespan\">color [...]
+ "outOfRange": "<p>Define visual channels that will mapped from dataValues that are <strong>out of selected range</strong>. (User can interact with visualMap component and make a seleced range by mouse or touch.)</p>\n<p>Possiable visual channels includes:</p>\n<ul>\n<li><code class=\"codespan\">symbol</code>: Type of symbol.</li>\n<li><code class=\"codespan\">symbolSize</code>: Symbol size.</li>\n<li><code class=\"codespan\">color</code>: Symbol color.</li>\n<li><code class=\"codespan\ [...]
"controller": "<p>Property <code class=\"codespan\">inRange</code> and <code class=\"codespan\">outOfRange</code> can be set within property <code class=\"codespan\">controller</code>, which means those <code class=\"codespan\">inRange</code> and <code class=\"codespan\">outOfRange</code> are only used on the controller (<code class=\"codespan\">visualMap</code> component itself), but are not used on chart (series). This property is useful in some scenario that the view of controller n [...]
- "controller.inRange": "<p>Define visual channels that will mapped from dataValues that are <strong>in selected range</strong>. (User can interact with visualMap component and make a seleced range by mouse or touch.)</p>\n<p>Possiable visual channels includes:</p>\n<ul>\n<li><code class=\"codespan\">symbol</code>: Type of symbol.</li>\n<li><code class=\"codespan\">symbolSize</code>: Symbol size.</li>\n<li><code class=\"codespan\">color</code>: Symbol color.</li>\n<li><code class=\"codes [...]
- "controller.outOfRange": "<p>Define visual channels that will mapped from dataValues that are <strong>out of selected range</strong>. (User can interact with visualMap component and make a seleced range by mouse or touch.)</p>\n<p>Possiable visual channels includes:</p>\n<ul>\n<li><code class=\"codespan\">symbol</code>: Type of symbol.</li>\n<li><code class=\"codespan\">symbolSize</code>: Symbol size.</li>\n<li><code class=\"codespan\">color</code>: Symbol color.</li>\n<li><code class= [...]
+ "controller.inRange": "<p>Define visual channels that will mapped from dataValues that are <strong>in selected range</strong>. (User can interact with visualMap component and make a seleced range by mouse or touch.)</p>\n<p>Possiable visual channels includes:</p>\n<ul>\n<li><code class=\"codespan\">symbol</code>: Type of symbol.</li>\n<li><code class=\"codespan\">symbolSize</code>: Symbol size.</li>\n<li><code class=\"codespan\">color</code>: Symbol color.</li>\n<li><code class=\"codes [...]
+ "controller.outOfRange": "<p>Define visual channels that will mapped from dataValues that are <strong>out of selected range</strong>. (User can interact with visualMap component and make a seleced range by mouse or touch.)</p>\n<p>Possiable visual channels includes:</p>\n<ul>\n<li><code class=\"codespan\">symbol</code>: Type of symbol.</li>\n<li><code class=\"codespan\">symbolSize</code>: Symbol size.</li>\n<li><code class=\"codespan\">color</code>: Symbol color.</li>\n<li><code class= [...]
"zlevel": "<p><code class=\"codespan\">zlevel</code> value of all graphical elements in .</p>\n<p><code class=\"codespan\">zlevel</code> is used to make layers with Canvas. Graphical elements with different <code class=\"codespan\">zlevel</code> values will be placed in different Canvases, which is a common optimization technique. We can put those frequently changed elements (like those with animations) to a separate <code class=\"codespan\">zlevel</code>. Notice that too many Canvases [...]
"z": "<p><code class=\"codespan\">z</code> value of all graphical elements in , which controls order of drawing graphical components. Components with smaller <code class=\"codespan\">z</code> values may be overwritten by those with larger <code class=\"codespan\">z</code> values.</p>\n<p><code class=\"codespan\">z</code> has a lower priority to <code class=\"codespan\">zlevel</code>, and will not create new Canvas.</p>\n",
"left": "<p>Distance between visualMap component and the left side of the container.</p>\n<p><code class=\"codespan\">left</code> value can be instant pixel value like <code class=\"codespan\">20</code>; it can also be a percentage value relative to container width like <code class=\"codespan\">'20%'</code>; and it can also be <code class=\"codespan\">'left'</code>, <code class=\"codespan\">'center'</code>, or <code class=\"codespan\">'right'</code>.</p [...]
diff --git a/en/documents/option-parts/option.visualMap-piecewise.json b/en/documents/option-parts/option.visualMap-piecewise.json
index 5c3978d..8292a25 100644
--- a/en/documents/option-parts/option.visualMap-piecewise.json
+++ b/en/documents/option-parts/option.visualMap-piecewise.json
@@ -23,11 +23,11 @@
"dimension": "<p>Specify which dimension should be used to fetch dataValue from <a href=\"#series.data\">series.data</a>, and then map them to visual channel.</p>\n<p><a href=\"#series.data\">series.data</a> can be regarded as a two-dimensional array, for instance:</p>\n<pre><code class=\"lang-javascript\">[\n [12, 23, 43],\n [12, 23, 43],\n [43, 545, 65],\n [92, 23, 33]\n]\n</code></pre>\n<p>Each column of the above array is regarded as a <code class=\"codespan\">dimension [...]
"seriesIndex": "<p>Specify visual mapping should be performed on which series, from which\n<a href=\"#series.data\">series.data</a> is fetched.</p>\n<p>All series are used by defualt.</p>\n",
"hoverLink": "<p><code class=\"codespan\">hoverLink</code> enable highlight certain graphical elements of chart when mouse hovers on some place of <code class=\"codespan\">visualMap</code> component that is coresponding to those graphical elements by visual mapping.</p>\n<p>Inversely, when mouse hovers a graphical element of chart, its value label will be displayed on its corresponding position in <code class=\"codespan\">visualMap</code>.</p>\n",
- "inRange": "<p>Define visual channels that will mapped from dataValues that are <strong>in selected range</strong>. (User can interact with visualMap component and make a seleced range by mouse or touch.)</p>\n<p>Possiable visual channels includes:</p>\n<ul>\n<li><code class=\"codespan\">symbol</code>: Type of symbol.</li>\n<li><code class=\"codespan\">symbolSize</code>: Symbol size.</li>\n<li><code class=\"codespan\">color</code>: Symbol color.</li>\n<li><code class=\"codespan\">color [...]
- "outOfRange": "<p>Define visual channels that will mapped from dataValues that are <strong>out of selected range</strong>. (User can interact with visualMap component and make a seleced range by mouse or touch.)</p>\n<p>Possiable visual channels includes:</p>\n<ul>\n<li><code class=\"codespan\">symbol</code>: Type of symbol.</li>\n<li><code class=\"codespan\">symbolSize</code>: Symbol size.</li>\n<li><code class=\"codespan\">color</code>: Symbol color.</li>\n<li><code class=\"codespan\ [...]
+ "inRange": "<p>Define visual channels that will mapped from dataValues that are <strong>in selected range</strong>. (User can interact with visualMap component and make a seleced range by mouse or touch.)</p>\n<p>Possiable visual channels includes:</p>\n<ul>\n<li><code class=\"codespan\">symbol</code>: Type of symbol.</li>\n<li><code class=\"codespan\">symbolSize</code>: Symbol size.</li>\n<li><code class=\"codespan\">color</code>: Symbol color.</li>\n<li><code class=\"codespan\">color [...]
+ "outOfRange": "<p>Define visual channels that will mapped from dataValues that are <strong>out of selected range</strong>. (User can interact with visualMap component and make a seleced range by mouse or touch.)</p>\n<p>Possiable visual channels includes:</p>\n<ul>\n<li><code class=\"codespan\">symbol</code>: Type of symbol.</li>\n<li><code class=\"codespan\">symbolSize</code>: Symbol size.</li>\n<li><code class=\"codespan\">color</code>: Symbol color.</li>\n<li><code class=\"codespan\ [...]
"controller": "<p>Property <code class=\"codespan\">inRange</code> and <code class=\"codespan\">outOfRange</code> can be set within property <code class=\"codespan\">controller</code>, which means those <code class=\"codespan\">inRange</code> and <code class=\"codespan\">outOfRange</code> are only used on the controller (<code class=\"codespan\">visualMap</code> component itself), but are not used on chart (series). This property is useful in some scenario that the view of controller n [...]
- "controller.inRange": "<p>Define visual channels that will mapped from dataValues that are <strong>in selected range</strong>. (User can interact with visualMap component and make a seleced range by mouse or touch.)</p>\n<p>Possiable visual channels includes:</p>\n<ul>\n<li><code class=\"codespan\">symbol</code>: Type of symbol.</li>\n<li><code class=\"codespan\">symbolSize</code>: Symbol size.</li>\n<li><code class=\"codespan\">color</code>: Symbol color.</li>\n<li><code class=\"codes [...]
- "controller.outOfRange": "<p>Define visual channels that will mapped from dataValues that are <strong>out of selected range</strong>. (User can interact with visualMap component and make a seleced range by mouse or touch.)</p>\n<p>Possiable visual channels includes:</p>\n<ul>\n<li><code class=\"codespan\">symbol</code>: Type of symbol.</li>\n<li><code class=\"codespan\">symbolSize</code>: Symbol size.</li>\n<li><code class=\"codespan\">color</code>: Symbol color.</li>\n<li><code class= [...]
+ "controller.inRange": "<p>Define visual channels that will mapped from dataValues that are <strong>in selected range</strong>. (User can interact with visualMap component and make a seleced range by mouse or touch.)</p>\n<p>Possiable visual channels includes:</p>\n<ul>\n<li><code class=\"codespan\">symbol</code>: Type of symbol.</li>\n<li><code class=\"codespan\">symbolSize</code>: Symbol size.</li>\n<li><code class=\"codespan\">color</code>: Symbol color.</li>\n<li><code class=\"codes [...]
+ "controller.outOfRange": "<p>Define visual channels that will mapped from dataValues that are <strong>out of selected range</strong>. (User can interact with visualMap component and make a seleced range by mouse or touch.)</p>\n<p>Possiable visual channels includes:</p>\n<ul>\n<li><code class=\"codespan\">symbol</code>: Type of symbol.</li>\n<li><code class=\"codespan\">symbolSize</code>: Symbol size.</li>\n<li><code class=\"codespan\">color</code>: Symbol color.</li>\n<li><code class= [...]
"zlevel": "<p><code class=\"codespan\">zlevel</code> value of all graphical elements in .</p>\n<p><code class=\"codespan\">zlevel</code> is used to make layers with Canvas. Graphical elements with different <code class=\"codespan\">zlevel</code> values will be placed in different Canvases, which is a common optimization technique. We can put those frequently changed elements (like those with animations) to a separate <code class=\"codespan\">zlevel</code>. Notice that too many Canvases [...]
"z": "<p><code class=\"codespan\">z</code> value of all graphical elements in , which controls order of drawing graphical components. Components with smaller <code class=\"codespan\">z</code> values may be overwritten by those with larger <code class=\"codespan\">z</code> values.</p>\n<p><code class=\"codespan\">z</code> has a lower priority to <code class=\"codespan\">zlevel</code>, and will not create new Canvas.</p>\n",
"left": "<p>Distance between visualMap component and the left side of the container.</p>\n<p><code class=\"codespan\">left</code> value can be instant pixel value like <code class=\"codespan\">20</code>; it can also be a percentage value relative to container width like <code class=\"codespan\">'20%'</code>; and it can also be <code class=\"codespan\">'left'</code>, <code class=\"codespan\">'center'</code>, or <code class=\"codespan\">'right'</code>.</p [...]
diff --git a/en/documents/option.json b/en/documents/option.json
index 66a98c9..22af766 100644
--- a/en/documents/option.json
+++ b/en/documents/option.json
@@ -1 +1 @@
-{"$schema":"https://echarts.apache.org/doc/json-schem","option":{"type":"Object","properties":{"title":{"type":["Object"],"description":"<p>Title component, including main title and subtitle.</p>\n<p>In ECharts 2.x, a single instance of ECharts could contains one title component at most. However, in ECharts 3, there could be one or more than one title components. It is more useful when multiple diagrams in one instance all need titles.</p>\n<p><strong>Here are some instances of different [...]
\ No newline at end of file
+{"$schema":"https://echarts.apache.org/doc/json-schem","option":{"type":"Object","properties":{"title":{"type":["Object"],"description":"<p>Title component, including main title and subtitle.</p>\n<p>In ECharts 2.x, a single instance of ECharts could contains one title component at most. However, in ECharts 3, there could be one or more than one title components. It is more useful when multiple diagrams in one instance all need titles.</p>\n<p><strong>Here are some instances of different [...]
\ No newline at end of file
diff --git a/en/documents/tutorial-parts/tutorial.json b/en/documents/tutorial-parts/tutorial.json
index 3839252..44fa007 100644
--- a/en/documents/tutorial-parts/tutorial.json
+++ b/en/documents/tutorial-parts/tutorial.json
@@ -3,13 +3,13 @@
"Create Custom Build of ECharts": "<p>In most cases, ECharts builds can be get from <a href=\"https://www.jsdelivr.com/package/npm/echarts\" target=\"_blank\">CDN</a> or from the <code class=\"codespan\">echarts/dist</code> directory in our <a href=\"https://github.com/apache/incubator-echarts/releases\" target=\"_blank\">GitHub project</a>, where\nthese pre-builds are provided:</p>\n<ul>\n<li>Complete verion: <code class=\"codespan\">echarts/dist/echarts.js</code>, including all char [...]
"Use ECharts with webpack": "<p><a href=\"https://webpack.js.org//\" target=\"_blank\">Webpack</a> is a popular module packaging tool, which can be used easily to import and packaging ECharts. Here we assume you already have certain understanding about webpack and used it in your project.</p>\n<h2 id=\"use-npm-to-install-echarts\">Use npm to install ECharts</h2>\n<p>You can use the following command to install ECharts with npm.</p>\n<pre><code class=\"lang-shell\">npm install echarts - [...]
"ECharts Basic Concepts Overview": "<p>This chapter describes some of the common concepts and terms of echarts.</p>\n<h2 id=\"echarts-instance\">ECharts instance</h2>\n<p>We can create multiple <code class=\"codespan\">echarts instances</code> in a webpage. In each <code class=\"codespan\">echarts instance</code> we can create multiple diagrams, coordinate systems, etc. (described by <code class=\"codespan\">option</code>). With a DOM element prepared (as the container of an echarts in [...]
- "Customized Chart Styles": "<p>ECharts provides a rich amount of configurable items, which can be set in global, series, and data three different levels. Next, let's see an example of how to use ECharts to implement the following Nightingale rose chart:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/tutorial-styling-step5&edit=1&reset=1\" width=\"500\" height=\"400\" ></iframe>\n\n\n<h2 id=\"drawing-nightingale-rose-chart\">Drawing Nightingal [...]
+ "Customized Chart Styles": "<p>ECharts provides a rich amount of configurable items, which can be set in global, series, and data three different levels. Next, let's see an example of how to use ECharts to implement the following Nightingale rose chart:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/tutorial-styling-step5&edit=1&reset=1\" width=\"500\" height=\"400\" ></iframe>\n\n\n<h2 id=\"drawing-nightingale-rose-chart\">Drawing Nightingal [...]
"Overview of Style Customization": "<p>This article provides an overview of the different approaches about style customization. For example, how to config the color, size, shadow of the graphic elements and labels.</p>\n<blockquote>\n<p>The term "style" may not follow the convention of data visualization, but we use it in this article because it is popular and easy to understand.</p>\n</blockquote>\n<p>These approaches below will be introduced. The functionalities of them mig [...]
"Loading and Updating of Asynchronous Data": "<h2 id=\"asynchronous-loading\">Asynchronous Loading</h2>\n<p>Data in <a href=\"#getting-started\">Get started</a> is directly filled in <code class=\"codespan\">setOption</code> after initialization, but in some cases, data may be filled after asynchronous loading. Data updating asynchronously in <code class=\"codespan\">ECharts</code> is very easy. After initialization, you can pass in data and configuration item through <code class=\"cod [...]
- "Dataset": "<p><code class=\"codespan\">dataset</code> component is published since ECharts 4. <code class=\"codespan\">dataset</code> brings convenience in data management separated with styles and enables data reuse by different series. More importantly, is enables data encoding from data to visual, which brings convenience in some scenarios.</p>\n<p>Before ECharts 4, data was only able to declared in each series, for example:</p>\n<pre><code class=\"lang-js\">option: {\n xAxis: { [...]
+ "Dataset": "<p><code class=\"codespan\">dataset</code> component is published since ECharts 4. <code class=\"codespan\">dataset</code> brings convenience in data management separated with styles and enables data reuse by different series. More importantly, is enables data encoding from data to visual, which brings convenience in some scenarios.</p>\n<p>Before ECharts 4, data was only able to declared in each series, for example:</p>\n<pre><code class=\"lang-js\">option = {\n xAxis: [...]
"Add interaction to the chart component": "<p>Echarts provides many interaction components besides chart. For example:</p>\n<p><code class=\"codespan\">legend component</code> <a href=\"option.html#legend\" target=\"_blank\">legend</a>、<code class=\"codespan\">title component</code> <a href=\"option.html#title\" target=\"_blank\">title</a>、<code class=\"codespan\">visualmap component</code> <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a>、<code class=\"codespan\">dataz [...]
"Responsive Mobile-End": "<p>ECharts works in DOM nodes with user defined width and height. ECharts <em>component</em> and <em>series</em> are both in this DOM node, whose location can be assigned by user seperately. Inner components of charts are not suitable for implementing DOM flow layout. Instead, we use a simpler and more understandable layout similar to absolute layout. But sometimes when container is of extreme size, this method cannot avoid component overlapping automatically, [...]
- "Visual Map of Data": "<p>Data visualization is a procedure of mapping data into visual elements. This procedure can also be called visual coding, and visual elements can also be called visual tunnels.</p>\n<p>Every type of charts in ECharts has this built-in mapping procedure. For example, line charts map data into <em>lines</em>, bar charts map data into <em>length</em>. Some more complicated charts, like <code class=\"codespan\">graph</code>, <code class=\"codespan\">themeRiver</cod [...]
+ "Visual Map of Data": "<p>Data visualization is a procedure of mapping data into visual elements. This procedure can also be called visual coding, and visual elements can also be called visual tunnels.</p>\n<p>Every type of charts in ECharts has this built-in mapping procedure. For example, line charts map data into <em>lines</em>, bar charts map data into <em>length</em>. Some more complicated charts, like <code class=\"codespan\">graph</code>, <code class=\"codespan\">themeRiver</cod [...]
"Events and Actions in ECharts": "<p>User interactions trigger corresponding events in ECharts. Developers can listen to these events and handle accordingly through callback functions, e.g., redirecting to an address, popping out a dialog box, or drilling down data and so on.</p>\n<p>Binding events in ECharts 3 is though <a href=\"api.html#EChartsInstance.on\" target=\"_blank\">on</a> method, same as in ECharts 2. But event names are much simpler than it is in 2. Event names in ECharts [...]
"An Example: Implement Dragging": "<p>This is a tiny example, introducing how to implement dragging of graphic elements in echarts. From this example, we will see how to make an application with rich intractivity based on echarts API.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=line-draggable&edit=1&reset=1\" width=\"600\" height=\"400\" ></iframe>\n\n\n<p>This example mainly implements that dragging points of a curve and by which the curve is modified. A [...]
"Custom Series": "<p><a href=\"option.html#series-custom\" target=\"_blank\">custom series</a> is a type of series, which enable develpers to customize graphic elements rendering and generate new types of chart.</p>\n<p>Why echarts supports <code class=\"codespan\">custom series</code>? There are endless chart types in the world of data visualization, which are not enumerable. Thus only most common used chart types are built-in supported in echarts. For other chart types, it is necessa [...]
diff --git a/en/documents/tutorial.json b/en/documents/tutorial.json
index 3210114..23a5a7b 100644
--- a/en/documents/tutorial.json
+++ b/en/documents/tutorial.json
@@ -1 +1 @@
-{"$schema":"https://echarts.apache.org/doc/json-schem","option":{"type":"Object","properties":{"Get Started with ECharts in 5 minutes":{"type":["*"],"description":"<h2 id=\"installing-echarts\">Installing ECharts</h2>\n<p>First, install ECharts using one of the following methods:</p>\n<ul>\n<li><p>Download official source release from <a href=\"https://echarts.apache.org/download.html\" target=\"_blank\">Apache ECharts (incubating) website</a>. Then <a href=\"https://github.com/apache/in [...]
\ No newline at end of file
+{"$schema":"https://echarts.apache.org/doc/json-schem","option":{"type":"Object","properties":{"Get Started with ECharts in 5 minutes":{"type":["*"],"description":"<h2 id=\"installing-echarts\">Installing ECharts</h2>\n<p>First, install ECharts using one of the following methods:</p>\n<ul>\n<li><p>Download official source release from <a href=\"https://echarts.apache.org/download.html\" target=\"_blank\">Apache ECharts (incubating) website</a>. Then <a href=\"https://github.com/apache/in [...]
\ No newline at end of file
diff --git a/en/download-extension.html b/en/download-extension.html
index 112eb22..a92c9c0 100644
--- a/en/download-extension.html
+++ b/en/download-extension.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/en/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
diff --git a/en/download-map.html b/en/download-map.html
index 4130ec8..1f0cecf 100644
--- a/en/download-map.html
+++ b/en/download-map.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/en/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
diff --git a/en/download-theme.html b/en/download-theme.html
index 8b72515..6530fa5 100644
--- a/en/download-theme.html
+++ b/en/download-theme.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/en/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
diff --git a/en/download.html b/en/download.html
index b4e7f44..4792a93 100644
--- a/en/download.html
+++ b/en/download.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/en/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
@@ -16,7 +16,7 @@
font-weight: normal;
}
*/
-</style><nav class="navbar navbar-default navbar-fixed-top"><div class="container-fluid"><div class="navbar-header"><button type="button" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false" class="navbar-toggle collapsed"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button><a href="https://echarts.apache.org/en/index.html" class="navbar-brand"><img src="https://echarts.cdn [...]
+</style><nav class="navbar navbar-default navbar-fixed-top"><div class="container-fluid"><div class="navbar-header"><button type="button" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false" class="navbar-toggle collapsed"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button><a href="https://echarts.apache.org/en/index.html" class="navbar-brand"><img src="https://echarts.cdn [...]
//- var list = [
//- {
diff --git a/en/faq.html b/en/faq.html
index 86f5c00..0ca2ad5 100644
--- a/en/faq.html
+++ b/en/faq.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/en/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
diff --git a/en/feature.html b/en/feature.html
index d815ec2..8f461bf 100644
--- a/en/feature.html
+++ b/en/feature.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/en/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
diff --git a/en/index.html b/en/index.html
index cb9a6ed..1a5ec61 100644
--- a/en/index.html
+++ b/en/index.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/en/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
@@ -19,7 +19,7 @@
<a class="github-button" href="https://github.com/apache/incubator-echarts" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star apache/incubator-echarts on GitHub">GitHub Stars</a></p></div></div><div id="feature-4" class="row feature-detail"><div class="col-sm-4 col"><h2>Brand-new v4.0</h2><p>Rendering ability for ten-million-level data</p><p>Supports both SVG and Canvas rendering</p><p>Seperates data and style configuring</p><p>Accessibility supports</p>< [...]
</script></div></div></section><section id="publication"><div class="container"><div class="col-sm-8 col"><h2>ECharts: A Declarative Framework for Rapid Construction of Web-based Visualization</h2><p class="note"><i class="note-icon"><img classs="lazy" data-src="https://echarts.cdn.apache.org/en/images/note.svg" /></i> Please cite the following paper whenever you use ECharts in your R&D projects, products, research papers, technical reports, news reports, books, presentations, teaching, [...]
elements_selector: ".lazy"
-};</script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@12.0.0/dist/lazyload.min.js"></script><script src="https://echarts.cdn.apache.org/en/js/index.js?_v_=1590053981732"></script><script async defer src="https://buttons.github.io/buttons.js"></script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
+};</script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@12.0.0/dist/lazyload.min.js"></script><script src="https://echarts.cdn.apache.org/en/js/index.js?_v_=1590402874364"></script><script async defer src="https://buttons.github.io/buttons.js"></script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
diff --git a/en/js/download.js b/en/js/download.js
index 6509544..6fc4cb6 100644
--- a/en/js/download.js
+++ b/en/js/download.js
@@ -1 +1 @@
-for(var param=[{publishedAt:"2020-03-19T00:00:00Z",prerelease:!1,name:"4.7.0"},{publishedAt:"2019-12-30T00:00:00Z",prerelease:!1,name:"4.6.0"},{publishedAt:"2019-11-18T16:00:00Z",prerelease:!1,name:"4.5.0"},{publishedAt:"2019-10-15T01:12:00Z",prerelease:!1,name:"4.4.0"},{publishedAt:"2019-09-16T15:57:00Z",prerelease:!1,name:"4.3.0"},{publishedAt:"2019-03-21T10:27:59Z",prerelease:!1,name:"4.2.1"},{publishedAt:"2018-08-04T12:55:30Z",prerelease:!1,name:"4.1.0"}],table=document.getElementByI [...]
\ No newline at end of file
+for(var param=[{publishedAt:"2020-05-25T00:00:00Z",prerelease:!1,name:"4.8.0"},{publishedAt:"2020-03-19T00:00:00Z",prerelease:!1,name:"4.7.0"},{publishedAt:"2019-12-30T00:00:00Z",prerelease:!1,name:"4.6.0"},{publishedAt:"2019-11-18T16:00:00Z",prerelease:!1,name:"4.5.0"},{publishedAt:"2019-10-15T01:12:00Z",prerelease:!1,name:"4.4.0"},{publishedAt:"2019-09-16T15:57:00Z",prerelease:!1,name:"4.3.0"},{publishedAt:"2019-03-21T10:27:59Z",prerelease:!1,name:"4.2.1"},{publishedAt:"2018-08-04T12:5 [...]
\ No newline at end of file
diff --git a/en/maillist.html b/en/maillist.html
index f0d922a..384ee16 100644
--- a/en/maillist.html
+++ b/en/maillist.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/en/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
diff --git a/en/option-gl.html b/en/option-gl.html
index 1093d69..81f8295 100644
--- a/en/option-gl.html
+++ b/en/option-gl.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/en/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
@@ -9,8 +9,8 @@
</script><title>ECharts Documentation</title><style>html, body {
/* position: sticky should not have overflow parents.*/
overflow-x: hidden;
-}</style><link rel="stylesheet" href="https://echarts.cdn.apache.org/en/css/doc-bundle.css?_v_=1590053981732"><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/jquery@2.2.4/dist/jquery.min.js"></script></head><!--[if lte IE 8]><body class="lower-ie"><div id="lowie-main"><img src="https://echarts.cdn.apache.org/en/images/forie.png" alt="ie tip"></div></body><![endif]-->
-<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Apache ECharts is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.</p><p>We are working on redirecting this Website to <a href="https://echarts.apache.org" target="_blank">https://echarts.apache.org</a>. You may visit our new official Website now.</p></div><a href="https://echarts.apache.org" target="_blank" onclick="lo [...]
+}</style><link rel="stylesheet" href="https://echarts.cdn.apache.org/en/css/doc-bundle.css?_v_=1590402874364"><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/jquery@2.2.4/dist/jquery.min.js"></script></head><!--[if lte IE 8]><body class="lower-ie"><div id="lowie-main"><img src="https://echarts.cdn.apache.org/en/images/forie.png" alt="ie tip"></div></body><![endif]-->
+<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Apache ECharts is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.</p><p>We are working on redirecting this Website to <a href="https://echarts.apache.org" target="_blank">https://echarts.apache.org</a>. You may visit our new official Website now.</p></div><a href="https://echarts.apache.org" target="_blank" onclick="lo [...]
</script><script type="text/javascript">window.globalArgsExtra = {
baseUrl: 'documents/option-gl-parts',
docType: 'option-gl',
@@ -19,7 +19,7 @@
if (window.EC_WWW_CDN_ROOT) {
window.globalArgsExtra.cdnRoot = window.EC_WWW_CDN_ROOT + '/en/' + window.globalArgsExtra.baseUrl
}</script><script type="text/javascript">document.getElementById('nav-doc').className = 'active';
-window.globalArgsExtra.version = '1590053981732';
+window.globalArgsExtra.version = '1590402874364';
echartsDoc.init('#ec-doc-main', window.globalArgsExtra);</script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
diff --git a/en/option.html b/en/option.html
index 19f71a6..dd9c399 100644
--- a/en/option.html
+++ b/en/option.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/en/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
@@ -9,8 +9,8 @@
</script><title>ECharts Documentation</title><style>html, body {
/* position: sticky should not have overflow parents.*/
overflow-x: hidden;
-}</style><link rel="stylesheet" href="https://echarts.cdn.apache.org/en/css/doc-bundle.css?_v_=1590053981732"><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/jquery@2.2.4/dist/jquery.min.js"></script></head><!--[if lte IE 8]><body class="lower-ie"><div id="lowie-main"><img src="https://echarts.cdn.apache.org/en/images/forie.png" alt="ie tip"></div></body><![endif]-->
-<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Apache ECharts is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.</p><p>We are working on redirecting this Website to <a href="https://echarts.apache.org" target="_blank">https://echarts.apache.org</a>. You may visit our new official Website now.</p></div><a href="https://echarts.apache.org" target="_blank" onclick="lo [...]
+}</style><link rel="stylesheet" href="https://echarts.cdn.apache.org/en/css/doc-bundle.css?_v_=1590402874364"><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/jquery@2.2.4/dist/jquery.min.js"></script></head><!--[if lte IE 8]><body class="lower-ie"><div id="lowie-main"><img src="https://echarts.cdn.apache.org/en/images/forie.png" alt="ie tip"></div></body><![endif]-->
+<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Apache ECharts is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.</p><p>We are working on redirecting this Website to <a href="https://echarts.apache.org" target="_blank">https://echarts.apache.org</a>. You may visit our new official Website now.</p></div><a href="https://echarts.apache.org" target="_blank" onclick="lo [...]
</script><script type="text/javascript">window.globalArgsExtra = {
baseUrl: 'documents/option-parts',
docType: 'option',
@@ -19,7 +19,7 @@
if (window.EC_WWW_CDN_ROOT) {
window.globalArgsExtra.cdnRoot = window.EC_WWW_CDN_ROOT + '/en/' + window.globalArgsExtra.baseUrl
}</script><script type="text/javascript">document.getElementById('nav-doc').className = 'active';
-window.globalArgsExtra.version = '1590053981732';
+window.globalArgsExtra.version = '1590402874364';
echartsDoc.init('#ec-doc-main', window.globalArgsExtra);</script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
diff --git a/en/option3.html b/en/option3.html
index 7b642d7..3130a2f 100644
--- a/en/option3.html
+++ b/en/option3.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/en/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
diff --git a/en/tutorial.html b/en/tutorial.html
index eec6dd5..1c297ef 100644
--- a/en/tutorial.html
+++ b/en/tutorial.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
+<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no"><meta name="description" content="ECharts, a powerful, interactive charting and visualization library for browser"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/en/images/favicon.png"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7 [...]
</script><script type="text/javascript" src="https://echarts.cdn.apache.org/en/vendors/pace/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
var el = document.createElement('style');
el.innerHTML = ''
@@ -9,8 +9,8 @@
</script><title>ECharts Documentation</title><style>html, body {
/* position: sticky should not have overflow parents.*/
overflow-x: hidden;
-}</style><link rel="stylesheet" href="https://echarts.cdn.apache.org/en/css/doc-bundle.css?_v_=1590053981732"><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/jquery@2.2.4/dist/jquery.min.js"></script></head><!--[if lte IE 8]><body class="lower-ie"><div id="lowie-main"><img src="https://echarts.cdn.apache.org/en/images/forie.png" alt="ie tip"></div></body><![endif]-->
-<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Apache ECharts is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.</p><p>We are working on redirecting this Website to <a href="https://echarts.apache.org" target="_blank">https://echarts.apache.org</a>. You may visit our new official Website now.</p></div><a href="https://echarts.apache.org" target="_blank" onclick="lo [...]
+}</style><link rel="stylesheet" href="https://echarts.cdn.apache.org/en/css/doc-bundle.css?_v_=1590402874364"><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/jquery@2.2.4/dist/jquery.min.js"></script></head><!--[if lte IE 8]><body class="lower-ie"><div id="lowie-main"><img src="https://echarts.cdn.apache.org/en/images/forie.png" alt="ie tip"></div></body><![endif]-->
+<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Apache ECharts is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.</p><p>We are working on redirecting this Website to <a href="https://echarts.apache.org" target="_blank">https://echarts.apache.org</a>. You may visit our new official Website now.</p></div><a href="https://echarts.apache.org" target="_blank" onclick="lo [...]
</script><script type="text/javascript">window.globalArgsExtra = {
baseUrl: 'documents/tutorial-parts',
docType: 'tutorial',
@@ -19,7 +19,7 @@
if (window.EC_WWW_CDN_ROOT) {
window.globalArgsExtra.cdnRoot = window.EC_WWW_CDN_ROOT + '/en/' + window.globalArgsExtra.baseUrl
}</script><script type="text/javascript">document.getElementById('nav-doc').className = 'active';
-window.globalArgsExtra.version = '1590053981732';
+window.globalArgsExtra.version = '1590402874364';
echartsDoc.init('#ec-doc-main', window.globalArgsExtra);</script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
diff --git a/examples/data/thumb-dark/area-pieces.jpg b/examples/data/thumb-dark/area-pieces.jpg
index 60dc18e..cd585e4 100644
Binary files a/examples/data/thumb-dark/area-pieces.jpg and b/examples/data/thumb-dark/area-pieces.jpg differ
diff --git a/examples/data/thumb-dark/calendar-charts.jpg b/examples/data/thumb-dark/calendar-charts.jpg
index 4fa1d19..65dae14 100644
Binary files a/examples/data/thumb-dark/calendar-charts.jpg and b/examples/data/thumb-dark/calendar-charts.jpg differ
diff --git a/examples/data/thumb-dark/calendar-effectscatter.jpg b/examples/data/thumb-dark/calendar-effectscatter.jpg
index 5b0a869..b25031b 100644
Binary files a/examples/data/thumb-dark/calendar-effectscatter.jpg and b/examples/data/thumb-dark/calendar-effectscatter.jpg differ
diff --git a/examples/data/thumb-dark/confidence-band.jpg b/examples/data/thumb-dark/confidence-band.jpg
index e96f1bb..18ee4f4 100644
Binary files a/examples/data/thumb-dark/confidence-band.jpg and b/examples/data/thumb-dark/confidence-band.jpg differ
diff --git a/examples/data/thumb-dark/custom-profile.jpg b/examples/data/thumb-dark/custom-profile.jpg
index db8b0f6..b30d277 100644
Binary files a/examples/data/thumb-dark/custom-profile.jpg and b/examples/data/thumb-dark/custom-profile.jpg differ
diff --git a/examples/data/thumb-dark/dynamic-data.jpg b/examples/data/thumb-dark/dynamic-data.jpg
index 33c986d..da05a42 100644
Binary files a/examples/data/thumb-dark/dynamic-data.jpg and b/examples/data/thumb-dark/dynamic-data.jpg differ
diff --git a/examples/data/thumb-dark/dynamic-data2.jpg b/examples/data/thumb-dark/dynamic-data2.jpg
index a641344..b83cc26 100644
Binary files a/examples/data/thumb-dark/dynamic-data2.jpg and b/examples/data/thumb-dark/dynamic-data2.jpg differ
diff --git a/examples/data/thumb-dark/effectScatter-bmap.jpg b/examples/data/thumb-dark/effectScatter-bmap.jpg
index 88f6514..ae8df14 100644
Binary files a/examples/data/thumb-dark/effectScatter-bmap.jpg and b/examples/data/thumb-dark/effectScatter-bmap.jpg differ
diff --git a/examples/data/thumb-dark/effectScatter-map.jpg b/examples/data/thumb-dark/effectScatter-map.jpg
index bcf7b6f..ecbc29c 100644
Binary files a/examples/data/thumb-dark/effectScatter-map.jpg and b/examples/data/thumb-dark/effectScatter-map.jpg differ
diff --git a/examples/data/thumb-dark/geo-lines.jpg b/examples/data/thumb-dark/geo-lines.jpg
index bb1052a..058e7e6 100644
Binary files a/examples/data/thumb-dark/geo-lines.jpg and b/examples/data/thumb-dark/geo-lines.jpg differ
diff --git a/examples/data/thumb-dark/graph-webkit-dep.jpg b/examples/data/thumb-dark/graph-webkit-dep.jpg
index 8b5c093..68795d4 100644
Binary files a/examples/data/thumb-dark/graph-webkit-dep.jpg and b/examples/data/thumb-dark/graph-webkit-dep.jpg differ
diff --git a/examples/data/thumb-dark/heatmap-cartesian.jpg b/examples/data/thumb-dark/heatmap-cartesian.jpg
index 3c7d2b7..93cd6da 100644
Binary files a/examples/data/thumb-dark/heatmap-cartesian.jpg and b/examples/data/thumb-dark/heatmap-cartesian.jpg differ
diff --git a/examples/data/thumb-dark/heatmap-large-piecewise.jpg b/examples/data/thumb-dark/heatmap-large-piecewise.jpg
index 7191ad5..bb4b588 100644
Binary files a/examples/data/thumb-dark/heatmap-large-piecewise.jpg and b/examples/data/thumb-dark/heatmap-large-piecewise.jpg differ
diff --git a/examples/data/thumb-dark/heatmap-large.jpg b/examples/data/thumb-dark/heatmap-large.jpg
index 78cca2c..b914f19 100644
Binary files a/examples/data/thumb-dark/heatmap-large.jpg and b/examples/data/thumb-dark/heatmap-large.jpg differ
diff --git a/examples/data/thumb-dark/line-easing.jpg b/examples/data/thumb-dark/line-easing.jpg
index 08fffcb..6f66a33 100644
Binary files a/examples/data/thumb-dark/line-easing.jpg and b/examples/data/thumb-dark/line-easing.jpg differ
diff --git a/examples/data/thumb-dark/mix-timeline-finance.jpg b/examples/data/thumb-dark/mix-timeline-finance.jpg
index 4414c6a..4800605 100644
Binary files a/examples/data/thumb-dark/mix-timeline-finance.jpg and b/examples/data/thumb-dark/mix-timeline-finance.jpg differ
diff --git a/examples/data/thumb-dark/pictorialBar-dotted.jpg b/examples/data/thumb-dark/pictorialBar-dotted.jpg
index 83ce710..0477bbf 100644
Binary files a/examples/data/thumb-dark/pictorialBar-dotted.jpg and b/examples/data/thumb-dark/pictorialBar-dotted.jpg differ
diff --git a/examples/data/thumb-dark/scatter-effect.jpg b/examples/data/thumb-dark/scatter-effect.jpg
index 9adf02a..9a26876 100644
Binary files a/examples/data/thumb-dark/scatter-effect.jpg and b/examples/data/thumb-dark/scatter-effect.jpg differ
diff --git a/examples/data/thumb-dark/scatter-life-expectancy-timeline.jpg b/examples/data/thumb-dark/scatter-life-expectancy-timeline.jpg
index d89aa5d..846906e 100644
Binary files a/examples/data/thumb-dark/scatter-life-expectancy-timeline.jpg and b/examples/data/thumb-dark/scatter-life-expectancy-timeline.jpg differ
diff --git a/examples/data/thumb-dark/scatter-nebula.jpg b/examples/data/thumb-dark/scatter-nebula.jpg
index 5371391..dbe01ef 100644
Binary files a/examples/data/thumb-dark/scatter-nebula.jpg and b/examples/data/thumb-dark/scatter-nebula.jpg differ
diff --git a/examples/data/thumb-dark/scatter-nutrients-matrix.jpg b/examples/data/thumb-dark/scatter-nutrients-matrix.jpg
index e6d1d18..de90af0 100644
Binary files a/examples/data/thumb-dark/scatter-nutrients-matrix.jpg and b/examples/data/thumb-dark/scatter-nutrients-matrix.jpg differ
diff --git a/examples/data/thumb-dark/scatter-nutrients.jpg b/examples/data/thumb-dark/scatter-nutrients.jpg
index 2e188f5..0495f7c 100644
Binary files a/examples/data/thumb-dark/scatter-nutrients.jpg and b/examples/data/thumb-dark/scatter-nutrients.jpg differ
diff --git a/examples/data/thumb-dark/scatter-weibo.jpg b/examples/data/thumb-dark/scatter-weibo.jpg
index 8f2107f..144403d 100644
Binary files a/examples/data/thumb-dark/scatter-weibo.jpg and b/examples/data/thumb-dark/scatter-weibo.jpg differ
diff --git a/examples/data/thumb-light/area-pieces.jpg b/examples/data/thumb-light/area-pieces.jpg
index 34e25a4..ea72e61 100644
Binary files a/examples/data/thumb-light/area-pieces.jpg and b/examples/data/thumb-light/area-pieces.jpg differ
diff --git a/examples/data/thumb-light/calendar-charts.jpg b/examples/data/thumb-light/calendar-charts.jpg
index 16d452e..c1edbea 100644
Binary files a/examples/data/thumb-light/calendar-charts.jpg and b/examples/data/thumb-light/calendar-charts.jpg differ
diff --git a/examples/data/thumb-light/calendar-effectscatter.jpg b/examples/data/thumb-light/calendar-effectscatter.jpg
index 358e384..cd5b7c0 100644
Binary files a/examples/data/thumb-light/calendar-effectscatter.jpg and b/examples/data/thumb-light/calendar-effectscatter.jpg differ
diff --git a/examples/data/thumb-light/confidence-band.jpg b/examples/data/thumb-light/confidence-band.jpg
index 9f65858..d6d05de 100644
Binary files a/examples/data/thumb-light/confidence-band.jpg and b/examples/data/thumb-light/confidence-band.jpg differ
diff --git a/examples/data/thumb-light/custom-profile.jpg b/examples/data/thumb-light/custom-profile.jpg
index 4759393..1f5608f 100644
Binary files a/examples/data/thumb-light/custom-profile.jpg and b/examples/data/thumb-light/custom-profile.jpg differ
diff --git a/examples/data/thumb-light/dynamic-data.jpg b/examples/data/thumb-light/dynamic-data.jpg
index 0bbc4d1..55cee84 100644
Binary files a/examples/data/thumb-light/dynamic-data.jpg and b/examples/data/thumb-light/dynamic-data.jpg differ
diff --git a/examples/data/thumb-light/effectScatter-bmap.jpg b/examples/data/thumb-light/effectScatter-bmap.jpg
index 6bbefa0..f2bd21a 100644
Binary files a/examples/data/thumb-light/effectScatter-bmap.jpg and b/examples/data/thumb-light/effectScatter-bmap.jpg differ
diff --git a/examples/data/thumb-light/effectScatter-map.jpg b/examples/data/thumb-light/effectScatter-map.jpg
index be22534..de3c5f7 100644
Binary files a/examples/data/thumb-light/effectScatter-map.jpg and b/examples/data/thumb-light/effectScatter-map.jpg differ
diff --git a/examples/data/thumb-light/geo-lines.jpg b/examples/data/thumb-light/geo-lines.jpg
index 8ab24eb..6d99268 100644
Binary files a/examples/data/thumb-light/geo-lines.jpg and b/examples/data/thumb-light/geo-lines.jpg differ
diff --git a/examples/data/thumb-light/graph-life-expectancy.jpg b/examples/data/thumb-light/graph-life-expectancy.jpg
index 2cfdd5a..2a1345f 100644
Binary files a/examples/data/thumb-light/graph-life-expectancy.jpg and b/examples/data/thumb-light/graph-life-expectancy.jpg differ
diff --git a/examples/data/thumb-light/graph-webkit-dep.jpg b/examples/data/thumb-light/graph-webkit-dep.jpg
index 91758c4..7531840 100644
Binary files a/examples/data/thumb-light/graph-webkit-dep.jpg and b/examples/data/thumb-light/graph-webkit-dep.jpg differ
diff --git a/examples/data/thumb-light/heatmap-bmap.jpg b/examples/data/thumb-light/heatmap-bmap.jpg
index 6703db7..2d6ca9d 100644
Binary files a/examples/data/thumb-light/heatmap-bmap.jpg and b/examples/data/thumb-light/heatmap-bmap.jpg differ
diff --git a/examples/data/thumb-light/heatmap-cartesian.jpg b/examples/data/thumb-light/heatmap-cartesian.jpg
index 0151517..976c0e4 100644
Binary files a/examples/data/thumb-light/heatmap-cartesian.jpg and b/examples/data/thumb-light/heatmap-cartesian.jpg differ
diff --git a/examples/data/thumb-light/heatmap-large-piecewise.jpg b/examples/data/thumb-light/heatmap-large-piecewise.jpg
index 0c73831..b1c97f9 100644
Binary files a/examples/data/thumb-light/heatmap-large-piecewise.jpg and b/examples/data/thumb-light/heatmap-large-piecewise.jpg differ
diff --git a/examples/data/thumb-light/heatmap-large.jpg b/examples/data/thumb-light/heatmap-large.jpg
index 345b1cc..821d82b 100644
Binary files a/examples/data/thumb-light/heatmap-large.jpg and b/examples/data/thumb-light/heatmap-large.jpg differ
diff --git a/examples/data/thumb-light/line-easing.jpg b/examples/data/thumb-light/line-easing.jpg
index 2c35a67..87240e7 100644
Binary files a/examples/data/thumb-light/line-easing.jpg and b/examples/data/thumb-light/line-easing.jpg differ
diff --git a/examples/data/thumb-light/mix-timeline-finance.jpg b/examples/data/thumb-light/mix-timeline-finance.jpg
index cdae51b..691482a 100644
Binary files a/examples/data/thumb-light/mix-timeline-finance.jpg and b/examples/data/thumb-light/mix-timeline-finance.jpg differ
diff --git a/examples/data/thumb-light/pictorialBar-dotted.jpg b/examples/data/thumb-light/pictorialBar-dotted.jpg
index c6299f8..72d49be 100644
Binary files a/examples/data/thumb-light/pictorialBar-dotted.jpg and b/examples/data/thumb-light/pictorialBar-dotted.jpg differ
diff --git a/examples/data/thumb-light/scatter-effect.jpg b/examples/data/thumb-light/scatter-effect.jpg
index 417168a..b06e084 100644
Binary files a/examples/data/thumb-light/scatter-effect.jpg and b/examples/data/thumb-light/scatter-effect.jpg differ
diff --git a/examples/data/thumb-light/scatter-life-expectancy-timeline.jpg b/examples/data/thumb-light/scatter-life-expectancy-timeline.jpg
index b6385de..b2e45df 100644
Binary files a/examples/data/thumb-light/scatter-life-expectancy-timeline.jpg and b/examples/data/thumb-light/scatter-life-expectancy-timeline.jpg differ
diff --git a/examples/data/thumb-light/scatter-nebula.jpg b/examples/data/thumb-light/scatter-nebula.jpg
index 18d543e..ea0d575 100644
Binary files a/examples/data/thumb-light/scatter-nebula.jpg and b/examples/data/thumb-light/scatter-nebula.jpg differ
diff --git a/examples/data/thumb-light/scatter-nutrients-matrix.jpg b/examples/data/thumb-light/scatter-nutrients-matrix.jpg
index 9f2c9ca..a8d679a 100644
Binary files a/examples/data/thumb-light/scatter-nutrients-matrix.jpg and b/examples/data/thumb-light/scatter-nutrients-matrix.jpg differ
diff --git a/examples/data/thumb-light/scatter-nutrients.jpg b/examples/data/thumb-light/scatter-nutrients.jpg
index 3f5deed..66d74e7 100644
Binary files a/examples/data/thumb-light/scatter-nutrients.jpg and b/examples/data/thumb-light/scatter-nutrients.jpg differ
diff --git a/examples/data/thumb-light/scatter-weibo.jpg b/examples/data/thumb-light/scatter-weibo.jpg
index 8f2107f..207af4a 100644
Binary files a/examples/data/thumb-light/scatter-weibo.jpg and b/examples/data/thumb-light/scatter-weibo.jpg differ
diff --git a/examples/data/thumb/area-pieces.jpg b/examples/data/thumb/area-pieces.jpg
index 1060f08..0e19c6a 100644
Binary files a/examples/data/thumb/area-pieces.jpg and b/examples/data/thumb/area-pieces.jpg differ
diff --git a/examples/data/thumb/calendar-charts.jpg b/examples/data/thumb/calendar-charts.jpg
index 7d89f6e..a415392 100644
Binary files a/examples/data/thumb/calendar-charts.jpg and b/examples/data/thumb/calendar-charts.jpg differ
diff --git a/examples/data/thumb/calendar-effectscatter.jpg b/examples/data/thumb/calendar-effectscatter.jpg
index a4846f8..956ad2b 100644
Binary files a/examples/data/thumb/calendar-effectscatter.jpg and b/examples/data/thumb/calendar-effectscatter.jpg differ
diff --git a/examples/data/thumb/confidence-band.jpg b/examples/data/thumb/confidence-band.jpg
index 8148a70..a3e5fc4 100644
Binary files a/examples/data/thumb/confidence-band.jpg and b/examples/data/thumb/confidence-band.jpg differ
diff --git a/examples/data/thumb/custom-profile.jpg b/examples/data/thumb/custom-profile.jpg
index 8237f41..0b4194a 100644
Binary files a/examples/data/thumb/custom-profile.jpg and b/examples/data/thumb/custom-profile.jpg differ
diff --git a/examples/data/thumb/dynamic-data.jpg b/examples/data/thumb/dynamic-data.jpg
index 3800b07..a0bd68c 100644
Binary files a/examples/data/thumb/dynamic-data.jpg and b/examples/data/thumb/dynamic-data.jpg differ
diff --git a/examples/data/thumb/dynamic-data2.jpg b/examples/data/thumb/dynamic-data2.jpg
index 9b45201..6649480 100644
Binary files a/examples/data/thumb/dynamic-data2.jpg and b/examples/data/thumb/dynamic-data2.jpg differ
diff --git a/examples/data/thumb/effectScatter-bmap.jpg b/examples/data/thumb/effectScatter-bmap.jpg
index 604b950..c8ed7b1 100644
Binary files a/examples/data/thumb/effectScatter-bmap.jpg and b/examples/data/thumb/effectScatter-bmap.jpg differ
diff --git a/examples/data/thumb/effectScatter-map.jpg b/examples/data/thumb/effectScatter-map.jpg
index b0f3da2..b7a9498 100644
Binary files a/examples/data/thumb/effectScatter-map.jpg and b/examples/data/thumb/effectScatter-map.jpg differ
diff --git a/examples/data/thumb/geo-lines.jpg b/examples/data/thumb/geo-lines.jpg
index 7265a2e..8c4a8e1 100644
Binary files a/examples/data/thumb/geo-lines.jpg and b/examples/data/thumb/geo-lines.jpg differ
diff --git a/examples/data/thumb/graph-force.jpg b/examples/data/thumb/graph-force.jpg
index 69ce609..5cb352f 100644
Binary files a/examples/data/thumb/graph-force.jpg and b/examples/data/thumb/graph-force.jpg differ
diff --git a/examples/data/thumb/graph-life-expectancy.jpg b/examples/data/thumb/graph-life-expectancy.jpg
index b46e75a..01a3759 100644
Binary files a/examples/data/thumb/graph-life-expectancy.jpg and b/examples/data/thumb/graph-life-expectancy.jpg differ
diff --git a/examples/data/thumb/graph-webkit-dep.jpg b/examples/data/thumb/graph-webkit-dep.jpg
index 3b6702c..1c100ab 100644
Binary files a/examples/data/thumb/graph-webkit-dep.jpg and b/examples/data/thumb/graph-webkit-dep.jpg differ
diff --git a/examples/data/thumb/heatmap-bmap.jpg b/examples/data/thumb/heatmap-bmap.jpg
index 6703db7..2d6ca9d 100644
Binary files a/examples/data/thumb/heatmap-bmap.jpg and b/examples/data/thumb/heatmap-bmap.jpg differ
diff --git a/examples/data/thumb/heatmap-cartesian.jpg b/examples/data/thumb/heatmap-cartesian.jpg
index 0151517..976c0e4 100644
Binary files a/examples/data/thumb/heatmap-cartesian.jpg and b/examples/data/thumb/heatmap-cartesian.jpg differ
diff --git a/examples/data/thumb/heatmap-large-piecewise.jpg b/examples/data/thumb/heatmap-large-piecewise.jpg
index 0c73831..b1c97f9 100644
Binary files a/examples/data/thumb/heatmap-large-piecewise.jpg and b/examples/data/thumb/heatmap-large-piecewise.jpg differ
diff --git a/examples/data/thumb/heatmap-large.jpg b/examples/data/thumb/heatmap-large.jpg
index 345b1cc..821d82b 100644
Binary files a/examples/data/thumb/heatmap-large.jpg and b/examples/data/thumb/heatmap-large.jpg differ
diff --git a/examples/data/thumb/line-easing.jpg b/examples/data/thumb/line-easing.jpg
index 74a3c1d..a4dbf59 100644
Binary files a/examples/data/thumb/line-easing.jpg and b/examples/data/thumb/line-easing.jpg differ
diff --git a/examples/data/thumb/mix-timeline-finance.jpg b/examples/data/thumb/mix-timeline-finance.jpg
index f7314ae..c5f589c 100644
Binary files a/examples/data/thumb/mix-timeline-finance.jpg and b/examples/data/thumb/mix-timeline-finance.jpg differ
diff --git a/examples/data/thumb/pictorialBar-dotted.jpg b/examples/data/thumb/pictorialBar-dotted.jpg
index d857c36..3c4ff9b 100644
Binary files a/examples/data/thumb/pictorialBar-dotted.jpg and b/examples/data/thumb/pictorialBar-dotted.jpg differ
diff --git a/examples/data/thumb/scatter-effect.jpg b/examples/data/thumb/scatter-effect.jpg
index 1b51070..347fac5 100644
Binary files a/examples/data/thumb/scatter-effect.jpg and b/examples/data/thumb/scatter-effect.jpg differ
diff --git a/examples/data/thumb/scatter-life-expectancy-timeline.jpg b/examples/data/thumb/scatter-life-expectancy-timeline.jpg
index e54cf23..ec229f0 100644
Binary files a/examples/data/thumb/scatter-life-expectancy-timeline.jpg and b/examples/data/thumb/scatter-life-expectancy-timeline.jpg differ
diff --git a/examples/data/thumb/scatter-nebula.jpg b/examples/data/thumb/scatter-nebula.jpg
index f8f92cc..aadfc94 100644
Binary files a/examples/data/thumb/scatter-nebula.jpg and b/examples/data/thumb/scatter-nebula.jpg differ
diff --git a/examples/data/thumb/scatter-nutrients-matrix.jpg b/examples/data/thumb/scatter-nutrients-matrix.jpg
index b0fcc7a..2cb2d57 100644
Binary files a/examples/data/thumb/scatter-nutrients-matrix.jpg and b/examples/data/thumb/scatter-nutrients-matrix.jpg differ
diff --git a/examples/data/thumb/scatter-nutrients.jpg b/examples/data/thumb/scatter-nutrients.jpg
index cb0d533..f1893b8 100644
Binary files a/examples/data/thumb/scatter-nutrients.jpg and b/examples/data/thumb/scatter-nutrients.jpg differ
diff --git a/examples/data/thumb/scatter-weibo.jpg b/examples/data/thumb/scatter-weibo.jpg
index 3f5c655..8f2107f 100644
Binary files a/examples/data/thumb/scatter-weibo.jpg and b/examples/data/thumb/scatter-weibo.jpg differ
diff --git a/examples/en/editor.html b/examples/en/editor.html
index 6092530..26f3e9b 100644
--- a/examples/en/editor.html
+++ b/examples/en/editor.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" type="text/css" href="https://echarts.cdn.apache.org/examples/vendors/bootstrap/css/bootstrap.css"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/examples/images/favicon.png"><!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries--><!--[if lt IE 9]><scrip [...]
+<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" type="text/css" href="https://echarts.cdn.apache.org/examples/vendors/bootstrap/css/bootstrap.css"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/examples/images/favicon.png"><!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries--><!--[if lt IE 9]><scrip [...]
</script></head><body><div id="apache-banner"><div class="txt"><p>Apache ECharts is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.</p><p>We are working on redirecting this Website to <a href="https://echarts.apache.org" target="_blank">https://echarts.apache.org</a>. You may visit our new official Website now for the latest information.</p></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="b [...]
var menu = document.getElementById(selector);
if (menu) {
@@ -40,7 +40,7 @@ window.EC_EXAMPLE_IS_GL = (function () {
// But echarts-gl do not support CORS yet, still use same origin.
window.ROOT_PATH = EC_EXAMPLE_IS_GL ? 'https://echarts.apache.org/examples/' : 'https://echarts.cdn.apache.org/examples/';
window.CDN_ROOT_PATH = 'https://echarts.cdn.apache.org/examples/';
-</script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/vendors/dat.gui.min.js"></script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/vendors/echarts/echarts.min.js?_v_=1590053975637"></script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/vendors/echarts-stat/ecStat.min.js?_v_=1590053975637"></script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/vendors/echarts/map/js/c [...]
+</script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/vendors/dat.gui.min.js"></script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/vendors/echarts/echarts.min.js?_v_=1590402870700"></script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/vendors/echarts-stat/ecStat.min.js?_v_=1590402870700"></script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/vendors/echarts/map/js/c [...]
(function() {
var hm = document.createElement("script");
diff --git a/examples/en/index.html b/examples/en/index.html
index ad77c55..ff83a80 100644
--- a/examples/en/index.html
+++ b/examples/en/index.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" type="text/css" href="https://echarts.cdn.apache.org/examples/vendors/bootstrap/css/bootstrap.css"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/examples/images/favicon.png"><!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries--><!--[if lt IE 9]><scrip [...]
+<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" type="text/css" href="https://echarts.cdn.apache.org/examples/vendors/bootstrap/css/bootstrap.css"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/examples/images/favicon.png"><!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries--><!--[if lt IE 9]><scrip [...]
</script></head><body><div id="apache-banner"><div class="txt"><p>Apache ECharts is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.</p><p>We are working on redirecting this Website to <a href="https://echarts.apache.org" target="_blank">https://echarts.apache.org</a>. You may visit our new official Website now for the latest information.</p></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="b [...]
var menu = document.getElementById(selector);
if (menu) {
@@ -36,7 +36,7 @@ window.EC_EXAMPLE_IS_GL = (function () {
// But echarts-gl do not support CORS yet, still use same origin.
window.ROOT_PATH = EC_EXAMPLE_IS_GL ? 'https://echarts.apache.org/examples/' : 'https://echarts.cdn.apache.org/examples/';
window.CDN_ROOT_PATH = 'https://echarts.cdn.apache.org/examples/';
-</script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/vendors/waypoint.js"></script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/vendors/jquery.lazyload.min.js"></script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/javascripts/chart-list-data.js?_v_=1590053975637"></script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/javascripts/chart-list-data-gl.js?_v_=15900539756 [...]
+</script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/vendors/waypoint.js"></script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/vendors/jquery.lazyload.min.js"></script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/javascripts/chart-list-data.js?_v_=1590402870700"></script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/javascripts/chart-list-data-gl.js?_v_=15904028707 [...]
(function() {
var hm = document.createElement("script");
diff --git a/examples/en/view.html b/examples/en/view.html
index d6f2389..626708d 100644
--- a/examples/en/view.html
+++ b/examples/en/view.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" type="text/css" href="https://echarts.cdn.apache.org/examples/vendors/bootstrap/css/bootstrap.css"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/examples/images/favicon.png"><!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries--><!--[if lt IE 9]><scrip [...]
+<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" type="text/css" href="https://echarts.cdn.apache.org/examples/vendors/bootstrap/css/bootstrap.css"><link rel="shortcut icon" href="https://echarts.cdn.apache.org/examples/images/favicon.png"><!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries--><!--[if lt IE 9]><scrip [...]
</script></head><body><div id="apache-banner"><div class="txt"><p>Apache ECharts is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.</p><p>We are working on redirecting this Website to <a href="https://echarts.apache.org" target="_blank">https://echarts.apache.org</a>. You may visit our new official Website now for the latest information.</p></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="b [...]
if (lang === 'en') {
if (location.hostname !== 'echarts.apache.org') {
@@ -31,7 +31,7 @@ window.EC_EXAMPLE_IS_GL = (function () {
// But echarts-gl do not support CORS yet, still use same origin.
window.ROOT_PATH = EC_EXAMPLE_IS_GL ? 'https://echarts.apache.org/examples/' : 'https://echarts.cdn.apache.org/examples/';
window.CDN_ROOT_PATH = 'https://echarts.cdn.apache.org/examples/';
-</script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/vendors/dat.gui.min.js"></script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/vendors/echarts/echarts.min.js?_v_=1590053975637"></script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/vendors/echarts-stat/ecStat.min.js?_v_=1590053975637"></script><script id="echarts-js" type="text/javascript" src="https://echarts.cdn.apache.org/examples/vendors/ [...]
+</script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/vendors/dat.gui.min.js"></script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/vendors/echarts/echarts.min.js?_v_=1590402870700"></script><script type="text/javascript" src="https://echarts.cdn.apache.org/examples/vendors/echarts-stat/ecStat.min.js?_v_=1590402870700"></script><script id="echarts-js" type="text/javascript" src="https://echarts.cdn.apache.org/examples/vendors/ [...]
(function() {
var hm = document.createElement("script");
diff --git a/examples/vendors/echarts/echarts.js b/examples/vendors/echarts/echarts.js
index 49a2582..dd55582 100644
--- a/examples/vendors/echarts/echarts.js
+++ b/examples/vendors/echarts/echarts.js
@@ -10252,6 +10252,10 @@ Painter.prototype = {
if (this._layerConfig[zlevel]) {
merge(layer, this._layerConfig[zlevel], true);
}
+ // TODO Remove EL_AFTER_INCREMENTAL_INC magic number
+ else if (this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC]) {
+ merge(layer, this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC], true);
+ }
if (virtual) {
layer.virtual = virtual;
@@ -10404,12 +10408,26 @@ Painter.prototype = {
var prevLayer = null;
var incrementalLayerCount = 0;
+ var prevZlevel;
for (var i = 0; i < list.length; i++) {
var el = list[i];
var zlevel = el.zlevel;
var layer;
- // PENDING If change one incremental element style ?
- // TODO Where there are non-incremental elements between incremental elements.
+
+ if (prevZlevel !== zlevel) {
+ prevZlevel = zlevel;
+ incrementalLayerCount = 0;
+ }
+
+ // TODO Not use magic number on zlevel.
+
+ // Each layer with increment element can be separated to 3 layers.
+ // (Other Element drawn after incremental element)
+ // -----------------zlevel + EL_AFTER_INCREMENTAL_INC--------------------
+ // (Incremental element)
+ // ----------------------zlevel + INCREMENTAL_INC------------------------
+ // (Element drawn before incremental element)
+ // --------------------------------zlevel--------------------------------
if (el.incremental) {
layer = this.getLayer(zlevel + INCREMENTAL_INC, this._needsManuallyCompositing);
layer.incremental = true;
@@ -10504,6 +10522,7 @@ Painter.prototype = {
for (var i = 0; i < this._zlevelList.length; i++) {
var _zlevel = this._zlevelList[i];
+ // TODO Remove EL_AFTER_INCREMENTAL_INC magic number
if (_zlevel === zlevel || _zlevel === zlevel + EL_AFTER_INCREMENTAL_INC) {
var layer = this._layers[_zlevel];
merge(layer, layerConfig[zlevel], true);
@@ -11576,7 +11595,7 @@ var instances$1 = {}; // ZRender实例map索引
... 11407 lines suppressed ...
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org