update
diff --git a/committer.html b/committer.html
index d24bdb5..6033730 100644
--- a/committer.html
+++ b/committer.html
@@ -3,6 +3,6 @@
     var search = (location.search || '').replace('?', '');
     var lang = navigator.language || navigator.userLanguage;
     lang = lang.indexOf('zh') > -1 ? 'zh' : 'en';
-    location.href = 'https://echarts.apache.org/' + lang + '/committer.html'
+    location.href = 'https://echarts.apache.org/' + lang + '/committers.html'
         + (search ? '?' + search : '') + (hash ? '#' + hash : '');
 })();</script></head></html>
\ No newline at end of file
diff --git a/committers.html b/committers.html
new file mode 100644
index 0000000..6033730
--- /dev/null
+++ b/committers.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><script type="text/javascript">(function () {
+    var hash = (location.hash || '').replace('#', '');
+    var search = (location.search || '').replace('?', '');
+    var lang = navigator.language || navigator.userLanguage;
+    lang = lang.indexOf('zh') > -1 ? 'zh' : 'en';
+    location.href = 'https://echarts.apache.org/' + lang + '/committers.html'
+        + (search ? '?' + search : '') + (hash ? '#' + hash : '');
+})();</script></head></html>
\ No newline at end of file
diff --git a/en/api.html b/en/api.html
index 15865be..bfab97a 100644
--- a/en/api.html
+++ b/en/api.html
@@ -19,7 +19,7 @@
 };
 if (window.EC_WWW_CDN_PAY_ROOT) {
     window.globalArgsExtra.cdnRoot = window.EC_WWW_CDN_PAY_ROOT + '/en/' + window.globalArgsExtra.baseUrl
-}</script><script type="text/javascript">window.globalArgsExtra.version = '5728b56521';
+}</script><script type="text/javascript">window.globalArgsExtra.version = '7bbe88c914';
 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/echarts.html b/en/builder/echarts.html
index 93209ea..75aa6ed 100644
--- a/en/builder/echarts.html
+++ b/en/builder/echarts.html
@@ -54,7 +54,7 @@
                 'rollup': 'lib/rollup.browser',
                 'transformDev': 'lib/transform-dev-bundle'
             },
-            urlArgs: 'v=1624430965835'
+            urlArgs: 'v=1625800930981'
         });
 
         require(['build']);
diff --git a/en/committers.html b/en/committers.html
index b451c6b..072f8f9 100644
--- a/en/committers.html
+++ b/en/committers.html
@@ -7,7 +7,7 @@
     document.head.insertBefore(el, document.getElementById('font-hack'));
 }
 </script><title>Committers - Apache 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.apache.org/en/images/forie.png?_v_=20200710_1" alt="ie tip"></div></body><![endif]-->
-<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Please visit the official Apache ECharts Website at</p><a id="a2" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>Visit Official Website</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><nav class="navbar navbar-default navbar-fixed-top"><nav role="navigation" 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.apache.org/en/images/logo.png" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/en/index.html">Home</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Docs<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/feature.html">Features</a></li><li><a href="https://echarts.apache.org/en/tutorial.html">Tutorials</a></li><li><a href="https://echarts.apache.org/en/api.html">API</a></li><li><a href="https://echarts.apache.org/en/option.html">Chart Configuration</a></li><li><a href="https://echarts.apache.org/en/changelog.html">Changelog</a></li><li><a href="https://echarts.apache.org/en/faq.html">FAQ</a></li><li><a href="https://echarts.apache.org/en/tutorial.html#ECharts%205%20Upgrade%20Guide">V5 Upgrade Guide<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Download<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/download.html">Download</a></li><li><a href="https://echarts.apache.org/en/download-theme.html">Download Themes</a></li><li><a href="https://echarts.apache.org/en/download-extension.html">Download Extensions</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/en/index.html">Examples</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Resources<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/spreadsheet.html">Spread Sheet Tool</a></li><li><a href="https://echarts.apache.org/en/theme-builder.html">Theme Builder</a></li><li><a href="https://echarts.apache.org/en/cheat-sheet.html">Cheat Sheet</a></li><li><a href="https://echarts.apache.org/en/resources.html">More Resources</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Community<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/events.html">Events</a></li><li><a href="https://echarts.apache.org/en/committers.html">Committers</a></li><li><a href="https://echarts.apache.org/en/maillist.html">Mailing List</a></li><li><a href="https://echarts.apache.org/en/contributing.html">How to Contribute</a></li><li><a href="https://echarts.apache.org/en/dependencies.html">Dependencies</a></li><li><a href="https://echarts.apache.org/en/coding-standard.html">Code Standard</a></li><li><a href="https://github.com/apache/echarts" target="_blank">Source Code (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/en/security.html">Security</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">License<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">Events<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">Sponsorship<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">Thanks<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('zh')">中文</a></li></ul></div></div></nav></nav><div class="page-main"><div class="page-info"><h1>Thanks for Helping</h1><p>The development of ECharts is associated with the outstanding contributions from the people in the community,<br>who have different skills and come from different backgrounds.</p><p>Thank you all your help!</p><p class="page-info-echarts">Apache ECharts<sup>TM</sup></p></div><div id="about-page"><section class="container contributor"><h4 class="group pmc">PMC</h4><div class="row"><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/pissang" target="_blank"><img src="https://echarts.apache.org/en/images/people/沈毅.jpg?_v_=20200710_1"></a><h5 class="about-name">Yi Shen</h5><div class="about-desc">Baidu</div><div class="about-desc">Shanghai, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/100pah" target="_blank"><img src="https://echarts.apache.org/en/images/people/宿爽.jpg?_v_=20200710_1"></a><h5 class="about-name">Shuang Su</h5><div class="about-desc">Baidu</div><div class="about-desc">Beijing, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/Ovilia" target="_blank"><img src="https://echarts.apache.org/en/images/people/羡辙.jpg?_v_=20200710_1"></a><h5 class="about-name">Ovilia</h5><div class="about-desc">Baidu</div><div class="about-desc">Shanghai, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://www.behance.net/wjtjiayouac8aa" target="_blank"><img src="https://echarts.apache.org/en/images/people/王俊婷.jpg?_v_=20200710_1"></a><h5 class="about-name">Junting Wang</h5><div class="about-desc">Baidu</div><div class="about-desc">Shanghai, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/plainheart" target="_blank"><img src="https://echarts.apache.org/en/images/people/plainheart.jpg"></a><h5 class="about-name">Zhongxiang Wang</h5><div class="about-desc">Henan, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/susiwen8" target="_blank"><img src="https://echarts.apache.org/en/images/people/苏思文.jpg?_v_=20200710_1"></a><h5 class="about-name">Siwen Su</h5><div class="about-desc">Ant Group</div><div class="about-desc">Hangzhou, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/wf123537200" target="_blank"><img src="https://echarts.apache.org/en/images/people/zakwu.jpg?_v_=20200710_1"></a><h5 class="about-name">Zak Wu</h5><div class="about-desc">Tencent</div><div class="about-desc">Shenzhen, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/kener" target="_blank"><img src="https://echarts.apache.org/en/images/people/林峰.jpg?_v_=20200710_1"></a><h5 class="about-name">Feng Lin</h5><div class="about-desc">Alibaba</div><div class="about-desc">Hangzhou, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/deqingli" target="_blank"><img src="https://echarts.apache.org/en/images/people/德清.jpg?_v_=20200710_1"></a><h5 class="about-name">Deqing Li</h5><div class="about-desc">Alibaba</div><div class="about-desc">Hangzhou, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><img src="https://echarts.apache.org/en/images/people/dave.jpg?_v_=20200710_1"><h5 class="about-name">Dave Fisher</h5><div class="about-desc">San Francisco, US</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><img src="https://echarts.apache.org/en/images/people/kevin.jpg?_v_=20200710_1"><h5 class="about-name">Kevin A. McGrail</h5><div class="about-desc">Washington, US</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><img src="https://echarts.apache.org/en/images/people/shengwu.jpg?_v_=20200710_1"><h5 class="about-name">Sheng Wu</h5><div class="about-desc">Beijing, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/erik168" target="_blank"><img src="https://echarts.apache.org/en/images/people/erik.jpg?_v_=20200710_1"></a><h5 class="about-name">Erik Dong</h5><div class="about-desc">Baidu</div><div class="about-desc">Beijing, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/chriswong" target="_blank"><img src="https://echarts.apache.org/en/images/people/大佛.jpg?_v_=20200710_1"></a><h5 class="about-name">Houjin Huang</h5><div class="about-desc">GSX</div><div class="about-desc">Beijing, China</div></div></div></div><h4 class="group committer">Committers</h4><div class="row"><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/yufeng04" target="_blank"><img src="https://echarts.apache.org/en/images/people/禹峰.jpg?_v_=20200710_1"></a><h5 class="about-name">Feng Yu</h5><div class="about-desc">Baidu</div><div class="about-desc">Shanghai, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/cuijian-dexter" target="_blank"><img src="https://echarts.apache.org/en/images/people/崔健.jpg?_v_=20200710_1"></a><h5 class="about-name">Jian Cui</h5><div class="about-desc">Baidu</div><div class="about-desc">Beijing, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/quillblue" target="_blank"><img src="https://echarts.apache.org/en/images/people/qiansheng.jpg?_v_=20200710_1"></a><h5 class="about-name">Sheng Qian</h5><div class="about-desc">Dow Inc.</div><div class="about-desc">Shanghai, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/chfw" target="_blank"><img src="https://echarts.apache.org/en/images/people/chfw.jpg?_v_=20200710_1"></a><h5 class="about-name">chfw</h5><div class="about-desc">UK</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/alex2wong" target="_blank"><img src="https://echarts.apache.org/en/images/people/黄益修.jpg?_v_=20200710_1"></a><h5 class="about-name">Yixiu Huang</h5><div class="about-desc">ByteDance</div><div class="about-desc">Shanghai, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/SnailSword" target="_blank"><img src="https://echarts.apache.org/en/images/people/韩天.jpg?_v_=20200710_1"></a><h5 class="about-name">Tian Han</h5><div class="about-desc">Merico</div><div class="about-desc">Beijing, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/ClemMakesApps" target="_blank"><img src="https://echarts.apache.org/en/images/people/clement.jpg?_v_=20200710_1"></a><h5 class="about-name">Clement Ho</h5><div class="about-desc">MURAL</div><div class="about-desc">Texas, US</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><img src="https://echarts.apache.org/en/images/people/tedliu.jpg?_v_=20200710_1"><h5 class="about-name">Ted Liu</h5><div class="about-desc">Beijing, China</div></div></div></div><h4 class="group contributor">Contributors</h4><div class="row"><p></p><p>Thanks to all the <a href="https://github.com/apache/echarts/graphs/contributors">CONTRIBUTORS</a> <br /> making their effort to help ECharts getting better.</p></div></section></div><footer><div class="container"><div class="row"><div class="col-md-9"><p>Copyright © 2017-2021, The Apache Software Foundation Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.</p><div class="icon-panel"><a href="mailto:dev@echarts.apache.org?body=%28Thanks%20for%20using%20ECharts.%20Email%20us%20if%20you%20have%20non-technical%20problems%20using%20ECharts.%20For%20technical%20support%2C%20please%20go%20to%20https%3A//github.com/apache/echarts/issues%20.%29" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-email.png?_v_=20200710_1"></a><a href="https://twitter.com/ApacheECharts" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-twitter.png?_v_=20200710_1"></a><a href="https://weibo.com/echarts" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-weibo.png?_v_=20200710_1"></a><a href="https://github.com/apache/echarts" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-github.png?_v_=20200710_1"></a></div></div><div id="footer-icon-panel" class="col-md-3"><a href="https://www.apache.org"><img src="https://echarts.apache.org/en/images/asf_logo.svg?_v_=20200710_1" class="footer-apache-logo"></a></div></div></div></footer></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://echarts.apache.org/en/js/common.js?_v_=b5b8944fb9"></script><script type="text/javascript">document.getElementById('nav-contribute').className = 'active';</script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
+<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Please visit the official Apache ECharts Website at</p><a id="a2" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>Visit Official Website</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><nav class="navbar navbar-default navbar-fixed-top"><nav role="navigation" 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.apache.org/en/images/logo.png" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/en/index.html">Home</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Docs<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/feature.html">Features</a></li><li><a href="https://echarts.apache.org/en/tutorial.html">Tutorials</a></li><li><a href="https://echarts.apache.org/en/api.html">API</a></li><li><a href="https://echarts.apache.org/en/option.html">Chart Configuration</a></li><li><a href="https://echarts.apache.org/en/changelog.html">Changelog</a></li><li><a href="https://echarts.apache.org/en/faq.html">FAQ</a></li><li><a href="https://echarts.apache.org/en/tutorial.html#ECharts%205%20Upgrade%20Guide">V5 Upgrade Guide<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Download<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/download.html">Download</a></li><li><a href="https://echarts.apache.org/en/download-theme.html">Download Themes</a></li><li><a href="https://echarts.apache.org/en/download-extension.html">Download Extensions</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/en/index.html">Examples</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Resources<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/spreadsheet.html">Spread Sheet Tool</a></li><li><a href="https://echarts.apache.org/en/theme-builder.html">Theme Builder</a></li><li><a href="https://echarts.apache.org/en/cheat-sheet.html">Cheat Sheet</a></li><li><a href="https://echarts.apache.org/en/resources.html">More Resources</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Community<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/events.html">Events</a></li><li><a href="https://echarts.apache.org/en/committers.html">Committers</a></li><li><a href="https://echarts.apache.org/en/maillist.html">Mailing List</a></li><li><a href="https://echarts.apache.org/en/contributing.html">How to Contribute</a></li><li><a href="https://echarts.apache.org/en/dependencies.html">Dependencies</a></li><li><a href="https://echarts.apache.org/en/coding-standard.html">Code Standard</a></li><li><a href="https://github.com/apache/echarts" target="_blank">Source Code (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/en/security.html">Security</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">License<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">Events<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">Sponsorship<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">Thanks<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('zh')">中文</a></li></ul></div></div></nav></nav><div class="page-main"><div class="page-info"><h1>Thanks for Helping</h1><p>The development of ECharts is associated with the outstanding contributions from the people in the community,<br>who have different skills and come from different backgrounds.</p><p>Thank you all your help!</p><p class="page-info-echarts">Apache ECharts<sup>TM</sup></p></div><div id="about-page"><section class="container contributor"><h4 class="group pmc">PMC</h4><div class="row"><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/pissang" target="_blank"><img src="https://echarts.apache.org/en/images/people/沈毅.jpg?_v_=20200710_1"></a><h5 class="about-name">Yi Shen</h5><div class="about-desc">Baidu</div><div class="about-desc">Shanghai, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/100pah" target="_blank"><img src="https://echarts.apache.org/en/images/people/宿爽.jpg?_v_=20200710_1"></a><h5 class="about-name">Shuang Su</h5><div class="about-desc">Baidu</div><div class="about-desc">Beijing, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/Ovilia" target="_blank"><img src="https://echarts.apache.org/en/images/people/羡辙.jpg?_v_=20200710_1"></a><h5 class="about-name">Ovilia</h5><div class="about-desc">Baidu</div><div class="about-desc">Shanghai, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://www.behance.net/wjtjiayouac8aa" target="_blank"><img src="https://echarts.apache.org/en/images/people/王俊婷.jpg?_v_=20200710_1"></a><h5 class="about-name">Junting Wang</h5><div class="about-desc">Baidu</div><div class="about-desc">Shanghai, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/plainheart" target="_blank"><img src="https://echarts.apache.org/en/images/people/plainheart.jpg"></a><h5 class="about-name">Zhongxiang Wang</h5><div class="about-desc">Henan, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/susiwen8" target="_blank"><img src="https://echarts.apache.org/en/images/people/苏思文.jpg?_v_=20200710_1"></a><h5 class="about-name">Siwen Su</h5><div class="about-desc">Ant Group</div><div class="about-desc">Hangzhou, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/wf123537200" target="_blank"><img src="https://echarts.apache.org/en/images/people/zakwu.jpg?_v_=20200710_1"></a><h5 class="about-name">Zak Wu</h5><div class="about-desc">Tencent</div><div class="about-desc">Shenzhen, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/kener" target="_blank"><img src="https://echarts.apache.org/en/images/people/林峰.jpg?_v_=20200710_1"></a><h5 class="about-name">Feng Lin</h5><div class="about-desc">Alibaba</div><div class="about-desc">Hangzhou, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/deqingli" target="_blank"><img src="https://echarts.apache.org/en/images/people/德清.jpg?_v_=20200710_1"></a><h5 class="about-name">Deqing Li</h5><div class="about-desc">Alibaba</div><div class="about-desc">Hangzhou, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><img src="https://echarts.apache.org/en/images/people/dave.jpg?_v_=20200710_1"><h5 class="about-name">Dave Fisher</h5><div class="about-desc">San Francisco, US</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><img src="https://echarts.apache.org/en/images/people/kevin.jpg?_v_=20200710_1"><h5 class="about-name">Kevin A. McGrail</h5><div class="about-desc">Washington, US</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><img src="https://echarts.apache.org/en/images/people/shengwu.jpg?_v_=20200710_1"><h5 class="about-name">Sheng Wu</h5><div class="about-desc">Beijing, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/erik168" target="_blank"><img src="https://echarts.apache.org/en/images/people/erik.jpg?_v_=20200710_1"></a><h5 class="about-name">Erik Dong</h5><div class="about-desc">Baidu</div><div class="about-desc">Beijing, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/chriswong" target="_blank"><img src="https://echarts.apache.org/en/images/people/大佛.jpg?_v_=20200710_1"></a><h5 class="about-name">Houjin Huang</h5><div class="about-desc">GSX</div><div class="about-desc">Beijing, China</div></div></div></div><h4 class="group committer">Committers</h4><div class="row"><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/yufeng04" target="_blank"><img src="https://echarts.apache.org/en/images/people/禹峰.jpg?_v_=20200710_1"></a><h5 class="about-name">Feng Yu</h5><div class="about-desc">Baidu</div><div class="about-desc">Shanghai, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/cuijian-dexter" target="_blank"><img src="https://echarts.apache.org/en/images/people/崔健.jpg?_v_=20200710_1"></a><h5 class="about-name">Jian Cui</h5><div class="about-desc">Baidu</div><div class="about-desc">Beijing, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/quillblue" target="_blank"><img src="https://echarts.apache.org/en/images/people/qiansheng.jpg?_v_=20200710_1"></a><h5 class="about-name">Sheng Qian</h5><div class="about-desc">Dow Inc.</div><div class="about-desc">Shanghai, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/chfw" target="_blank"><img src="https://echarts.apache.org/en/images/people/chfw.jpg?_v_=20200710_1"></a><h5 class="about-name">chfw</h5><div class="about-desc">UK</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/alex2wong" target="_blank"><img src="https://echarts.apache.org/en/images/people/黄益修.jpg?_v_=20200710_1"></a><h5 class="about-name">Yixiu Huang</h5><div class="about-desc">ByteDance</div><div class="about-desc">Shanghai, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/SnailSword" target="_blank"><img src="https://echarts.apache.org/en/images/people/韩天.jpg?_v_=20200710_1"></a><h5 class="about-name">Tian Han</h5><div class="about-desc">Merico</div><div class="about-desc">Beijing, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><img src="https://echarts.apache.org/en/images/people/nick.jpg?_v_=20200710_1"><h5 class="about-name">Yaxiong He</h5><div class="about-desc">Shenzhen, China</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/ClemMakesApps" target="_blank"><img src="https://echarts.apache.org/en/images/people/clement.jpg?_v_=20200710_1"></a><h5 class="about-name">Clement Ho</h5><div class="about-desc">MURAL</div><div class="about-desc">Texas, US</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><img src="https://echarts.apache.org/en/images/people/tedliu.jpg?_v_=20200710_1"><h5 class="about-name">Ted Liu</h5><div class="about-desc">Beijing, China</div></div></div></div><h4 class="group contributor">Contributors</h4><div class="row"><p></p><p>Thanks to all the <a href="https://github.com/apache/echarts/graphs/contributors">CONTRIBUTORS</a> <br /> making their effort to help ECharts getting better.</p></div></section></div><footer><div class="container"><div class="row"><div class="col-md-9"><p>Copyright © 2017-2021, The Apache Software Foundation Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.</p><div class="icon-panel"><a href="mailto:dev@echarts.apache.org?body=%28Thanks%20for%20using%20ECharts.%20Email%20us%20if%20you%20have%20non-technical%20problems%20using%20ECharts.%20For%20technical%20support%2C%20please%20go%20to%20https%3A//github.com/apache/echarts/issues%20.%29" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-email.png?_v_=20200710_1"></a><a href="https://twitter.com/ApacheECharts" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-twitter.png?_v_=20200710_1"></a><a href="https://weibo.com/echarts" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-weibo.png?_v_=20200710_1"></a><a href="https://github.com/apache/echarts" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-github.png?_v_=20200710_1"></a></div></div><div id="footer-icon-panel" class="col-md-3"><a href="https://www.apache.org"><img src="https://echarts.apache.org/en/images/asf_logo.svg?_v_=20200710_1" class="footer-apache-logo"></a></div></div></div></footer></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://echarts.apache.org/en/js/common.js?_v_=b5b8944fb9"></script><script type="text/javascript">document.getElementById('nav-contribute').className = 'active';</script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
 (function() {
 var hm = document.createElement("script");
 
diff --git a/en/documents/tutorial-parts/tutorial.js b/en/documents/tutorial-parts/tutorial.js
index 9e88c47..cb6af68 100644
--- a/en/documents/tutorial-parts/tutorial.js
+++ b/en/documents/tutorial-parts/tutorial.js
@@ -54,7 +54,7 @@
     "desc": "<p>Rich text can be used in Apache ECharts<sup>TM</sup> labels of series, axis or other components. For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=pie-rich-text&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=treemap-obama&edit=1&reset=1\" width=\"800\" height=\"550\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=bar-rich-text&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<p><br></p>\n<p>More examples:\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=map-labels&amp;edit=1&amp;reset=1\" target=\"_blank\">Map Labels</a>,\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=pie-nest&amp;edit=1&amp;reset=1\" target=\"_blank\">Pie Labels</a>,\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=gauge-car&amp;edit=1&amp;reset=1\" target=\"_blank\">Gauge</a>.</p>\n<p><br></p>\n<p>Before v3.7, the style options was only able to applied to the whole label text block, and only color and font can be configured, which restricted the expressability of text descriptions.</p>\n<p>Since v3.7, rich text has been supported:</p>\n<ul>\n<li>Box styles (background, border, shadow, etc.), rotation, position of a text block can be specified.</li>\n<li>Styles (color, font, width/height, background, shadow, etc.) and alignment can be customzied on fragments of text.</li>\n<li>Image can be used in text as icon or background.</li>\n<li>Combine these configurations, some special effects can be made, such as simple table, horizontal rule (hr).</li>\n</ul>\n<p>At the beginning, the meanings of two terms that will be used below should be clarified:</p>\n<ul>\n<li>Text Block: The whole block of label text.</li>\n<li>Text fragment: Some piece of text in a text block.</li>\n</ul>\n<p>For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/text-block-fragment&edit=1&reset=1\" width=\"340\" height=\"240\" ></iframe>\n\n\n\n<h2 id=\"options-about-text\">Options about Text</h2>\n<p>echarts provides plenty of text options, including:</p>\n<ul>\n<li>Basic font style: <code class=\"codespan\">fontStyle</code>, <code class=\"codespan\">fontWeight</code>, <code class=\"codespan\">fontSize</code>, <code class=\"codespan\">fontFamily</code>.</li>\n<li>Fill of text: <code class=\"codespan\">color</code>.</li>\n<li>Stroke of text: <code class=\"codespan\">textBorderColor</code>, <code class=\"codespan\">textBorderWidth</code>.</li>\n<li>Shadow of text: <code class=\"codespan\">textShadowColor</code>, <code class=\"codespan\">textShadowBlur</code>, <code class=\"codespan\">textShadowOffsetX</code>, <code class=\"codespan\">textShadowOffsetY</code>.</li>\n<li>Box size of text block or text fragment: <code class=\"codespan\">lineHeight</code>, <code class=\"codespan\">width</code>, <code class=\"codespan\">height</code>, <code class=\"codespan\">padding</code>.</li>\n<li>Alignment of text block or text fragment: <code class=\"codespan\">align</code>, <code class=\"codespan\">verticalAlign</code>.</li>\n<li>Border, background (color or image) of text block or text fragment: <code class=\"codespan\">backgroundColor</code>, <code class=\"codespan\">borderColor</code>, <code class=\"codespan\">borderWidth</code>, <code class=\"codespan\">borderRadius</code>.</li>\n<li>Shadow of text block or text fragment: <code class=\"codespan\">shadowColor</code>, <code class=\"codespan\">shadowBlur</code>, <code class=\"codespan\">shadowOffsetX</code>, <code class=\"codespan\">shadowOffsetY</code>.</li>\n<li>Position and rotation of text block: <code class=\"codespan\">position</code>, <code class=\"codespan\">distance</code>, <code class=\"codespan\">rotate</code>.</li>\n</ul>\n<p>User can defined styles for text fragment in <code class=\"codespan\">rich</code> property. For example, <a href=\"option.html#series-bar.label.rich\" target=\"_blank\">series-bar.label.rich</a></p>\n<p>For example:</p>\n<pre><code class=\"lang-js\">label: {\n    // Styles defined in &#39;rich&#39; can be applied to some fragments\n    // of text by adding some markers to those fragment, like\n    // `{styleName|text content text content}`.\n    // `&#39;\\n&#39;` is the newline character.\n    formatter: [\n        &#39;{a|Style &quot;a&quot; is applied to this fragment}&#39;\n        &#39;{b|Style &quot;b&quot; is applied to this fragment}This fragment use default style{x|use style &quot;x&quot;}&#39;\n    ].join(&#39;\\n&#39;),\n\n    // Styles for the whole text block are defined here:\n    color: &#39;#333&#39;,\n    fontSize: 5,\n    fontFamily: &#39;Arial&#39;,\n    borderWidth: 3,\n    backgroundColor: &#39;#984455&#39;,\n    padding: [3, 10, 10, 5],\n    lineHeight: 20,\n\n    // Styles for text fragments are defined here:\n    rich: {\n        a: {\n            color: &#39;red&#39;,\n            lineHeight: 10\n        },\n        b: {\n            backgroundColor: {\n                image: &#39;xxx/xxx.jpg&#39;\n            },\n            height: 40\n        },\n        x: {\n            fontSize: 18,\n            fontFamily: &#39;Microsoft YaHei&#39;,\n            borderColor: &#39;#449933&#39;,\n            borderRadius: 4\n        },\n        ...\n    }\n}\n</code></pre>\n<blockquote>\n<p>Notice: <code class=\"codespan\">width</code> 和 <code class=\"codespan\">height</code> only work when <code class=\"codespan\">rich</code> specified.</p>\n</blockquote>\n<h2 id=\"basic-styles-of-text-text-block-and-text-fragment\">Basic Styles of Text, Text Block and Text Fragment</h2>\n<p>Basic font style can be set to text: <code class=\"codespan\">fontStyle</code>, <code class=\"codespan\">fontWeight</code>, <code class=\"codespan\">fontSize</code>, <code class=\"codespan\">fontFamily</code>.</p>\n<p>Fill color and stroke color can be set to text: <code class=\"codespan\">color</code>, <code class=\"codespan\">textBorderColor</code>, <code class=\"codespan\">textBorderWidth</code>.</p>\n<p>Border style and background style can be set to text block: <code class=\"codespan\">borderColor</code>, <code class=\"codespan\">borderWidth</code>, <code class=\"codespan\">backgroundColor</code>, <code class=\"codespan\">padding</code>.</p>\n<p>Border style and background style can be set to text fragment too: <code class=\"codespan\">borderColor</code>, <code class=\"codespan\">borderWidth</code>, <code class=\"codespan\">backgroundColor</code>, <code class=\"codespan\">padding</code>.</p>\n<p>For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/text-options&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n\n<h2 id=\"label-position\">Label Position</h2>\n<p><code class=\"codespan\">label</code> option can be use in charts like <code class=\"codespan\">bar</code>, <code class=\"codespan\">line</code>, <code class=\"codespan\">scatter</code>, etc. The position of a label, can be specified by <a href=\"option.html#series-scatter.label.position\" target=\"_blank\">label.position</a>、<a href=\"option.html#series-scatter.label.distance\" target=\"_blank\">label.distance</a>.</p>\n<p>For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/label-position&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<blockquote>\n<p>Notice, there are different optional values of <code class=\"codespan\">position</code> by different chart types. And <code class=\"codespan\">distance</code> is not supported in every chart. More detailed info can be checked in <a href=\"option.html\" target=\"_blank\">option doc</a>.</p>\n</blockquote>\n<h2 id=\"label-rotation\">Label Rotation</h2>\n<p>Sometimes label is needed to be rotated. For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=bar-label-rotation&edit=1&reset=1\" width=\"900\" height=\"500\" ></iframe>\n\n\n<p><a href=\"option.html#series-bar.label.align\" target=\"_blank\">align</a> and<a href=\"option.html#series-bar.label.verticalAlign\" target=\"_blank\">verticalAlign</a> can be used to adjust location of label in this scenario.</p>\n<p>Notice, <code class=\"codespan\">align</code> and <code class=\"codespan\">verticalAlign</code> are applied firstly, then rotate.</p>\n<h2 id=\"layout-and-alignment-of-text-fragment\">Layout and Alignment of Text fragment</h2>\n<p>To understand the layout rule, every text fragment can be imagined as a <code class=\"codespan\">inline-block</code> dom element in CSS.</p>\n<p><code class=\"codespan\">content box size</code> of a text fragment is determined by its font size by default. It can also be specified directly by <code class=\"codespan\">width</code> and <code class=\"codespan\">height</code>, although they are rarely set. <code class=\"codespan\">border box size</code> of a text fragment is calculated by adding the <code class=\"codespan\">border box size</code> and <code class=\"codespan\">padding</code>.</p>\n<p>Only <code class=\"codespan\">&#39;\\n&#39;</code> is the newline character, which breaks a line.</p>\n<p>Multiple text fragment exist in a single line. The height of a line is determined by the biggest <code class=\"codespan\">lineHeight</code> of text fragments. <code class=\"codespan\">lineHeight</code> of a text fragment can be specified in <code class=\"codespan\">rich</code>, or in the parent level of <code class=\"codespan\">rich</code>, otherwise using <code class=\"codespan\">box size</code> of the text fragment.</p>\n<p>Having <code class=\"codespan\">lineHeight</code> determined, the vertical position of text fragments can be determined by <code class=\"codespan\">verticalAlign</code> (there is a little different from the rule in CSS):</p>\n<ul>\n<li><code class=\"codespan\">&#39;bottom&#39;</code>: The bottom edge of the text fragment sticks to the bottom edge of the line.</li>\n<li><code class=\"codespan\">&#39;top&#39;</code>: The top edge of the text fragment sticks to the top edge of the line.</li>\n<li><code class=\"codespan\">&#39;middle&#39;</code>: In the middle of the line.</li>\n</ul>\n<p>The width of a text block can be specified by <code class=\"codespan\">width</code>, otherwise, by the longest line. Having the width determined, text fragment can be placed in each line, where the horizontal position of text fragments can be determined by its <code class=\"codespan\">align</code>.</p>\n<ul>\n<li>Firstly, place text fragments whose <code class=\"codespan\">align</code> is <code class=\"codespan\">&#39;left&#39;</code> from left to right continuously.</li>\n<li>Secondly, place text fragments whose <code class=\"codespan\">align</code> is <code class=\"codespan\">&#39;right&#39;</code> from right to left continuously.</li>\n<li>Finally, the text fragments remained will be sticked and placed in the center of the rest of space.</li>\n</ul>\n<p>The position of text in a text fragment:</p>\n<ul>\n<li>If <code class=\"codespan\">align</code> is <code class=\"codespan\">&#39;center&#39;</code>, text aligns at the center of the text fragment box.</li>\n<li>If <code class=\"codespan\">align</code> is <code class=\"codespan\">&#39;left&#39;</code>, text aligns at the left of the text fragment box.</li>\n<li>If <code class=\"codespan\">align</code> is <code class=\"codespan\">&#39;right&#39;</code>, text aligns at the right of the text fragment box.</li>\n</ul>\n<p>For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/text-fragment-align&edit=1&reset=1\" width=\"800\" height=\"220\" ></iframe>\n\n\n\n\n<h2 id=\"effects-icon-horizontal-rule-title-block-simple-table\">Effects: Icon, Horizontal Rule, Title Block, Simple Table</h2>\n<p>See example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/title-block&edit=1&reset=1\" width=\"600\" height=\"400\" ></iframe>\n\n\n<p>Icon is implemented by using image in <code class=\"codespan\">backgroundColor</code>.</p>\n<pre><code class=\"lang-js\">rich: {\n    Sunny: {\n        backgroundColor: {\n            image: &#39;./data/asset/img/weather/sunny_128.png&#39;\n        },\n        // Can only height specified, but leave width auto obtained\n        // from the image, where the aspect ratio kept.\n        height: 30\n    }\n}\n</code></pre>\n<p>Horizontal rule (like HTML &lt;hr&gt; tag) can be implemented by border:</p>\n<pre><code class=\"lang-js\">rich: {\n    hr: {\n        borderColor: &#39;#777&#39;,\n        // width is set as &#39;100%&#39; to fullfill the text block.\n        // Notice, the percentage is based on the content box, without\n        // padding. Although it is a little different from CSS rule,\n        // it is convinent in most cases.\n        width: &#39;100%&#39;,\n        borderWidth: 0.5,\n        height: 0\n    }\n}\n</code></pre>\n<p>Title block can be implemented by <code class=\"codespan\">backgroundColor</code>:</p>\n<pre><code class=\"lang-js\">// Title is at left.\nformatter: &#39;{titleBg|Left Title}&#39;,\nrich: {\n    titleBg: {\n        backgroundColor: &#39;#000&#39;,\n        height: 30,\n        borderRadius: [5, 5, 0, 0],\n        padding: [0, 10, 0, 10],\n        width: &#39;100%&#39;,\n        color: &#39;#eee&#39;\n    }\n}\n\n// Title is in the center of the line.\n// This implementation is a little tricky, but is works\n// without more complicated layout mechanism involved.\nformatter: &#39;{tc|Center Title}{titleBg|}&#39;,\nrich: {\n    titleBg: {\n        align: &#39;right&#39;,\n        backgroundColor: &#39;#000&#39;,\n        height: 30,\n        borderRadius: [5, 5, 0, 0],\n        padding: [0, 10, 0, 10],\n        width: &#39;100%&#39;,\n        color: &#39;#eee&#39;\n    }\n}\n</code></pre>\n<p>Simple table can be implemented by specify the same width to text fragments that are in the same column of different lines. See the <a href=\"https://echarts.apache.org/examples/en/view.html?c=pie-rich-text&amp;edit=1&amp;reset=1\" target=\"_blank\">example</a> at the mentioned above.</p>\n"
   },
   "Server-side Rendering": {
-    "desc": "<p>Apache ECharts<sup>TM</sup> can be rendered at server-side. For example, the thumbnails in the <a href=\"https://echarts.apache.org/examples/en/index.html\" target=\"_blank\">official examples page</a> are generated at a server.</p>\n<p>Commonly used headless tool is required, for example, <a href=\"https://github.com/GoogleChrome/puppeteer\" target=\"_blank\">puppeteer</a>, <a href=\"https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md\" target=\"_blank\">headless chrome</a>, <a href=\"https://github.com/Automattic/node-canvas\" target=\"_blank\">node-canvas</a>, <a href=\"https://github.com/jsdom/jsdom\" target=\"_blank\">jsdom</a>, <a href=\"http://phantomjs.org/\" target=\"_blank\">PhantomJS</a>, etc.</p>\n<p>Some solutions contributed by the community are list as follows:</p>\n<ul>\n<li><a href=\"https://github.com/hellosean1025/node-echarts\" target=\"_blank\">https://github.com/hellosean1025/node-echarts</a></li>\n<li><a href=\"https://github.com/chfw/echarts-scrappeteer\" target=\"_blank\">https://github.com/chfw/echarts-scrappeteer</a></li>\n<li><a href=\"https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js\" target=\"_blank\">https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js</a></li>\n<li><a href=\"https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73\" target=\"_blank\">https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73</a></li>\n</ul>\n"
+    "desc": "<p>Apache ECharts<sup>TM</sup> can be rendered at server-side. For example, the thumbnails in the <a href=\"https://echarts.apache.org/examples/en/index.html\" target=\"_blank\">official examples page</a> are generated at a server.</p>\n<p>Commonly used headless tool is required, for example, <a href=\"https://github.com/GoogleChrome/puppeteer\" target=\"_blank\">puppeteer</a>, <a href=\"https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md\" target=\"_blank\">headless chrome</a>, <a href=\"https://github.com/Automattic/node-canvas\" target=\"_blank\">node-canvas</a>, <a href=\"https://github.com/jsdom/jsdom\" target=\"_blank\">jsdom</a>, <a href=\"http://phantomjs.org/\" target=\"_blank\">PhantomJS</a>, etc.</p>\n<p>Some solutions contributed by the community are list as follows:</p>\n<ul>\n<li><a href=\"https://github.com/hellosean1025/node-echarts\" target=\"_blank\">https://github.com/hellosean1025/node-echarts</a></li>\n<li><a href=\"https://github.com/chfw/echarts-scrappeteer\" target=\"_blank\">https://github.com/chfw/echarts-scrappeteer</a></li>\n<li><a href=\"https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js\" target=\"_blank\">https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js</a></li>\n<li><a href=\"https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73\" target=\"_blank\">https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73</a></li>\n</ul>\n<p>Notice: if server-side rendering result is different from browser-side rendering, please set <a href=\"option.html#animation\" target=\"_blank\">animation</a> as <code class=\"codespan\">false</code> and try again.</p>\n"
   },
   "Render by Canvas or SVG": {
     "desc": "<p>Most of browser-side charting libraries use SVG or Canvas as their underlying renderer. In the scope of Apache ECharts<sup>TM</sup>, they are usually alternative, without critical differences. But in some environment and scenarios, they show notable differences in performance or functionality.</p>\n<p>ECharts has been using Canvas as its renderer (use VML for IE8-) from the beginning. As of <a href=\"https://github.com/apache/echarts/releases\" target=\"_blank\">ECharts v3.8</a> we provide an SVG renderer (beta version) as another option. Either of them can be used by specifing parameter <a href=\"api.html#echarts.init\" target=\"_blank\">renderer</a> as <code class=\"codespan\">&#39;canvas&#39;</code> or <code class=\"codespan\">&#39;svg&#39;</code> when initailizing a chart instance.</p>\n<blockquote>\n<p>Both SVG and Canvas, which are very different rendering implementations, are supported in ECharts by leveraging the Canvas and SVG renderers offered by the <a href=\"https://github.com/ecomfe/zrender\" target=\"_blank\">zrender</a> library.</p>\n</blockquote>\n<h2 id=\"how-to-make-a-choice-\">How to make a choice?</h2>\n<p>Generally speaking, Canvas is suitable for cases where there is a large amount of graphical elements (usually due to a large amount of data points), like heatmap and lines or scatter plot with large data in geo or parallel coordinates. In addition, it supports some <a href=\"https://echarts.apache.org/examples/en/editor.html?c=lines-bmap-effect\" target=\"_blank\">special visual effect</a> not supported by SVG. However, in some other scenarios SVG has some critical advantages: it consumes less memory than Canvas (especially in mobile devices), and gives better performance in rendering. Moreover, it never blurs when zooming the viewport of the browser whereas Canvas may blur.</p>\n<p>How to make a choice? These factors, hardware and software environment, data amount and functional requirements, should be considered.</p>\n<ul>\n<li>When not constrained by hardware/software, and the data amount is not large, both should provide equally satisfactory results.</li>\n<li>When encountering performance issues, we can attempt to get better result by choose appropriate renderer.<ul>\n<li>If lots of ECharts instances have to be created, and it causes the browser crash (probably caused by that the large memory consumption) we can try the SVG renderer. Or, generally, when running on some old Android devices, or if we are using some kind of charts like <a href=\"https://ecomfe.github.io/echarts-liquidfill/example/\" target=\"_blank\">liquidfill</a>, the SVG renderer probably gives a better performance.</li>\n<li>If visualizing a large amount of data, or complicated human interactions with data is required, the Canvas renderer works better currently.</li>\n</ul>\n</li>\n</ul>\n<p>Therefore <a href=\"https://github.com/apache/echarts/issues/new\" target=\"_blank\">feedback</a> of experiences and usage scenarios are strongly welcomed, which will help improve the these renderers.</p>\n<h2 id=\"how-to-use-specify-a-renderer-\">How to use specify a renderer?</h2>\n<p>ECharts uses Canvas by default. If a user intends to use the SVG renderer, the module of the SVG renderer should be included in ECharts bundle.</p>\n<ul>\n<li>In the <a href=\"https://www.jsdelivr.com/package/npm/echarts\" target=\"_blank\">pre-build</a> of ECharts, the SVG renderer has been included in <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.common.min.js\" target=\"_blank\">common version</a> and <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js\" target=\"_blank\">complete version</a>. But not in <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.simple.min.js\" target=\"_blank\">simple version</a>.</li>\n<li>When <a href=\"https://echarts.apache.org/en/builder.html\" target=\"_blank\">building ECharts online</a>, the checkbox &quot;SVG Renderer&quot; should be checked.</li>\n<li>When <a href=\"tutorial.html#Use%20ECharts%20with%20bundler%20and%20NPM\" target=\"_blank\">building ECharts offline</a>, the SVG renderer module should be imported:</li>\n</ul>\n<pre><code class=\"lang-js\">import &#39;zrender/lib/svg/svg&#39;;\n</code></pre>\n<p>Then we can specify renderer by <a href=\"api.html#echarts.init\" target=\"_blank\">parameter</a>:</p>\n<pre><code class=\"lang-js\">// Use the Canvas renderer (default).\nvar chart = echarts.init(containerDom, null, {renderer: &#39;canvas&#39;});\n// which is equal to:\nvar chart = echarts.init(containerDom, null, {renderer: &#39;canvas&#39;});\n\n// Use the SVG renderer.\nvar chart = echarts.init(containerDom, null, {renderer: &#39;svg&#39;});\n</code></pre>\n"
diff --git a/en/documents/tutorial-parts/tutorial.json b/en/documents/tutorial-parts/tutorial.json
index 77b782f..15afaca 100644
--- a/en/documents/tutorial-parts/tutorial.json
+++ b/en/documents/tutorial-parts/tutorial.json
@@ -54,7 +54,7 @@
     "desc": "<p>Rich text can be used in Apache ECharts<sup>TM</sup> labels of series, axis or other components. For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=pie-rich-text&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=treemap-obama&edit=1&reset=1\" width=\"800\" height=\"550\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=bar-rich-text&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<p><br></p>\n<p>More examples:\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=map-labels&amp;edit=1&amp;reset=1\" target=\"_blank\">Map Labels</a>,\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=pie-nest&amp;edit=1&amp;reset=1\" target=\"_blank\">Pie Labels</a>,\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=gauge-car&amp;edit=1&amp;reset=1\" target=\"_blank\">Gauge</a>.</p>\n<p><br></p>\n<p>Before v3.7, the style options was only able to applied to the whole label text block, and only color and font can be configured, which restricted the expressability of text descriptions.</p>\n<p>Since v3.7, rich text has been supported:</p>\n<ul>\n<li>Box styles (background, border, shadow, etc.), rotation, position of a text block can be specified.</li>\n<li>Styles (color, font, width/height, background, shadow, etc.) and alignment can be customzied on fragments of text.</li>\n<li>Image can be used in text as icon or background.</li>\n<li>Combine these configurations, some special effects can be made, such as simple table, horizontal rule (hr).</li>\n</ul>\n<p>At the beginning, the meanings of two terms that will be used below should be clarified:</p>\n<ul>\n<li>Text Block: The whole block of label text.</li>\n<li>Text fragment: Some piece of text in a text block.</li>\n</ul>\n<p>For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/text-block-fragment&edit=1&reset=1\" width=\"340\" height=\"240\" ></iframe>\n\n\n\n<h2 id=\"options-about-text\">Options about Text</h2>\n<p>echarts provides plenty of text options, including:</p>\n<ul>\n<li>Basic font style: <code class=\"codespan\">fontStyle</code>, <code class=\"codespan\">fontWeight</code>, <code class=\"codespan\">fontSize</code>, <code class=\"codespan\">fontFamily</code>.</li>\n<li>Fill of text: <code class=\"codespan\">color</code>.</li>\n<li>Stroke of text: <code class=\"codespan\">textBorderColor</code>, <code class=\"codespan\">textBorderWidth</code>.</li>\n<li>Shadow of text: <code class=\"codespan\">textShadowColor</code>, <code class=\"codespan\">textShadowBlur</code>, <code class=\"codespan\">textShadowOffsetX</code>, <code class=\"codespan\">textShadowOffsetY</code>.</li>\n<li>Box size of text block or text fragment: <code class=\"codespan\">lineHeight</code>, <code class=\"codespan\">width</code>, <code class=\"codespan\">height</code>, <code class=\"codespan\">padding</code>.</li>\n<li>Alignment of text block or text fragment: <code class=\"codespan\">align</code>, <code class=\"codespan\">verticalAlign</code>.</li>\n<li>Border, background (color or image) of text block or text fragment: <code class=\"codespan\">backgroundColor</code>, <code class=\"codespan\">borderColor</code>, <code class=\"codespan\">borderWidth</code>, <code class=\"codespan\">borderRadius</code>.</li>\n<li>Shadow of text block or text fragment: <code class=\"codespan\">shadowColor</code>, <code class=\"codespan\">shadowBlur</code>, <code class=\"codespan\">shadowOffsetX</code>, <code class=\"codespan\">shadowOffsetY</code>.</li>\n<li>Position and rotation of text block: <code class=\"codespan\">position</code>, <code class=\"codespan\">distance</code>, <code class=\"codespan\">rotate</code>.</li>\n</ul>\n<p>User can defined styles for text fragment in <code class=\"codespan\">rich</code> property. For example, <a href=\"option.html#series-bar.label.rich\" target=\"_blank\">series-bar.label.rich</a></p>\n<p>For example:</p>\n<pre><code class=\"lang-js\">label: {\n    // Styles defined in &#39;rich&#39; can be applied to some fragments\n    // of text by adding some markers to those fragment, like\n    // `{styleName|text content text content}`.\n    // `&#39;\\n&#39;` is the newline character.\n    formatter: [\n        &#39;{a|Style &quot;a&quot; is applied to this fragment}&#39;\n        &#39;{b|Style &quot;b&quot; is applied to this fragment}This fragment use default style{x|use style &quot;x&quot;}&#39;\n    ].join(&#39;\\n&#39;),\n\n    // Styles for the whole text block are defined here:\n    color: &#39;#333&#39;,\n    fontSize: 5,\n    fontFamily: &#39;Arial&#39;,\n    borderWidth: 3,\n    backgroundColor: &#39;#984455&#39;,\n    padding: [3, 10, 10, 5],\n    lineHeight: 20,\n\n    // Styles for text fragments are defined here:\n    rich: {\n        a: {\n            color: &#39;red&#39;,\n            lineHeight: 10\n        },\n        b: {\n            backgroundColor: {\n                image: &#39;xxx/xxx.jpg&#39;\n            },\n            height: 40\n        },\n        x: {\n            fontSize: 18,\n            fontFamily: &#39;Microsoft YaHei&#39;,\n            borderColor: &#39;#449933&#39;,\n            borderRadius: 4\n        },\n        ...\n    }\n}\n</code></pre>\n<blockquote>\n<p>Notice: <code class=\"codespan\">width</code> 和 <code class=\"codespan\">height</code> only work when <code class=\"codespan\">rich</code> specified.</p>\n</blockquote>\n<h2 id=\"basic-styles-of-text-text-block-and-text-fragment\">Basic Styles of Text, Text Block and Text Fragment</h2>\n<p>Basic font style can be set to text: <code class=\"codespan\">fontStyle</code>, <code class=\"codespan\">fontWeight</code>, <code class=\"codespan\">fontSize</code>, <code class=\"codespan\">fontFamily</code>.</p>\n<p>Fill color and stroke color can be set to text: <code class=\"codespan\">color</code>, <code class=\"codespan\">textBorderColor</code>, <code class=\"codespan\">textBorderWidth</code>.</p>\n<p>Border style and background style can be set to text block: <code class=\"codespan\">borderColor</code>, <code class=\"codespan\">borderWidth</code>, <code class=\"codespan\">backgroundColor</code>, <code class=\"codespan\">padding</code>.</p>\n<p>Border style and background style can be set to text fragment too: <code class=\"codespan\">borderColor</code>, <code class=\"codespan\">borderWidth</code>, <code class=\"codespan\">backgroundColor</code>, <code class=\"codespan\">padding</code>.</p>\n<p>For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/text-options&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n\n<h2 id=\"label-position\">Label Position</h2>\n<p><code class=\"codespan\">label</code> option can be use in charts like <code class=\"codespan\">bar</code>, <code class=\"codespan\">line</code>, <code class=\"codespan\">scatter</code>, etc. The position of a label, can be specified by <a href=\"option.html#series-scatter.label.position\" target=\"_blank\">label.position</a>、<a href=\"option.html#series-scatter.label.distance\" target=\"_blank\">label.distance</a>.</p>\n<p>For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/label-position&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<blockquote>\n<p>Notice, there are different optional values of <code class=\"codespan\">position</code> by different chart types. And <code class=\"codespan\">distance</code> is not supported in every chart. More detailed info can be checked in <a href=\"option.html\" target=\"_blank\">option doc</a>.</p>\n</blockquote>\n<h2 id=\"label-rotation\">Label Rotation</h2>\n<p>Sometimes label is needed to be rotated. For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=bar-label-rotation&edit=1&reset=1\" width=\"900\" height=\"500\" ></iframe>\n\n\n<p><a href=\"option.html#series-bar.label.align\" target=\"_blank\">align</a> and<a href=\"option.html#series-bar.label.verticalAlign\" target=\"_blank\">verticalAlign</a> can be used to adjust location of label in this scenario.</p>\n<p>Notice, <code class=\"codespan\">align</code> and <code class=\"codespan\">verticalAlign</code> are applied firstly, then rotate.</p>\n<h2 id=\"layout-and-alignment-of-text-fragment\">Layout and Alignment of Text fragment</h2>\n<p>To understand the layout rule, every text fragment can be imagined as a <code class=\"codespan\">inline-block</code> dom element in CSS.</p>\n<p><code class=\"codespan\">content box size</code> of a text fragment is determined by its font size by default. It can also be specified directly by <code class=\"codespan\">width</code> and <code class=\"codespan\">height</code>, although they are rarely set. <code class=\"codespan\">border box size</code> of a text fragment is calculated by adding the <code class=\"codespan\">border box size</code> and <code class=\"codespan\">padding</code>.</p>\n<p>Only <code class=\"codespan\">&#39;\\n&#39;</code> is the newline character, which breaks a line.</p>\n<p>Multiple text fragment exist in a single line. The height of a line is determined by the biggest <code class=\"codespan\">lineHeight</code> of text fragments. <code class=\"codespan\">lineHeight</code> of a text fragment can be specified in <code class=\"codespan\">rich</code>, or in the parent level of <code class=\"codespan\">rich</code>, otherwise using <code class=\"codespan\">box size</code> of the text fragment.</p>\n<p>Having <code class=\"codespan\">lineHeight</code> determined, the vertical position of text fragments can be determined by <code class=\"codespan\">verticalAlign</code> (there is a little different from the rule in CSS):</p>\n<ul>\n<li><code class=\"codespan\">&#39;bottom&#39;</code>: The bottom edge of the text fragment sticks to the bottom edge of the line.</li>\n<li><code class=\"codespan\">&#39;top&#39;</code>: The top edge of the text fragment sticks to the top edge of the line.</li>\n<li><code class=\"codespan\">&#39;middle&#39;</code>: In the middle of the line.</li>\n</ul>\n<p>The width of a text block can be specified by <code class=\"codespan\">width</code>, otherwise, by the longest line. Having the width determined, text fragment can be placed in each line, where the horizontal position of text fragments can be determined by its <code class=\"codespan\">align</code>.</p>\n<ul>\n<li>Firstly, place text fragments whose <code class=\"codespan\">align</code> is <code class=\"codespan\">&#39;left&#39;</code> from left to right continuously.</li>\n<li>Secondly, place text fragments whose <code class=\"codespan\">align</code> is <code class=\"codespan\">&#39;right&#39;</code> from right to left continuously.</li>\n<li>Finally, the text fragments remained will be sticked and placed in the center of the rest of space.</li>\n</ul>\n<p>The position of text in a text fragment:</p>\n<ul>\n<li>If <code class=\"codespan\">align</code> is <code class=\"codespan\">&#39;center&#39;</code>, text aligns at the center of the text fragment box.</li>\n<li>If <code class=\"codespan\">align</code> is <code class=\"codespan\">&#39;left&#39;</code>, text aligns at the left of the text fragment box.</li>\n<li>If <code class=\"codespan\">align</code> is <code class=\"codespan\">&#39;right&#39;</code>, text aligns at the right of the text fragment box.</li>\n</ul>\n<p>For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/text-fragment-align&edit=1&reset=1\" width=\"800\" height=\"220\" ></iframe>\n\n\n\n\n<h2 id=\"effects-icon-horizontal-rule-title-block-simple-table\">Effects: Icon, Horizontal Rule, Title Block, Simple Table</h2>\n<p>See example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/title-block&edit=1&reset=1\" width=\"600\" height=\"400\" ></iframe>\n\n\n<p>Icon is implemented by using image in <code class=\"codespan\">backgroundColor</code>.</p>\n<pre><code class=\"lang-js\">rich: {\n    Sunny: {\n        backgroundColor: {\n            image: &#39;./data/asset/img/weather/sunny_128.png&#39;\n        },\n        // Can only height specified, but leave width auto obtained\n        // from the image, where the aspect ratio kept.\n        height: 30\n    }\n}\n</code></pre>\n<p>Horizontal rule (like HTML &lt;hr&gt; tag) can be implemented by border:</p>\n<pre><code class=\"lang-js\">rich: {\n    hr: {\n        borderColor: &#39;#777&#39;,\n        // width is set as &#39;100%&#39; to fullfill the text block.\n        // Notice, the percentage is based on the content box, without\n        // padding. Although it is a little different from CSS rule,\n        // it is convinent in most cases.\n        width: &#39;100%&#39;,\n        borderWidth: 0.5,\n        height: 0\n    }\n}\n</code></pre>\n<p>Title block can be implemented by <code class=\"codespan\">backgroundColor</code>:</p>\n<pre><code class=\"lang-js\">// Title is at left.\nformatter: &#39;{titleBg|Left Title}&#39;,\nrich: {\n    titleBg: {\n        backgroundColor: &#39;#000&#39;,\n        height: 30,\n        borderRadius: [5, 5, 0, 0],\n        padding: [0, 10, 0, 10],\n        width: &#39;100%&#39;,\n        color: &#39;#eee&#39;\n    }\n}\n\n// Title is in the center of the line.\n// This implementation is a little tricky, but is works\n// without more complicated layout mechanism involved.\nformatter: &#39;{tc|Center Title}{titleBg|}&#39;,\nrich: {\n    titleBg: {\n        align: &#39;right&#39;,\n        backgroundColor: &#39;#000&#39;,\n        height: 30,\n        borderRadius: [5, 5, 0, 0],\n        padding: [0, 10, 0, 10],\n        width: &#39;100%&#39;,\n        color: &#39;#eee&#39;\n    }\n}\n</code></pre>\n<p>Simple table can be implemented by specify the same width to text fragments that are in the same column of different lines. See the <a href=\"https://echarts.apache.org/examples/en/view.html?c=pie-rich-text&amp;edit=1&amp;reset=1\" target=\"_blank\">example</a> at the mentioned above.</p>\n"
   },
   "Server-side Rendering": {
-    "desc": "<p>Apache ECharts<sup>TM</sup> can be rendered at server-side. For example, the thumbnails in the <a href=\"https://echarts.apache.org/examples/en/index.html\" target=\"_blank\">official examples page</a> are generated at a server.</p>\n<p>Commonly used headless tool is required, for example, <a href=\"https://github.com/GoogleChrome/puppeteer\" target=\"_blank\">puppeteer</a>, <a href=\"https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md\" target=\"_blank\">headless chrome</a>, <a href=\"https://github.com/Automattic/node-canvas\" target=\"_blank\">node-canvas</a>, <a href=\"https://github.com/jsdom/jsdom\" target=\"_blank\">jsdom</a>, <a href=\"http://phantomjs.org/\" target=\"_blank\">PhantomJS</a>, etc.</p>\n<p>Some solutions contributed by the community are list as follows:</p>\n<ul>\n<li><a href=\"https://github.com/hellosean1025/node-echarts\" target=\"_blank\">https://github.com/hellosean1025/node-echarts</a></li>\n<li><a href=\"https://github.com/chfw/echarts-scrappeteer\" target=\"_blank\">https://github.com/chfw/echarts-scrappeteer</a></li>\n<li><a href=\"https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js\" target=\"_blank\">https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js</a></li>\n<li><a href=\"https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73\" target=\"_blank\">https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73</a></li>\n</ul>\n"
+    "desc": "<p>Apache ECharts<sup>TM</sup> can be rendered at server-side. For example, the thumbnails in the <a href=\"https://echarts.apache.org/examples/en/index.html\" target=\"_blank\">official examples page</a> are generated at a server.</p>\n<p>Commonly used headless tool is required, for example, <a href=\"https://github.com/GoogleChrome/puppeteer\" target=\"_blank\">puppeteer</a>, <a href=\"https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md\" target=\"_blank\">headless chrome</a>, <a href=\"https://github.com/Automattic/node-canvas\" target=\"_blank\">node-canvas</a>, <a href=\"https://github.com/jsdom/jsdom\" target=\"_blank\">jsdom</a>, <a href=\"http://phantomjs.org/\" target=\"_blank\">PhantomJS</a>, etc.</p>\n<p>Some solutions contributed by the community are list as follows:</p>\n<ul>\n<li><a href=\"https://github.com/hellosean1025/node-echarts\" target=\"_blank\">https://github.com/hellosean1025/node-echarts</a></li>\n<li><a href=\"https://github.com/chfw/echarts-scrappeteer\" target=\"_blank\">https://github.com/chfw/echarts-scrappeteer</a></li>\n<li><a href=\"https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js\" target=\"_blank\">https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js</a></li>\n<li><a href=\"https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73\" target=\"_blank\">https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73</a></li>\n</ul>\n<p>Notice: if server-side rendering result is different from browser-side rendering, please set <a href=\"option.html#animation\" target=\"_blank\">animation</a> as <code class=\"codespan\">false</code> and try again.</p>\n"
   },
   "Render by Canvas or SVG": {
     "desc": "<p>Most of browser-side charting libraries use SVG or Canvas as their underlying renderer. In the scope of Apache ECharts<sup>TM</sup>, they are usually alternative, without critical differences. But in some environment and scenarios, they show notable differences in performance or functionality.</p>\n<p>ECharts has been using Canvas as its renderer (use VML for IE8-) from the beginning. As of <a href=\"https://github.com/apache/echarts/releases\" target=\"_blank\">ECharts v3.8</a> we provide an SVG renderer (beta version) as another option. Either of them can be used by specifing parameter <a href=\"api.html#echarts.init\" target=\"_blank\">renderer</a> as <code class=\"codespan\">&#39;canvas&#39;</code> or <code class=\"codespan\">&#39;svg&#39;</code> when initailizing a chart instance.</p>\n<blockquote>\n<p>Both SVG and Canvas, which are very different rendering implementations, are supported in ECharts by leveraging the Canvas and SVG renderers offered by the <a href=\"https://github.com/ecomfe/zrender\" target=\"_blank\">zrender</a> library.</p>\n</blockquote>\n<h2 id=\"how-to-make-a-choice-\">How to make a choice?</h2>\n<p>Generally speaking, Canvas is suitable for cases where there is a large amount of graphical elements (usually due to a large amount of data points), like heatmap and lines or scatter plot with large data in geo or parallel coordinates. In addition, it supports some <a href=\"https://echarts.apache.org/examples/en/editor.html?c=lines-bmap-effect\" target=\"_blank\">special visual effect</a> not supported by SVG. However, in some other scenarios SVG has some critical advantages: it consumes less memory than Canvas (especially in mobile devices), and gives better performance in rendering. Moreover, it never blurs when zooming the viewport of the browser whereas Canvas may blur.</p>\n<p>How to make a choice? These factors, hardware and software environment, data amount and functional requirements, should be considered.</p>\n<ul>\n<li>When not constrained by hardware/software, and the data amount is not large, both should provide equally satisfactory results.</li>\n<li>When encountering performance issues, we can attempt to get better result by choose appropriate renderer.<ul>\n<li>If lots of ECharts instances have to be created, and it causes the browser crash (probably caused by that the large memory consumption) we can try the SVG renderer. Or, generally, when running on some old Android devices, or if we are using some kind of charts like <a href=\"https://ecomfe.github.io/echarts-liquidfill/example/\" target=\"_blank\">liquidfill</a>, the SVG renderer probably gives a better performance.</li>\n<li>If visualizing a large amount of data, or complicated human interactions with data is required, the Canvas renderer works better currently.</li>\n</ul>\n</li>\n</ul>\n<p>Therefore <a href=\"https://github.com/apache/echarts/issues/new\" target=\"_blank\">feedback</a> of experiences and usage scenarios are strongly welcomed, which will help improve the these renderers.</p>\n<h2 id=\"how-to-use-specify-a-renderer-\">How to use specify a renderer?</h2>\n<p>ECharts uses Canvas by default. If a user intends to use the SVG renderer, the module of the SVG renderer should be included in ECharts bundle.</p>\n<ul>\n<li>In the <a href=\"https://www.jsdelivr.com/package/npm/echarts\" target=\"_blank\">pre-build</a> of ECharts, the SVG renderer has been included in <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.common.min.js\" target=\"_blank\">common version</a> and <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js\" target=\"_blank\">complete version</a>. But not in <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.simple.min.js\" target=\"_blank\">simple version</a>.</li>\n<li>When <a href=\"https://echarts.apache.org/en/builder.html\" target=\"_blank\">building ECharts online</a>, the checkbox &quot;SVG Renderer&quot; should be checked.</li>\n<li>When <a href=\"tutorial.html#Use%20ECharts%20with%20bundler%20and%20NPM\" target=\"_blank\">building ECharts offline</a>, the SVG renderer module should be imported:</li>\n</ul>\n<pre><code class=\"lang-js\">import &#39;zrender/lib/svg/svg&#39;;\n</code></pre>\n<p>Then we can specify renderer by <a href=\"api.html#echarts.init\" target=\"_blank\">parameter</a>:</p>\n<pre><code class=\"lang-js\">// Use the Canvas renderer (default).\nvar chart = echarts.init(containerDom, null, {renderer: &#39;canvas&#39;});\n// which is equal to:\nvar chart = echarts.init(containerDom, null, {renderer: &#39;canvas&#39;});\n\n// Use the SVG renderer.\nvar chart = echarts.init(containerDom, null, {renderer: &#39;svg&#39;});\n</code></pre>\n"
diff --git a/en/documents/tutorial.json b/en/documents/tutorial.json
index 19ce2d6..a07994d 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 Apache ECharts<sup>TM</sup> using one of the following methods:</p>\n<ul>\n<li><p>Download official source release from <a href=\"https://echarts.apache.org/en/download.html\" target=\"_blank\">Apache ECharts website</a>. Then <a href=\"https://github.com/apache/echarts#build\" target=\"_blank\">build</a> from the source release.</p>\n</li>\n<li><p>Download from <a href=\"https://github.com/apache/echarts/releases\" target=\"_blank\">GitHub</a></p>\n</li>\n<li><p>Using npm: <code class=\"codespan\">npm install echarts --save</code>. <a href=\"tutorial.html#Use%20ECharts%20with%20webpack\" target=\"_blank\">Using ECharts with webpack</a></p>\n</li>\n<li><p>Use CDN like <a href=\"https://www.jsdelivr.com/package/npm/echarts\" target=\"_blank\">jsDelivr</a>.</p>\n</li>\n</ul>\n<h2 id=\"including-echarts\">Including ECharts</h2>\n<p>Load <code class=\"codespan\">echarts.min.js</code> with a script tag.</p>\n<pre><code class=\"lang-html\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n    &lt;meta charset=&quot;utf-8&quot;&gt;\n    &lt;!-- including ECharts file --&gt;\n    &lt;script src=&quot;echarts.min.js&quot;&gt;&lt;/script&gt;\n&lt;/head&gt;\n&lt;/html&gt;\n</code></pre>\n<h2 id=\"draw-a-simple-chart\">Draw a simple chart</h2>\n<p>Before drawing charts, we need to prepare a DOM container with width and height for ECharts.</p>\n<pre><code>&lt;body&gt;\n    &lt;!-- preparing a DOM with width and height for ECharts --&gt;\n    &lt;div id=&quot;main&quot; style=&quot;width:600px; height:400px;&quot;&gt;&lt;/div&gt;\n&lt;/body&gt;\n</code></pre><p>Then we can initialize an ECharts instance using <a href=\"api.html#echarts.init\" target=\"_blank\">echarts.init</a>, and create a simple bar chart with <a href=\"api.html#echartsInstance.setOption\" target=\"_blank\">setOption</a>. Below is the complete code.</p>\n<pre><code class=\"lang-html\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n    &lt;meta charset=&quot;utf-8&quot;&gt;\n    &lt;title&gt;ECharts&lt;/title&gt;\n    &lt;!-- including ECharts file --&gt;\n    &lt;script src=&quot;echarts.js&quot;&gt;&lt;/script&gt;\n&lt;/head&gt;\n&lt;body&gt;\n    &lt;!-- prepare a DOM container with width and height --&gt;\n    &lt;div id=&quot;main&quot; style=&quot;width: 600px;height:400px;&quot;&gt;&lt;/div&gt;\n    &lt;script type=&quot;text/javascript&quot;&gt;\n        // based on prepared DOM, initialize echarts instance\n        var myChart = echarts.init(document.getElementById(&#39;main&#39;));\n\n        // specify chart configuration item and data\n        var option = {\n            title: {\n                text: &#39;ECharts entry example&#39;\n            },\n            tooltip: {},\n            legend: {\n                data:[&#39;Sales&#39;]\n            },\n            xAxis: {\n                data: [&quot;shirt&quot;,&quot;cardign&quot;,&quot;chiffon shirt&quot;,&quot;pants&quot;,&quot;heels&quot;,&quot;socks&quot;]\n            },\n            yAxis: {},\n            series: [{\n                name: &#39;Sales&#39;,\n                type: &#39;bar&#39;,\n                data: [5, 20, 36, 10, 10, 20]\n            }]\n        };\n\n        // use configuration item and data specified to show chart\n        myChart.setOption(option);\n    &lt;/script&gt;\n&lt;/body&gt;\n&lt;/html&gt;\n</code></pre>\n<p>You&#39;ve made your first chart!</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/getting-started&reset=1&edit=1\" width=\"600\" height=\"300\" ></iframe>\n\n\n<p>For more examples, go to the <a href=\"https://echarts.apache.org/examples/en/editor.html?c=doc-example/getting-started\" target=\"_blank\">ECharts Gallery</a></p>\n"},"New features in ECharts 5":{"type":["*"],"description":"<p>Data visualization has come a long way in the last few years. Developers no longer expect visualization products to be simple chart creation tools, but have more advanced needs in terms of interaction, performance, data processing, and more.</p>\n<p>Apache ECharts has always been committed to making it easier for developers to create flexible and rich visualizations. In the latest release of Apache ECharts 5, we have focused on enhancing the storytelling of charts, allowing developers to tell the story behind the data in a simpler way.</p>\n<p><img src=\"documents/asset/img/feature-v5/echarts-5-en.png\" width=\"800px\" /></p>\n<p>&quot;The core of Apache ECharts 5 is &quot;Show, do not tell&quot;, which is a comprehensive upgrade of five topics and 15 features around the stroy telling of visualizations, allowing charts to better tell the story behind the data. It helps developers to create visualizations that meet the needs of various scenarios more easily.</p>\n<h2 id=\"storytelling\">Storytelling</h2>\n<p>The importance of animation to human cognition cannot be overstated. In our previous work, we used initialization animations and transition animations to help users understand the connection between data transformations, making the appearance of charts and transformations seem less rigid. This time, we have even enhanced our animation capabilities, even more significantly. We hope to further exploit the role of animation to help users&#39; cognition, and help them understand the story behind the chart more easily with the dynamic stroy function of the chart.</p>\n<h4 id=\"bar-line-racing\">Bar/Line Racing</h4>\n<p>Apache ECharts 5 adds support for dynamically sorted bar-racing and dynamically sorted line-racing charts to help developers easily create time-series charts that show changes in data over time and tell the evolution of data.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=bar-race-country&edit=1&reset=1\" width=\"700\" height=\"400\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=line-race&edit=1&reset=1\" width=\"700\" height=\"400\" ></iframe>\n\n\n<p>The dynamic sorting chart shows the derivation of different categories in the ranking over time. The developer can enable this effect in ECharts with a few simple configuration code.</p>\n<h4 id=\"custom-series-animation\">Custom Series Animation</h4>\n<p>In addition to dynamic sorting charts, Apache ECharts 5 provides even richer and more powerful animations in the custom series, supporting interpolation animations for label value text, transition animations for morph, combine, separate, and other effects of graphics.</p>\n<p>Imagine what amazing visualizations you can create with these dynamic effects!</p>\n<h2 id=\"visual-design\">Visual Design</h2>\n<p>The role of visual design is not only to make the chart look better, but more importantly, a design that conforms to the principles of visualization can help users understand more quickly what the chart is trying to say and eliminate as much misunderstanding as possible from poor design.</p>\n<h4 id=\"overall-design\">Overall Design</h4>\n<p>We have found that a large percentage of developers use the default theme style for ECharts, so it is important to have an elegant default theme design. In Apache ECharts 5, we redesigned the default theme style, optimizing it for different charts and components. For example, we took into account factors such as differentiation between colors, contrast with background colors, and harmony with adjacent colors, and ensured that people with color blindness could clearly distinguish data.</p>\n<p><img src=\"documents/asset/img/feature-v5/theme-color.png\" width=\"400px\" /></p>\n<p>Let&#39;s look at the new version of the light and dark theme styles using the most commonly used bar chart as an example.</p>\n<p><img src=\"documents/asset/img/feature-v5/new-theme-light.png\" width=\"500px\" />\n<img src=\"documents/asset/img/feature-v5/new-theme-dark.png\" width=\"500px\" /></p>\n<p>For the data area zoom, timeline and other interactive components, we also designed a new style and provide a better interactive experience: &lt;img src=&quot;documents/asset/img/feature/v5/new-theme-dark.png</p>\n<p><img src=\"documents/asset/img/feature-v5/dataZoom.png\" width=\"500px\" /></p>\n<p><img src=\"documents/asset/img/feature-v5/timeline.png\" width=\"500px\" /></p>\n<h4 id=\"label\">Label</h4>\n<p>Labels are one of the core elements of a chart, and clear and unambiguous labels help users to have a more accurate understanding of the data. Apache ECharts 5 provides a variety of new labeling features that allow dense labels to be clearly displayed and accurately represented.</p>\n<p>Apache ECharts 5 can be enabled to automatically hide overlapping labels through a configuration item. For labels that exceed the display area, you can choose to automatically truncate or line break them. Dense pie chart labels now have a more aesthetically pleasing automatic layout.</p>\n<p>These features can help avoid text that is too dense and affects readability. And, no additional code needs to be written by the developer for them to take effect by default, greatly simplifying the development cost for developers.</p>\n<p>We also provide several configuration options to allow developers to actively control the layout strategy of tabs, such as tab dragging, overall display at the edge of the canvas, connecting with guide lines and graphical elements, and still linking to highlight the associated relationships.</p>\n<p>The new label feature allows you to have very clear label presentation even in a confined space mobile:</p>\n<p><img src=\"documents/asset/img/feature-v5/pie-label.png\" height=\"150px\" />\n<img src=\"documents/asset/img/feature-v5/pie-label-2.png\" height=\"150px\" /></p>\n<h4 id=\"time-axis\">Time Axis</h4>\n<p>Apache ECharts 5 brings a time axis suitable for expressing timestamp scales. The default design of the time axis highlights important information more prominently and provides more flexible customization capabilities, allowing developers to tailor the time axis&#39;s label content to different needs.</p>\n<p>First of all, the time axis is no longer split absolutely evenly as before, but instead selects more meaningful points like year, month, day, and whole point to display, and can show different levels of scales at the same time. The <code class=\"codespan\">formatter</code> of labels supports templates for time (e.g. <code class=\"codespan\">{yyyy}-{MM}-{dd}</code>), and different <code class=\"codespan\">formatter</code> can be specified for labels with different time granularity, which can be combined with rich text labels to create eye-catching and diverse time effects.</p>\n<p>The display of the time scale at different dataZoom granularities.</p>\n<p><img src=\"documents/asset/img/feature-v5/time-axis.png\" width=\"600px\" /></p>\n<p><img src=\"documents/asset/img/feature-v5/time-axis-2.png\" width=\"600px\" /></p>\n<h4 id=\"tooltip\">Tooltip</h4>\n<p>Tooltip is one of the most commonly used visualization components to help users interactively understand the details of data. In Apache ECharts 5, we have optimized the style of the tooltip, making the default display of the tooltip elegant and clear by adjusting the font style, color, arrow pointing to the graph, border color following the graph color, and other features. The rendering logic of rich text has been improved to ensure that the display is consistent with the HTML way, allowing users to choose different technical solutions to achieve the same effect in different scenarios.</p>\n<p><img src=\"documents/asset/img/feature-v5/new-tooltip.png\" height=\"200px\" />\n<img src=\"documents/asset/img/feature-v5/new-tooltip-2.png\" height=\"200px\" /></p>\n<p>In addition to this, we have also added the ability to sort the list in the tip box by value size or category order this time.</p>\n<h4 id=\"gauge\">Gauge</h4>\n<p>We have seen a lot of cool gauge charts created by community users, but the way they are configured is often complex and tricky. Therefore, we have upgraded the gauge to support image or vector path drawing pointers, anchor configurations, progress bars, rounded corner effects, and more.</p>\n<p>Different styles of gauge pointers.</p>\n<p><img src=\"documents/asset/img/feature-v5/gauge-pointer.png\" width=\"600px\" /></p>\n<p>These upgrades not only allow developers to achieve cool effects with simpler configuration items, but also bring richer customization capabilities.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=gauge-clock&edit=1&reset=1\" width=\"600\" height=\"600\" ></iframe>\n\n\n<h4 id=\"round-corner\">Round Corner</h4>\n<p>Apache ECharts 5 supports round corner for pie charts, sunburst charts, and treemap charts. Don&#39;t underestimate the simplicity of the rounded corners configuration, but combine them with other effects to create a more personalized visualization.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=sunburst-borderRadius&edit=1&reset=1\" width=\"400\" height=\"400\" ></iframe>\n\n\n\n<h2 id=\"interactivity\">Interactivity</h2>\n<p>The interactivity of the visualization helps users explore the work and deepen their understanding of the main idea of the diagram.</p>\n<h4 id=\"multi-state\">Multi-State</h4>\n<p>In ECharts 4, there were two interactive states, <code class=\"codespan\">emphasis</code> and <code class=\"codespan\">normal</code>, graph will enter the <code class=\"codespan\">emphasis</code> state when the mouse hovered to distinguish the data.</p>\n<p>This time in Apache ECharts 5, we have added a new effect of <strong>blur</strong> other non-related elements to the original mouse hover highlighting, so that the target data can be focused.</p>\n<p>For example, in this <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=bar-y-category-stack\" target=\"_blank\">bar chart</a> example, when the mouse hovers over a series, other non-related series will fade out, thus highlighting more clearly the comparison of data in the focused series. of data in the comparison. On diagrams with more complex data structures such as relationship, tree, sunburst, sankey, etc., it is also possible to see the connections between data by fading out non-related elements. Also, colors, shadows, and other styles that can be set in <code class=\"codespan\">emphasis</code> can now be set in <code class=\"codespan\">blur</code>.</p>\n<p>In addition, we&#39;ve added <strong>click to select</strong> to all series, an interaction that was previously only available in a few series such as pie charts and maps, allowing developers to set it to single or multiple selection mode, and to listen to the <code class=\"codespan\">selectchanged</code> event to get all the selected shapes for further processing. As with <code class=\"codespan\">emphasis</code> and <code class=\"codespan\">blur</code>, the selection style can also be configured in <code class=\"codespan\">select</code>.</p>\n<h4 id=\"performance-improvements\">Performance improvements</h4>\n<h5 id=\"dirty-rectangle-rendering\">Dirty Rectangle Rendering</h5>\n<p>Apache ECharts 5 has new support for dirty rectangle rendering to address performance bottlenecks in large scenes with only local changes. When using the Canvas renderer, the dirty rectangle rendering technique detects and updates only the parts of the view that have changed, rather than any changes causing a complete redraw of the canvas. This can help improve rendering frame rates in some special scenarios, such as scenes where the mouse frequently triggers some graphical highlighting many times. In the past for such scenes, additional Canvas layers were used to optimize performance, but this approach is not universal for all scenes and does not work well for complex styles. Dirty Rectangle rendering does a good job of satisfying both performance and display correctness.</p>\n<p>A visual demonstration of a dirty rectangle, with the red boxed area redrawn for the frame.</p>\n<p><img src=\"documents/asset/img/feature-v5/dirty-rect.gif\" width=\"500px\" /></p>\n<p>You can see the effect by enable dirty rectangle optimization on the new example page.</p>\n<h5 id=\"line-chart-performance-optimization-for-real-time-time-series-data\">Line Chart Performance Optimization for Real-Time Time-Series Data</h5>\n<p>In addition, the performance of line graphs with large amounts of data has also seen a significant performance improvement. We often encounter the need for high-performance plotting of large amounts of real-time time-series data, which will be updated every hundreds or tens of milliseconds.</p>\n<p>Apache ECharts 5 deeply optimizes CPU consumption, memory usage, and initialization time in these scenarios, enabling real-time updates (less than 30ms per update) for millions of data, and even rendering within 1s for ten millions of data, with low memory usage and smooth tooltip interactions.</p>\n<h2 id=\"development-experience\">Development Experience</h2>\n<p>We want such a powerful visualization tool to be used by more developers in a simpler way, so the developer experience is also a very important aspect for us.</p>\n<h4 id=\"datasets\">Datasets</h4>\n<p>ECharts 5 enhances the data transformation capabilities of datasets, allowing developers to implement common data processing such as filtering, sorting, aggregating, histogram, simple clustering, regression, etc. in a simple way. Developers can use these functions in a uniform and declarative way, and can easily implement common data operations.</p>\n<h4 id=\"internationalization\">Internationalization</h4>\n<p>The original internationalization implementation of ECharts takes the form of different distribution files packaged according to different language parameters. In this way, the dynamic language and main code are bound together, and the only way to switch languages when using ECharts is to reload different language versions of ECharts distributions.</p>\n<p>Therefore, starting with Apache ECharts 5, the dynamic language is separated from the main code. To switch languages, you only need to load the corresponding language, use the <code class=\"codespan\">registerLocale</code> function to mount the language object in a similar way to mount the theme, and then reinitialize it to complete the language switch.</p>\n<pre><code class=\"lang-js\">// import the lang object and set when init\necharts.registerLocale(&#39;DE&#39;, lang).\necharts.init(DomElement, null, {\n   locale: &#39;DE&#39;\n});\n</code></pre>\n<h4 id=\"typescript-refactoring\">TypeScript Refactoring</h4>\n<p>In order to continue to refactor and develop new features more safely and efficiently, we started the development of Apache ECharts 5 by rewriting the code using TypeScript. The strong typing brought by TypeScript gave us the confidence to refactor the code drastically to achieve more exciting features during the development of ECharts 5.</p>\n<p>For developers, we can also generate better and more code-compliant <code class=\"codespan\">DTS</code> type description files directly from TypeScript code. Until now, ECharts type description files have been maintained by community developers and published to <a href=\"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/echarts\" target=\"_blank\">DefinityTyped</a>, which is a lot of work, so thanks for your contribution.</p>\n<p>In addition, if a developer&#39;s component is introduced on-demand, we provide a <code class=\"codespan\">ComposeOption</code> type method that can combine a configuration item type that contains only the introduced components, which can bring stricter type checking and help you detect unintroduced component types in advance.</p>\n<h2 id=\"accessibility\">Accessibility</h2>\n<p>Apache ECharts has always taken accessibility design seriously, and we want to make the information conveyed by charts equally to be accessed. We also want to make this possible for chart developers at a very low development cost, thus making developers more willing to support the accessibility.</p>\n<p>In the last major release, we supported automatic intelligent generation of chart descriptions based on different chart types and data, making it very easy for developers to support DOM description information for charts. In ECharts 5, we have also made more accessibility improvements to help people with visual impairments better understand the chart content.</p>\n<h4 id=\"theme-colors\">Theme Colors</h4>\n<p>We took accessibility into account when designing the new default theme, and we repeatedly tested the brightness and color values of the colors to help accessibility users clearly identify the chart data.</p>\n<p>Moreover, for developers with further accessibility needs, we also provide special high-contrast themes to further differentiate the data with higher contrast colors.</p>\n<h4 id=\"decal-patterns\">Decal Patterns</h4>\n<p>ECharts 5 also provides a new feature of decals to help users further differentiate data by using patterns to assist with color representation.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/aria-decal-simple&edit=1&reset=1\" width=\"600\" height=\"350\" ></iframe>\n\n\n<p>In addition, decal patterns can also help in some other scenarios, such as: helping to better distinguish data in printed materials like newspapers and books that have only a single color or very few colors; using graphical elements to facilitate a more intuitive understanding of the data by the user.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/aria-decal-newspaper&edit=1&reset=1\" width=\"600\" height=\"350\" ></iframe>\n\n\n\n\n<h2 id=\"summary\">Summary</h2>\n<p>In addition to the features described above, Apache ECharts has been improved in a very large number of details to help developers more easily create charts that good by default, are flexible in configuration, and tell the story behind the data with charts.</p>\n<p>Thank you to all the developers who have used ECharts, and even participated in community contributions, for making Apache ECharts 5 possible. We&#39;ll be working on future developments with even more enthusiasm, and we&#39;ll see you all in 6 with even more enthusiasm!</p>\n"},"ECharts 5 Upgrade Guide":{"type":["*"],"description":"<p>This guide is for those who want to upgrade from echarts 4.x (hereafter <code class=\"codespan\">v4</code>) to echarts 5.x (hereafter <code class=\"codespan\">v5</code>). You can find out what new features <code class=\"codespan\">v5</code> brings that are worth upgrading in <a href=\"tutorial.html#ECharts%205%20Upgrade%20Guide\" target=\"_blank\">New Features in ECharts 5</a>. In most cases, developers won&#39;t need to do anything extra for this upgrade, as echarts has always tried to keep the API as stable and backward-compatible as possible. However, <code class=\"codespan\">v5</code> still brings some breaking changes that require special attention. In addition, in some cases, <code class=\"codespan\">v5</code> provides a better API to replace the previous one, and these superseded APIs will no longer be recommended (though we have tried to be as compatible as possible with these changes). We&#39;ll try to explain these changes in detail in this document.</p>\n<p>Since we added the new <a href=\"tutorial.html#Use%20ECharts%20with%20bundler%20and%20NPM\" target=\"_blank\">tree-shaking API</a> in <code class=\"codespan\">v5.0.1</code>, this documentation is based on <code class=\"codespan\">v5.0.1</code> or higher.</p>\n<h2 id=\"breaking-changes\">Breaking Changes</h2>\n<h4 id=\"default-theme\">Default theme</h4>\n<p>First of all, the default theme has been changed. <code class=\"codespan\">v5</code> has made a lot of changes and optimizations on the theme design. If you still want to keep the colors of the old version, you can manually declare the colors as follows.</p>\n<pre><code class=\"lang-js\">chart.setOption({\n    color: [\n        &#39;#c23531&#39;, &#39;#2f4554&#39;, &#39;#61a0a8&#39;, &#39;#d48265&#39;, &#39;#91c7ae&#39;, &#39;#749f83&#39;,\n        &#39;#ca8622&#39;, &#39;#bda29a&#39;, &#39;#6e7074&#39;, &#39;#546570&#39;, &#39;#c4ccd3&#39;\n    ],\n    // ...\n});\n</code></pre>\n<p>Or, to make a simple <code class=\"codespan\">v4</code> theme.</p>\n<pre><code class=\"lang-js\">var themeEC4 = {\n    color: [\n        &#39;#c23531&#39;, &#39;#2f4554&#39;, &#39;#61a0a8&#39;, &#39;#d48265&#39;, &#39;#91c7ae&#39;, &#39;#749f83&#39;,\n        &#39;#ca8622&#39;, &#39;#bda29a&#39;, &#39;#6e7074&#39;, &#39;#546570&#39;, &#39;#c4ccd3&#39;\n    ]\n};\nvar chart = echarts.init(dom, themeEC4);\nchart.setOption(/* ... */);\n</code></pre>\n<h4 id=\"importing-echarts\">Importing ECharts</h4>\n<h5 id=\"removing-support-for-default-exports\">Removing support for default exports</h5>\n<p>Since <code class=\"codespan\">v5</code>, echarts only provides <code class=\"codespan\">named exports</code>.</p>\n<p>So if you are importing <code class=\"codespan\">echarts</code> like this:</p>\n<pre><code class=\"lang-js\">import echarts from &#39;echarts&#39;;\n// Or import core module\nimport echarts from &#39;echarts/lib/echarts&#39;;\n</code></pre>\n<p>It will throw error in <code class=\"codespan\">v5</code>. You need to change the code as follows to import the entire module.</p>\n<pre><code class=\"lang-js\">import * as echarts from &#39;echarts&#39;;\n// Or\nimport * as echarts from &#39;echarts/lib/echarts&#39;;\n</code></pre>\n<h5 id=\"tree-shaking-api\">tree-shaking API</h5>\n<p>In 5.0.1, we introduced the new <a href=\"tutorial.html#Use%20ECharts%20with%20bundler%20and%20NPM\" target=\"_blank\">tree-shaking API</a></p>\n<pre><code class=\"lang-js\">import * as echarts from &#39;echarts/core&#39;;\nimport { BarChart } from &#39;echarts/charts&#39;;\nimport { GridComponent } from &#39;echarts/components&#39;;\n// Note that the Canvas renderer is no longer included by default and needs to be imported explictly, or import the SVGRenderer if you need to use the SVG rendering mode\nimport { CanvasRenderer } from &#39;echarts/renderers&#39;;\n\necharts.use([BarChart, GridComponent, CanvasRenderer]);\n</code></pre>\n<p>To make it easier for you to know which modules you need to import based on your option, our new example page adds a new feature to generate the three-shakable code, you can check the <code class=\"codespan\">Full Code</code> tab on the example page to see the modules you need to introduce and the related code.</p>\n<p>In most cases, we recommend using the new tree-shaking interface whenever possible, as it maximizes the power of the packaging tool tree-shaking and effectively resolves namespace conflicts and prevents the exposure of internal structures. If you are still using the CommonJS method of writing modules, the previous approach is still supported:</p>\n<pre><code class=\"lang-js\">const echarts = require(&#39;echarts/lib/echarts&#39;);\nrequire(&#39;echarts/lib/chart/bar&#39;);\nrequire(&#39;echarts/lib/component/grid&#39;);\n</code></pre>\n<p>Second, because our source code has been rewritten using TypeScript, <code class=\"codespan\">v5</code> will no longer support importing files from <code class=\"codespan\">echarts/src</code>. You need to change it to import from <code class=\"codespan\">echarts/lib</code>.</p>\n<h5 id=\"dependency-adjustment\">dependency adjustment</h5>\n<blockquote>\n<p>Note: This section is only for developers who use tree-shaking interfaces to ensure a minimal bundle size, not for those who imports the whole package.</p>\n</blockquote>\n<p>In order to keep the size of the bundle small enough, we remove some dependencies that would have been imported by default. For example, as mentioned above, when using the new on-demand interface, <code class=\"codespan\">CanvasRenderer</code> is no longer introduced by default, which ensures that unneeded Canvas rendering code is not imported when only SVG rendering mode is used, and in addition, the following dependencies are adjusted.</p>\n<ul>\n<li>The right-angle coordinate system component is no longer introduced by default when using line charts and bar charts, so the following introduction method was used before<pre><code class=\"lang-js\">const echarts = require(&#39;echarts/lib/echarts&#39;);\nrequire(&#39;echarts/lib/chart/bar&#39;);\nrequire(&#39;echarts/lib/chart/line&#39;);\n</code></pre>\nNeed to introduce the <code class=\"codespan\">grid</code> component separately again<pre><code class=\"lang-js\">require(&#39;echarts/lib/component/grid&#39;);\n</code></pre>\n</li>\n</ul>\n<p>Reference issues: <a href=\"https://github.com/apache/echarts/issues/14080\" target=\"_blank\">#14080</a>, <a href=\"https://github.com/apache/echarts/issues/13764\" target=\"_blank\">#13764</a></p>\n<ul>\n<li><code class=\"codespan\">aria</code> components are no longer imported by default. You need import it manually if necessary.<pre><code class=\"lang-js\">import { AriaComponent } from &#39;echarts/components&#39;;\necharts.use(AriaComponent);\n</code></pre>\nOr<pre><code class=\"lang-js\">require(&#39;echarts/lib/component/aria&#39;);\n</code></pre>\n</li>\n</ul>\n<h4 id=\"removes-built-in-geojson\">removes built-in geoJSON</h4>\n<p><code class=\"codespan\">v5</code> removes the built-in geoJSON (previously in the <code class=\"codespan\">echarts/map</code> folder). These geoJSON files were always sourced from third parties. If users still need them, they can go get them from the old version, or find more appropriate data and register it with ECharts via the registerMap interface.</p>\n<h4 id=\"browser-compatibility\">Browser Compatibility</h4>\n<p>IE8 is no longer supported by <code class=\"codespan\">v5</code>. We no longer maintain and upgrade the previous <a href=\"https://github.com/ecomfe/zrender/tree/4.3.2/src/vml\" target=\"_blank\">VML renderer</a> for IE8 compatibility. If developers have a strong need for a VML renderer, they are welcome to submit a pull request to upgrade the VML renderer or maintain a separate third-party VML renderer, as we support registration of standalone renderers starting with <code class=\"codespan\">v5.0.1</code>.</p>\n<h4 id=\"echarts-configuration-item-adjustment\">ECharts configuration item adjustment</h4>\n<h5 id=\"visual-style-settings-priority-change\">Visual style settings priority change</h5>\n<p>The priority of the visuals between <a href=\"option.html#visualMap\" target=\"_blank\">visualMap component</a> and <a href=\"option.html#series-scatter.itemStyle\" target=\"_blank\">itemStyle</a> | <a href=\"option.html#series-scatter.lineStyle\" target=\"_blank\">lineStyle</a> | <a href=\"option.html#series-scatter.areaStyle\" target=\"_blank\">areaStyle</a> are reversed since <code class=\"codespan\">v5</code>.</p>\n<p>That is, previously in <code class=\"codespan\">v4</code>, the visuals (i.e., color, symbol, symbolSize, ...) that generated by <a href=\"option.html#visualMap\" target=\"_blank\">visualMap component</a> has the highest priority, which will overwrite the same visuals settings in <a href=\"option.html#series-scatter.itemStyle\" target=\"_blank\">itemStyle</a> | <a href=\"option.html#series-scatter.lineStyle\" target=\"_blank\">lineStyle</a> | <a href=\"option.html#series-scatter.areaStyle\" target=\"_blank\">areaStyle</a>. That brought troubles when needing to specify specific style to some certain data items while using <a href=\"option.html#visualMap\" target=\"_blank\">visualMap component</a>. Since <code class=\"codespan\">v5</code>, the visuals specified in <a href=\"option.html#series-scatter.itemStyle\" target=\"_blank\">itemStyle</a> | <a href=\"option.html#series-scatter.lineStyle\" target=\"_blank\">lineStyle</a> | <a href=\"option.html#series-scatter.areaStyle\" target=\"_blank\">areaStyle</a> has the highest priority.</p>\n<p>In most cases, users will probably not notice this change when migrating from <code class=\"codespan\">v4</code> to <code class=\"codespan\">v5</code>. But users can still check that if <a href=\"option.html#visualMap\" target=\"_blank\">visualMap component</a> and <a href=\"option.html#series-scatter.itemStyle\" target=\"_blank\">itemStyle</a> | <a href=\"option.html#series-scatter.lineStyle\" target=\"_blank\">lineStyle</a> | <a href=\"option.html#series-scatter.areaStyle\" target=\"_blank\">areaStyle</a> are both specified.</p>\n<h5 id=\"padding-for-rich-text\"><code class=\"codespan\">padding</code> for rich text</h5>\n<p><code class=\"codespan\">v5</code> adjusts the <a href=\"option.html#series-scatter.label.rich.&lt;style_name&gt;.padding\" target=\"_blank\">rich.?.padding</a> to make it more compliant with CSS specifications. In <code class=\"codespan\">v4</code>, for example <code class=\"codespan\">rich. .padding: [11, 22, 33, 44]</code> means that <code class=\"codespan\">padding-top</code> is <code class=\"codespan\">33</code> and <code class=\"codespan\">padding-bottom</code> is <code class=\"codespan\">11</code>. The position of the top and bottom is adjusted in <code class=\"codespan\">v5</code>, <code class=\"codespan\">rich. .padding: [11, 22, 33, 44]</code> means that <code class=\"codespan\">padding-top</code> is <code class=\"codespan\">11</code> and <code class=\"codespan\">padding-bottom</code> is <code class=\"codespan\">33</code>.</p>\n<p>If the user is using <a href=\"option.html#series-scatter.label.rich.&lt;style_name&gt;.padding\" target=\"_blank\">rich.?.padding</a>, this order needs to be adjusted.</p>\n<h2 id=\"echarts-related-extensions\">ECharts Related Extensions</h2>\n<p>These extensions need to be upgraded to new version to support echarts <code class=\"codespan\">v5</code>:</p>\n<ul>\n<li><a href=\"https://github.com/ecomfe/echarts-gl\" target=\"_blank\">echarts-gl</a></li>\n<li><a href=\"https://github.com/ecomfe/echarts-wordcloud\" target=\"_blank\">echarts-wordcloud</a></li>\n<li><a href=\"https://github.com/ecomfe/echarts-liquidfill\" target=\"_blank\">echarts-liquidfill</a></li>\n</ul>\n<h2 id=\"deprecated-api\">Deprecated API</h2>\n<p>Some of the API and echarts options are deprecated since <code class=\"codespan\">v5</code>, but are still backward compatible. Users can <strong>keep using these deprecated API</strong>, with only some warning will be printed to console in dev mode. But if users have spare time, it is recommended to upgraded to new API for the consideration of long term maintenance.</p>\n<p>The deprecated API and their corresponding new API are listed as follows:</p>\n<ul>\n<li>Transform related props of a graphic element are changed:<ul>\n<li>Changes:<ul>\n<li><code class=\"codespan\">position: [number, number]</code> are changed to <code class=\"codespan\">x: number</code>/<code class=\"codespan\">y: number</code>.</li>\n<li><code class=\"codespan\">scale: [number, number]</code> are changed to <code class=\"codespan\">scaleX: number</code>/<code class=\"codespan\">scaleY: number</code>.</li>\n<li><code class=\"codespan\">origin: [number, number]</code> are changed to <code class=\"codespan\">originX: number</code>/<code class=\"codespan\">originY: number</code>.</li>\n</ul>\n</li>\n<li>The <code class=\"codespan\">position</code>, <code class=\"codespan\">scale</code> and <code class=\"codespan\">origin</code> are still supported but deprecated.</li>\n<li>It effects these places:<ul>\n<li>In the <code class=\"codespan\">graphic</code> components: the declarations of each element.</li>\n<li>In <code class=\"codespan\">custom series</code>: the declarations of each element in the return of <code class=\"codespan\">renderItem</code>.</li>\n<li>Directly use zrender graphic elements.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Text related props on graphic elements are changed:<ul>\n<li>Changes:<ul>\n<li>The declaration of attached text (or say, rect text) are changed.<ul>\n<li>Prop <code class=\"codespan\">style.text</code> are deprecated in elements except <code class=\"codespan\">Text</code>. Instead, Prop set <code class=\"codespan\">textContent</code> and <code class=\"codespan\">textConfig</code> are provided to support more powerful capabilities.</li>\n<li>These related props at the left part below are deprecated. Use the right part below instead.<ul>\n<li>textPosition =&gt; textConfig.position</li>\n<li>textOffset =&gt; textConfig.offset</li>\n<li>textRotation =&gt; textConfig.rotation</li>\n<li>textDistance =&gt; textConfig.distance</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>The props at the left part below are deprecated in <code class=\"codespan\">style</code> and <code class=\"codespan\">style.rich.?</code>. Use the props at the right part below instead.<ul>\n<li>textFill =&gt; fill</li>\n<li>textStroke =&gt; stroke</li>\n<li>textFont =&gt; font</li>\n<li>textStrokeWidth =&gt; lineWidth</li>\n<li>textAlign =&gt; align</li>\n<li>textVerticalAlign =&gt; verticalAlign);</li>\n<li>textLineHeight =&gt;</li>\n<li>textWidth =&gt; width</li>\n<li>textHeight =&gt; hight</li>\n<li>textBackgroundColor =&gt; backgroundColor</li>\n<li>textPadding =&gt; padding</li>\n<li>textBorderColor =&gt; borderColor</li>\n<li>textBorderWidth =&gt; borderWidth</li>\n<li>textBorderRadius =&gt; borderRadius</li>\n<li>textBoxShadowColor =&gt; shadowColor</li>\n<li>textBoxShadowBlur =&gt; shadowBlur</li>\n<li>textBoxShadowOffsetX =&gt; shadowOffsetX</li>\n<li>textBoxShadowOffsetY =&gt; shadowOffsetY</li>\n</ul>\n</li>\n<li>Note: these props are not changed:<ul>\n<li>textShadowColor</li>\n<li>textShadowBlur</li>\n<li>textShadowOffsetX</li>\n<li>textShadowOffsetY</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>It effects these places:<ul>\n<li>In the <code class=\"codespan\">graphic</code> components: the declarations of each element. [compat, but not accurately the same in some complicated cases.]</li>\n<li>In <code class=\"codespan\">custom series</code>: the declarations of each element in the return of <code class=\"codespan\">renderItem</code>. [compat, but not accurately the same in some complicated cases].</li>\n<li>Directly use zrender API to create graphic elements. [No compat, breaking change].</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>API on chart instance:<ul>\n<li><code class=\"codespan\">chart.one(...)</code> is deprecated.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">label</code>:<ul>\n<li>In props <code class=\"codespan\">color</code>, <code class=\"codespan\">textBorderColor</code>, <code class=\"codespan\">backgroundColor</code> and <code class=\"codespan\">borderColor</code>, the value <code class=\"codespan\">&#39;auto&#39;</code> is deprecated. Use the value <code class=\"codespan\">&#39;inherit&#39;</code> instead.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">hoverAnimation</code>:<ul>\n<li>option <code class=\"codespan\">series.hoverAnimation</code> is deprecated. Use <code class=\"codespan\">series.emphasis.scale</code> instead.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">line series</code>:<ul>\n<li>option <code class=\"codespan\">series.clipOverflow</code> is deprecated. Use <code class=\"codespan\">series.clip</code> instead.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">custom series</code>:<ul>\n<li>In <code class=\"codespan\">renderItem</code>, the <code class=\"codespan\">api.style(...)</code> and <code class=\"codespan\">api.styleEmphasis(...)</code> are deprecated. Because it is not really necessary and hard to ensure backward compatibility. Users can fetch system designated visual by <code class=\"codespan\">api.visual(...)</code>.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">sunburst series</code>:<ul>\n<li>Action type <code class=\"codespan\">highlight</code> is deprecated. Use <code class=\"codespan\">sunburstHighlight</code> instead.</li>\n<li>Action type <code class=\"codespan\">downplay</code> is deprecated. Use <code class=\"codespan\">sunburstUnhighlight</code> instead.</li>\n<li>option <code class=\"codespan\">series.downplay</code> is deprecated. Use <code class=\"codespan\">series.blur</code> instead.</li>\n<li>option <code class=\"codespan\">series.highlightPolicy</code> is deprecated. Use <code class=\"codespan\">series.emphasis.focus</code> instead.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">pie series</code>:<ul>\n<li>The action type at the left part below are deprecated. Use the right part instead:<ul>\n<li><code class=\"codespan\">pieToggleSelect</code> =&gt; <code class=\"codespan\">toggleSelect</code></li>\n<li><code class=\"codespan\">pieSelect</code> =&gt; <code class=\"codespan\">select</code></li>\n<li><code class=\"codespan\">pieUnSelect</code> =&gt; <code class=\"codespan\">unselect</code></li>\n</ul>\n</li>\n<li>The event type at the left part below are deprecated. Use the right part instead:<ul>\n<li><code class=\"codespan\">pieselectchanged</code> =&gt; <code class=\"codespan\">selectchanged</code></li>\n<li><code class=\"codespan\">pieselected</code> =&gt; <code class=\"codespan\">selected</code></li>\n<li><code class=\"codespan\">pieunselected</code> =&gt; <code class=\"codespan\">unselected</code></li>\n</ul>\n</li>\n<li>option <code class=\"codespan\">series.label.margin</code> is deprecated. Use <code class=\"codespan\">series.label.edgeDistance</code> instead.</li>\n<li>option <code class=\"codespan\">series.clockWise</code> is deprecated. Use <code class=\"codespan\">series.clockwise</code> instead.</li>\n<li>option <code class=\"codespan\">series.hoverOffset</code> is deprecated. Use <code class=\"codespan\">series.emphasis.scaleSize</code> instead.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">map series</code>:<ul>\n<li>The action type at the left part below are deprecated. Use the right part instead:<ul>\n<li><code class=\"codespan\">mapToggleSelect</code> =&gt; <code class=\"codespan\">toggleSelect</code></li>\n<li><code class=\"codespan\">mapSelect</code> =&gt; <code class=\"codespan\">select</code></li>\n<li><code class=\"codespan\">mapUnSelect</code> =&gt; <code class=\"codespan\">unselect</code></li>\n</ul>\n</li>\n<li>The event type at the left part below are deprecated. Use the right part instead:<ul>\n<li><code class=\"codespan\">mapselectchanged</code> =&gt; <code class=\"codespan\">selectchanged</code></li>\n<li><code class=\"codespan\">mapselected</code> =&gt; <code class=\"codespan\">selected</code></li>\n<li><code class=\"codespan\">mapunselected</code> =&gt; <code class=\"codespan\">unselected</code></li>\n</ul>\n</li>\n<li>option <code class=\"codespan\">series.mapType</code> is deprecated. Use <code class=\"codespan\">series.map</code> instead.</li>\n<li>option <code class=\"codespan\">series.mapLocation</code> is deprecated.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">graph series</code>:<ul>\n<li>option <code class=\"codespan\">series.focusNodeAdjacency</code> is deprecated. Use <code class=\"codespan\">series.emphasis: { focus: &#39;adjacency&#39;}</code> instead.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">gauge series</code>:<ul>\n<li>option <code class=\"codespan\">series.clockWise</code> is deprecated. Use <code class=\"codespan\">series.clockwise</code> instead.</li>\n<li>option <code class=\"codespan\">series.hoverOffset</code> is deprecated. Use <code class=\"codespan\">series.emphasis.scaleSize</code> instead.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">dataZoom component</code>:<ul>\n<li>option <code class=\"codespan\">dataZoom.handleIcon</code> need prefix <code class=\"codespan\">path://</code> if using SVGPath.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">radar</code>:<ul>\n<li>option <code class=\"codespan\">radar.name</code> is deprecated. Use <code class=\"codespan\">radar.axisName</code> instead.</li>\n<li>option <code class=\"codespan\">radar.nameGap</code> is deprecated. Use <code class=\"codespan\">radar.axisNameGap</code> instead.</li>\n</ul>\n</li>\n<li>Parse and format:<ul>\n<li><code class=\"codespan\">echarts.format.formatTime</code> is deprecated. Use <code class=\"codespan\">echarts.time.format</code> instead.</li>\n<li><code class=\"codespan\">echarts.number.parseDate</code> is deprecated. Use <code class=\"codespan\">echarts.time.parse</code> instead.</li>\n<li><code class=\"codespan\">echarts.format.getTextRect</code> is deprecated.</li>\n</ul>\n</li>\n</ul>\n"},"Use ECharts with bundler and NPM":{"type":["*"],"description":"<p>If your development environment uses a package management tool like <code class=\"codespan\">npm</code> or <code class=\"codespan\">yarn</code> and builds with a packaging tool like Webpack, this article will describe how to get a minimal bundle of Apache ECharts<sup>TM</sup> via treeshaking.</p>\n<h2 id=\"npm-installation-of-echarts\">NPM installation of ECharts</h2>\n<p>You can install ECharts via npm using the following command</p>\n<pre><code class=\"lang-shell\">npm install echarts --save\n</code></pre>\n<h2 id=\"introduce-echarts\">Introduce ECharts</h2>\n<pre><code class=\"lang-js\">import * as echarts from &#39;echarts&#39;;\n\n// initialize the echarts instance\nvar myChart = echarts.init(document.getElementById(&#39;main&#39;));\n// Draw the chart\nmyChart.setOption({\n    title: {\n        text: &#39;ECharts Getting Started Example&#39;\n    },\n    tooltip: {},\n    xAxis: {\n        data: [&#39;shirt&#39;, &#39;cardigan&#39;, &#39;chiffon&#39;, &#39;pants&#39;, &#39;heels&#39;, &#39;socks&#39;]\n    },\n    yAxis: {},\n    series: [{\n        name: &#39;sales&#39;,\n        type: &#39;bar&#39;,\n        data: [5, 20, 36, 10, 10, 20]\n    }]\n});\n</code></pre>\n<h2 id=\"importing-required-charts-and-components-to-have-minimal-bundle-\">Importing required charts and components to have minimal bundle.</h2>\n<p>The above code will import all the charts and components in ECharts, but if you don&#39;t want to bring in all the components, you can use the tree-shakeable interface provided by ECharts to bundle the required components and get a minimal bundle.</p>\n<pre><code class=\"lang-js\">// Import the echarts core module, which provides the necessary interfaces for using echarts.\nimport * as echarts from &#39;echarts/core&#39;;\n// Import bar charts, all with Chart suffix\nimport {\n    BarChart\n} from &#39;echarts/charts&#39;;\n// import the tooltip, title, and rectangular coordinate system components, all suffixed with Component\nimport {\n    TitleComponent,\n    TooltipComponent,\n    GridComponent\n} from &#39;echarts/components&#39;;\n// Import the Canvas renderer, note that introducing the CanvasRenderer or SVGRenderer is a required step\nimport {\n    CanvasRenderer\n} from &#39;echarts/renderers&#39;;\n\n// Register the required components\necharts.use(\n    [TitleComponent, TooltipComponent, GridComponent, BarChart, CanvasRenderer]\n);\n\n// The next step is the same as before, initialize the chart and set the configuration items\nvar myChart = echarts.init(document.getElementById(&#39;main&#39;));\nmyChart.setOption({\n    ...\n});\n</code></pre>\n<blockquote>\n<p>Note that in order to keep the size of the package to a minimum, ECharts does not provide any renderer in tree-shakeable interface, so you need to choose to import <code class=\"codespan\">CanvasRenderer</code> or <code class=\"codespan\">SVGRenderer</code> as the renderer. The advantage of this is that if you only need to use the svg rendering mode, the bundle will not include the <code class=\"codespan\">CanvasRenderer</code> module, which is not needed.</p>\n</blockquote>\n<p>The &quot;Full Code&quot; tab on our sample editor page provides a very convenient way to generate a tree-shakable code. It will generate tree-shakable code based on the current option dynamically. You can use it directly in your project.</p>\n<h2 id=\"minimal-option-type-in-typescript\">Minimal Option Type in TypeScript</h2>\n<p>For developers who are using TypeScript to develop ECharts, we provide a type interface to combine the minimal <code class=\"codespan\">EChartsOption</code> type. This stricter type can effectively help you check for missing components or charts.</p>\n<pre><code class=\"lang-ts\">import * as echarts from &#39;echarts/core&#39;;\nimport {\n    BarChart,\n    // The series types are defined with the SeriesOption suffix\n    BarSeriesOption,\n    LineChart,\n    LineSeriesOption\n} from &#39;echarts/charts&#39;;\nimport {\n    TitleComponent,\n    // The component types are defined with the suffix ComponentOption\n    TitleComponentOption,\n    GridComponent,\n    GridComponentOption\n} from &#39;echarts/components&#39;;\nimport {\n    CanvasRenderer\n} from &#39;echarts/renderers&#39;;\n\n// Combine an Option type with only required components and charts via ComposeOption\ntype ECOption = echarts.ComposeOption&lt;\n  BarSeriesOption | LineSeriesOption | TitleComponentOption | GridComponentOption\n&gt;;\n\n// Register the required components\necharts.use(\n    [TitleComponent, TooltipComponent, GridComponent, BarChart, CanvasRenderer]\n);\n\nvar option: ECOption = {\n    ...\n}\n</code></pre>\n"},"ECharts Basic Concepts Overview":{"type":["*"],"description":"<p>This chapter describes some of the common concepts and terms of Apache ECharts<sup>TM</sup>.</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 instance), we can create a <code class=\"codespan\">echarts instance</code> based on that element. Each <code class=\"codespan\">echarts instance</code> takes its DOM element exclusively.</p>\n<p><br></p>\n<p><img width=\"500\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/multiple-ec-instance.jpg\"></p>\n<h2 id=\"series\">Series</h2>\n<p><a href=\"option.html#series\" target=\"_blank\">series</a> is a very common term. In echarts, <a href=\"option.html#series\" target=\"_blank\">series</a> represents a series of value and the diagram generated from them. So the concept <a href=\"option.html#series\" target=\"_blank\">series</a> includes these key points: a series of value, the type of the diagram (<code class=\"codespan\">series.type</code>) and other parameters specified for the mapping from the values to a diagram.</p>\n<p>In echarts, the <code class=\"codespan\">series.type</code> and the &quot;diagram type&quot; are the same concept. <code class=\"codespan\">series.type</code> includes: <a href=\"option.html#series-line\" target=\"_blank\">line</a> (line plot), <a href=\"option.html#series-bar\" target=\"_blank\">bar</a> (bar chart), <a href=\"option.html#series-pie\" target=\"_blank\">pie</a> (pie chart), <a href=\"option.html#series-scatter\" target=\"_blank\">scatter</a> (scatter plot), <a href=\"option.html#series-graph\" target=\"_blank\">graph</a> (graph plot), <a href=\"option.html#series-tree\" target=\"_blank\">tree</a> (tree plot), etc.</p>\n<p>In the example below, there are three <a href=\"option.html#series\" target=\"_blank\">series</a> (<a href=\"option.html#series-pie\" target=\"_blank\">pie</a>, <a href=\"option.html#series-line\" target=\"_blank\">line</a>, <a href=\"option.html#series-bar\" target=\"_blank\">bar</a>) declared in the <code class=\"codespan\">option</code> on the right, where <a href=\"option.html#series.data\" target=\"_blank\">series.data</a> are declared in each series:</p>\n<p><br></p>\n<p><img width=\"700\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/series-all-a.jpg\"></p>\n<p><br></p>\n<p>Similarly, the following example shows another style of <code class=\"codespan\">option</code>, where each series retrieves data from <a href=\"option.html#dataset\" target=\"_blank\">dataset</a>:</p>\n<p><br></p>\n<p><img width=\"600\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/series-all-b.jpg\"></p>\n<h2 id=\"component\">Component</h2>\n<p>Over series, the entities in echarts are abstracted using the term &quot;component&quot;. For example, echarts includes these components: <a href=\"option.html#xAxis\" target=\"_blank\">xAxis</a> (the x axis of Cartesian coordinate system), <a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a> (the y axis of Cartesian coordinate system), <a href=\"option.html#grid\" target=\"_blank\">grid</a> (the baseboard of Cartesian coordinate system), <a href=\"option.html#angleAxis\" target=\"_blank\">angleAxis</a> (the angle axis of polar coordinate system), <a href=\"option.html#radiusAxis\" target=\"_blank\">radiusAxis</a> (the radius axis of polar coordinate system), <a href=\"option.html#polar\" target=\"_blank\">polar</a> (the baseboard of polar coordinate system), <a href=\"option.html#geo\" target=\"_blank\">geo</a> (GEO coordinate system), <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a> (the component for changing the displayed range of data), <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a> (the component for specifying the visual mapping), <a href=\"option.html#tooltip\" target=\"_blank\">tooltip</a> (the tooltip component), <a href=\"option.html#toolbox\" target=\"_blank\">toolbox</a> (the toolbox component), <a href=\"option.html#series\" target=\"_blank\">series</a>, etc.</p>\n<p>Notice that <a href=\"option.html#series\" target=\"_blank\">series</a> is a kind of component, a component for rendering diagram.</p>\n<p>Check the example below. Components (including series) are declared in <code class=\"codespan\">option</code> on the right, and the are finally rendered in the echarts instance.</p>\n<p><br></p>\n<p><img width=\"800\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/components.jpg\"></p>\n<p><br></p>\n<p>Notice: although <a href=\"option.html#series\" target=\"_blank\">series</a> is a kind of component, sometimes we can see phrases like &quot;series and components&quot;. The term &quot;component&quot; in this context actually means &quot;components except series&quot;.</p>\n<h2 id=\"define-charts-using-option\">Define charts using option</h2>\n<p>We have met the term <code class=\"codespan\">option</code> above. Users should use <code class=\"codespan\">option</code> to describe all of their requirements and input it to echarts. The requirements includes: &quot;what does the data like&quot;, &quot;what the diagram we need&quot;, &quot;what components we need&quot;, &quot;what the user interactions we need&quot;, etc. In short, <code class=\"codespan\">option</code> defines: <code class=\"codespan\">data</code>, <code class=\"codespan\">visual mapping</code>, <code class=\"codespan\">interaction</code>.</p>\n<pre><code class=\"lang-js\">// Create an echarts instance.\nvar dom = document.getElementById(&#39;dom-id&#39;);\nvar chart = echarts.init(dom);\n\n// Use option to describe `data`, `visual mapping`, `interaction`, ...\n// `option` is a big JavaScript object.\nvar option = {\n    // Each property represents a kind of components.\n    legend: {...},\n    grid: {...},\n    tooltip: {...},\n    toolbox: {...},\n    dataZoom: {...},\n    visualMap: {...},\n    // If there are more than one components in one kind, we use an array.\n    // For example, there are three x axes here.\n    xAxis: [\n        // Each item represents an instance of component.\n        // `type` is used to indicate the sub-type of the component.\n        {type: &#39;category&#39;, ...},\n        {type: &#39;category&#39;, ...},\n        {type: &#39;value&#39;, ...}\n    ],\n    yAxis: [{...}, {...}],\n    // There are multiple series, using an array.\n    series: [\n        // `type` is also used to indicate the sub-type\n        // (i.e., diagram type) of each series.\n        {type: &#39;line&#39;, data: [[&#39;AA&#39;, 332], [&#39;CC&#39;, 124], [&#39;FF&#39;, 412], ... ]},\n        {type: &#39;line&#39;, data: [2231, 1234, 552, ... ]},\n        {type: &#39;line&#39;, data: [[4, 51], [8, 12], ... ]}\n    }]\n};\n\n// Call `setOption` and input the `option`. And then the\n// echarts instance processes data and renders charts.\nchart.setOption(option);\n</code></pre>\n<p>Data is put in <a href=\"option.html#series.data\" target=\"_blank\">series.data</a> in the above example. And we give another example showing another way, where each series retrieves data from <a href=\"option.html#dataset\" target=\"_blank\">dataset</a>:</p>\n<pre><code class=\"lang-js\">var option = {\n    dataset: {\n        source: [\n            [121, &#39;XX&#39;, 442, 43.11],\n            [663, &#39;ZZ&#39;, 311, 91.14],\n            [913, &#39;ZZ&#39;, 312, 92.12],\n            ...\n        ]\n    },\n    xAxis: {},\n    yAxis: {},\n    series: [\n        // Each series retrieves data from `dataset`. The values in `encode`\n        // are the indices of the dimensions (i.e., column) of `dataset.source`.\n        {type: &#39;bar&#39;, encode: {x: 1, y: 0}},\n        {type: &#39;bar&#39;, encode: {x: 1, y: 2}},\n        {type: &#39;scatter&#39;, encode: {x: 1, y: 3}},\n        ...\n    ]\n};\n</code></pre>\n<h2 id=\"position-a-component\">Position a component</h2>\n<p>These approaches are used to Position a component.</p>\n<p><br></p>\n<p><strong>[Absolute positioning like CSS]</strong></p>\n<p><br></p>\n<p>Most components and series can be absolutely positioned according to <code class=\"codespan\">top</code> / <code class=\"codespan\">right</code> / <code class=\"codespan\">down</code> / <code class=\"codespan\">left</code> / <code class=\"codespan\">width</code> / <code class=\"codespan\">height</code>. This approach is like the absolute positioning in CSS. The absolute positioning is based on the container DOM element of the echarts.</p>\n<p>The value of each attribute can be:</p>\n<ul>\n<li>Absolute value (like <code class=\"codespan\">bottom: 54</code>, means: the distance from the boundary of the echarts container to bottom boundary of the component is <code class=\"codespan\">54</code> pixel).</li>\n<li>Or the percentage based on the width/height of the echarts container (like <code class=\"codespan\">right: &#39;20%&#39;</code>, means: the distance from the boundary of the echarts container to the right boundary of this component is <code class=\"codespan\">20%</code> of the width of the echarts container).</li>\n</ul>\n<p>Check the example below, where the <a href=\"option.html#grid\" target=\"_blank\">grid</a> component (that is the baseboard of a Cartesian coordinate system) are configured with <code class=\"codespan\">left</code>、<code class=\"codespan\">right</code>、<code class=\"codespan\">height</code>、<code class=\"codespan\">bottom</code>.</p>\n<p><br></p>\n<p><img width=\"800\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/locate.jpg\"></p>\n<p><br></p>\n<p>Note that <code class=\"codespan\">left</code> <code class=\"codespan\">right</code> <code class=\"codespan\">width</code> are one group of attributes for horizontal layout, while <code class=\"codespan\">top</code> <code class=\"codespan\">bottom</code> <code class=\"codespan\">height</code> are another group of attributes for vertical layout. The two groups have nothing to do with each other. In each group, it is enough to set only one or at most two attributes. For example, when <code class=\"codespan\">left</code> and <code class=\"codespan\">right</code> have been specified, <code class=\"codespan\">width</code> can be automatically calculated by them.</p>\n<p><br></p>\n<p><strong>[Center-radius positioning]</strong></p>\n<p><br></p>\n<p>A few circular components or series need to be positioned by &quot;center&quot; and &quot;radius&quot;. For example, <a href=\"option.html#series-pie\" target=\"_blank\">pie</a> (pie chart)、<a href=\"option.html#series-sunburst\" target=\"_blank\">sunburst</a> (sunburst chart)、<a href=\"option.html#polar\" target=\"_blank\">polar</a> (polar coordinate system).</p>\n<p>As the name implies, it position the component according to <a href=\"option.html#series-pie.center\" target=\"_blank\">center</a> and <a href=\"option.html#series-pie.radius\" target=\"_blank\">radius</a>.</p>\n<p><br></p>\n<p><strong>[Other positioning]</strong></p>\n<p><br></p>\n<p>A few other components may has their own specific positioning approach. Check their docs before using them.</p>\n<h2 id=\"coordinate-system\">Coordinate system</h2>\n<p>Many series, like <a href=\"option.html#series-line\" target=\"_blank\">line</a>, <a href=\"option.html#series-bar\" target=\"_blank\">bar</a>, <a href=\"option.html#series-scatter\" target=\"_blank\">scatter</a>, <a href=\"option.html#series-heatmap\" target=\"_blank\">heatmap</a>, etc., need to work on a coordinate system. Coordinate system is used to layout each graphic elements and display some ticks and labels. For example, echarts at least provides these coordinate systems: <a href=\"option.html#grid\" target=\"_blank\">Cartesian coordinate system</a>, <a href=\"option.html#polar\" target=\"_blank\">polar coordinate system</a>, <a href=\"option.html#geo\" target=\"_blank\">GEO coordinate system</a>, <a href=\"option.html#singleAxis\" target=\"_blank\">single axis coordinate system</a>, <a href=\"option.html#calendar\" target=\"_blank\">calendar coordinate system</a>, etc. Some other series like <a href=\"option.html#series-pie\" target=\"_blank\">pie</a>, <a href=\"option.html#series-tree\" target=\"_blank\">tree</a>, work independently without any coordinate systems. And still some other series like <a href=\"option.html#series-graph\" target=\"_blank\">graph</a> are available either independently or on some coordinate system, depending on user settings.</p>\n<p>A coordinate system may consist of several components. For example, Cartesian coordinate system consists of <a href=\"option.html#xAxis\" target=\"_blank\">xAxis</a>, <a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a> and <a href=\"option.html#grid\" target=\"_blank\">grid</a> (the baseboard). <a href=\"option.html#xAxis\" target=\"_blank\">xAxis</a> and <a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a> are referenced and assembled by <code class=\"codespan\">grid</code> and work together cooperatively.</p>\n<p>The following example demonstrates the most simple way to use a Cartesian coordinate system, where only <a href=\"option.html#xAxis\" target=\"_blank\">xAxis</a>, <a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a> and a <a href=\"option.html#series-scatter\" target=\"_blank\">scatter series</a> are declared, and <code class=\"codespan\">echarts</code> create and a <code class=\"codespan\">grid</code> implicitly to link them.</p>\n<p><br></p>\n<p><img width=\"450\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/coord-sys-0.jpg\"></p>\n<p><br></p>\n<p>And the following example demonstrates a more complicated case, where two <a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a> share one <a href=\"option.html#xAxis\" target=\"_blank\">xAxis</a>. And the two <code class=\"codespan\">series</code> are also share the <a href=\"option.html#xAxis\" target=\"_blank\">xAxis</a>, but use different <a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a> respectively. The property <a href=\"option.html#series-line.yAxisIndex\" target=\"_blank\">yAxisIndex</a> is used to specify which <a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a> is used.</p>\n<p><br></p>\n<p><img width=\"600\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/coord-sys-1.jpg\"></p>\n<p><br></p>\n<p>The following echarts instance contain more than one <a href=\"option.html#grid\" target=\"_blank\">grid</a>. Each <a href=\"option.html#grid\" target=\"_blank\">grid</a> has its own <a href=\"option.html#xAxis\" target=\"_blank\">xAxis</a> and <a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a>. The properties <a href=\"option.html#series-line.xAxisIndex\" target=\"_blank\">xAxisIndex</a>, <a href=\"option.html#series-line.yAxisIndex\" target=\"_blank\">yAxisIndex</a> and <a href=\"option.html#yAxis.gridIndex\" target=\"_blank\">gridIndex</a> are used to specify the reference relationships.</p>\n<p><br></p>\n<p><img width=\"600\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/coord-sys-2.jpg\"></p>\n<p><br></p>\n<p>Moreover, a type of series is usually available on various coordinate systems. For example, a <a href=\"option.html#series-scatter\" target=\"_blank\">scatter series</a> can work on <a href=\"option.html#grid\" target=\"_blank\">Cartesian coordinate system</a>, <a href=\"option.html#polar\" target=\"_blank\">polar coordinate system</a>, <a href=\"option.html#geo\" target=\"_blank\">GEO coordinate system</a> or other coordinate systems. Similarly, a coordinate system can serve different type of series. As the examples shown above, a <a href=\"option.html#grid\" target=\"_blank\">Cartesian coordinate system</a> serves several <a href=\"option.html#series-line\" target=\"_blank\">line series</a> and <a href=\"option.html#series-bar\" target=\"_blank\">bar series</a>.</p>\n"},"Customized Chart Styles":{"type":["*"],"description":"<p>Apache ECharts<sup>TM</sup> provides a rich amount of configurable items, which can be set in global, series, and data three different levels. Next, let&#39;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/en/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 Nightingale Rose Chart</h2>\n<p><a href=\"#Get%20Started%20with%20ECharts%20in%205%20minutes\">Getting started tutorial</a> introduced how to make a simple bar chart. This time, we are going to make a pie chart. Pie charts use arc length of fans to represent ratio of a certain series in total share. It&#39;s data format is simpler than bar chart, because it only contains one dimension without category. Besides, since it&#39;s not in rectangular system, it doesn&#39;t need <code class=\"codespan\">xAxis</code>、<code class=\"codespan\">yAxis</code> either.</p>\n<pre><code class=\"lang-js\">myChart.setOption({\n    series : [\n        {\n            name: &#39;Reference Page&#39;,\n            type: &#39;pie&#39;,\n            radius: &#39;55%&#39;,\n            data:[\n                {value:400, name:&#39;Searching Engine&#39;},\n                {value:335, name:&#39;Direct&#39;},\n                {value:310, name:&#39;Email&#39;},\n                {value:274, name:&#39;Alliance Advertisement&#39;},\n                {value:235, name:&#39;Video Advertisement&#39;}\n            ]\n        }\n    ]\n})\n</code></pre>\n<p>With the above code, we can create a simple pie chart:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/tutorial-styling-step0&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<p>Here, the value of <code class=\"codespan\">data</code> is not a single value, as that of the example in get started. Instead, it&#39;s an object containing <code class=\"codespan\">name</code> and <code class=\"codespan\">value</code>. Data in ECharts can always be a single value, or a configurable object with name, style and label. You may refer to <a href=\"option.html#series-pie.data\" target=\"_blank\">data</a> for more information.</p>\n<p><a href=\"option.html#series-pie\" target=\"_blank\">Pie charts</a> of EChart can be made into Nightingale rose charts with <a href=\"option.html#series-pie.roseType\" target=\"_blank\">roseType</a> field.</p>\n<pre><code class=\"lang-js\">roseType: &#39;angle&#39;\n</code></pre>\n<p>Nightingale rose charts use radius to represent data value.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/tutorial-styling-step1&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<h2 id=\"configuring-shadow\">Configuring Shadow</h2>\n<p>Commonly used styles of ECharts, like shadow, opacity, color, border-color, border-width, and etc., are set by <a href=\"#series-pie.itemStyle\">itemStyle</a> in series.</p>\n<pre><code class=\"lang-js\">itemStyle: {\n    // shadow size\n    shadowBlur: 200,\n    // horizontal offset of shadow\n    shadowOffsetX: 0,\n    // vertical offset of shadow\n    shadowOffsetY: 0,\n    // shadow color\n    shadowColor: &#39;rgba(0, 0, 0, 0.5)&#39;\n}\n</code></pre>\n<p>The effect after added shadow is:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/tutorial-styling-step2&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<p>Each <code class=\"codespan\">itemStyle</code> has <code class=\"codespan\">emphasis</code> as the highlighted style when mouse hovered. The last example shows the effect of adding shadow by default. But in most situations, we may probably need to add shadow to emphasis when mouse is hovered.</p>\n<pre><code class=\"lang-js\">itemStyle: {\n    emphasis: {\n        shadowBlur: 200,\n        shadowColor: &#39;rgba(0, 0, 0, 0.5)&#39;\n    }\n}\n</code></pre>\n<h2 id=\"dark-background-and-light-text\">Dark Background and Light Text</h2>\n<p>Now, we need to change the whole theme as that shown in the example at the beginning of this tutorial. This can be achieved by changing background color and text color.</p>\n<p>Background is a global configurable object, so we can set it directly with <a href=\"option.html#backgroundColor\" target=\"_blank\">backgroundColor</a> of option.</p>\n<pre><code class=\"lang-js\">setOption({\n    backgroundColor: &#39;#2c343c&#39;\n})\n</code></pre>\n<p>Text style can also be set globally in <a href=\"option.html#textStyle\" target=\"_blank\">textStyle</a>.</p>\n<pre><code class=\"lang-js\">setOption({\n    textStyle: {\n        color: &#39;rgba(255, 255, 255, 0.3)&#39;\n    }\n})\n</code></pre>\n<p>On the other hand, we can also set them in <a href=\"option.html#series-pie.label.textStyle\" target=\"_blank\">label.textStyle</a> of each series.</p>\n<pre><code class=\"lang-js\">label: {\n    textStyle: {\n        color: &#39;rgba(255, 255, 255, 0.3)&#39;\n    }\n}\n</code></pre>\n<p>We also need to set line color of pie chart to be lighter.</p>\n<pre><code class=\"lang-js\">labelLine: {\n    lineStyle: {\n        color: &#39;rgba(255, 255, 255, 0.3)&#39;\n    }\n}\n</code></pre>\n<p>Thus, we can get the following effect.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/tutorial-styling-step3&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<p>Similar to <code class=\"codespan\">itemStyle</code>, <code class=\"codespan\">label</code> and <code class=\"codespan\">labelLine</code> also have <code class=\"codespan\">emphasis</code> children.</p>\n<h2 id=\"setting-fan-colors\">Setting Fan Colors</h2>\n<p>Fan colors can be set in <code class=\"codespan\">itemStyle</code>:</p>\n<pre><code class=\"lang-js\">itemStyle: {\n    // 设置扇形的颜色\n    color: &#39;#c23531&#39;,\n    shadowBlur: 200,\n    shadowColor: &#39;rgba(0, 0, 0, 0.5)&#39;\n}\n</code></pre>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/tutorial-styling-step4&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<p>This is quite similar to our expect effect, except that fan colors should be made darker within shadow area, so as to make a sense of layering and space with blocked light.</p>\n<p>Each fan&#39;s color can be set under <code class=\"codespan\">data</code>:</p>\n<pre><code class=\"lang-js\">data: [{\n    value:400,\n    name:&#39;搜索引擎&#39;,\n    itemStyle: {\n        color: &#39;#c23531&#39;\n    }\n}, ...]\n</code></pre>\n<p>But since we only need the variation of color in this example, there&#39;s a simpler way to map data value to lightness through <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a>.</p>\n<pre><code class=\"lang-js\">visualMap: {\n    // hide visualMap component; use lightness mapping only\n    show: false,\n    // mapping with min value at 80\n    min: 80,\n    // mapping with max value at 600\n    max: 600,\n    inRange: {\n        // mapping lightness from 0 to 1\n        colorLightness: [0, 1]\n    }\n}\n</code></pre>\n<p>The final effect is:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/tutorial-styling-step5&edit=1&reset=1\" width=\"500\" height=\"400\" ></iframe>\n\n\n\n\n\n"},"Overview of Style Customization":{"type":["*"],"description":"<p>This article provides an overview of the different approaches about Apache ECharts<sup>TM</sup> style customization. For example, how to config the color, size, shadow of the graphic elements and labels.</p>\n<blockquote>\n<p>The term &quot;style&quot; 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 might be overlapped, but they are suitable for different scenarios.</p>\n<ul>\n<li>Theme</li>\n<li>Pallette</li>\n<li>Customize style explicitly (itemStyle, lineStyle, areaStyle, label, ...)</li>\n<li>Visual encoding (visualMap component)</li>\n</ul>\n<p>Other article about styling can be check in <a href=\"#Customized%20Chart%20Styles\">Customized Chart Styles</a> and <a href=\"#Visual%20Map%20of%20Data\">Visual Map of Data</a>.</p>\n<p><br></p>\n<hr>\n<p><br></p>\n<p><strong>Theme</strong></p>\n<p>Setting a theme is the simplest way to change the color style. For example, in <a href=\"https://echarts.apache.org/examples/en/index.html\" target=\"_blank\">Examples page</a>, &quot;Theme&quot; can be selected, and view the result directly.</p>\n<p>Since ECharts4, besides the original default theme, ECharts provide another two built-in themes, named &#39;<code class=\"codespan\">&#39;light&#39;</code> and <code class=\"codespan\">&#39;dark&#39;</code>. They can be used as follows:</p>\n<pre><code class=\"lang-js\">var chart = echarts.init(dom, &#39;light&#39;);\n</code></pre>\n<p>or</p>\n<pre><code class=\"lang-js\">var chart = echarts.init(dom, &#39;dark&#39;);\n</code></pre>\n<p>Other themes are not included in ECharts package by default, and need to load them ourselves if we want to use them. Themes can be visited and downloaded in <a href=\"https://echarts.apache.org/en/theme-builder.html\" target=\"_blank\">Theme Builder</a>. Theme can also be created or edited in it. The downloaded theme can be used as follows:</p>\n<p>If a theme is downloaded as a JSON file, we should register it by ourselves, for example:</p>\n<pre><code class=\"lang-js\">var xhr = new XMLHttpRequest();\n// Assume the theme name is &quot;vintage&quot;.\nxhr.open(&#39;GET&#39;, &#39;xxx/xxx/vintage.json&#39;, true);\nxhr.onload = function () {\n    var themeJSON = this.response;\n    echarts.registerTheme(&#39;vintage&#39;, JSON.parse(themeJSON))\n    var chart = echarts.init(dom, &#39;vintage&#39;);\n    // ...\n});\nxhr.send();\n</code></pre>\n<p>If a them is downloaded as a JS file, it will auto register itself:</p>\n<pre><code class=\"lang-js\">// Import the `vintage.js` file in HTML, then:\nvar chart = echarts.init(dom, &#39;vintage&#39;);\n// ...\n</code></pre>\n<p><br></p>\n<hr>\n<p><br></p>\n<p><strong>Palette</strong></p>\n<p>Pallettes can be given in option. They provide a group of colors, which will be auto picked by series and data. We can give a global palette, or exclusive pallette for certain series.</p>\n<pre><code class=\"lang-js\">option = {\n    // Global palette:\n    color: [&#39;#c23531&#39;,&#39;#2f4554&#39;, &#39;#61a0a8&#39;, &#39;#d48265&#39;, &#39;#91c7ae&#39;,&#39;#749f83&#39;,  &#39;#ca8622&#39;, &#39;#bda29a&#39;,&#39;#6e7074&#39;, &#39;#546570&#39;, &#39;#c4ccd3&#39;],\n\n    series: [{\n        type: &#39;bar&#39;,\n        // A palette only work for the series:\n        color: [&#39;#dd6b66&#39;,&#39;#759aa0&#39;,&#39;#e69d87&#39;,&#39;#8dc1a9&#39;,&#39;#ea7e53&#39;,&#39;#eedd78&#39;,&#39;#73a373&#39;,&#39;#73b9bc&#39;,&#39;#7289ab&#39;, &#39;#91ca8c&#39;,&#39;#f49f42&#39;],\n        ...\n    }, {\n        type: &#39;pie&#39;,\n        // A palette only work for the series:\n        color: [&#39;#37A2DA&#39;, &#39;#32C5E9&#39;, &#39;#67E0E3&#39;, &#39;#9FE6B8&#39;, &#39;#FFDB5C&#39;,&#39;#ff9f7f&#39;, &#39;#fb7293&#39;, &#39;#E062AE&#39;, &#39;#E690D1&#39;, &#39;#e7bcf3&#39;, &#39;#9d96f5&#39;, &#39;#8378EA&#39;, &#39;#96BFFF&#39;],\n        ...\n    }]\n}\n</code></pre>\n<p><br></p>\n<hr>\n<p><br></p>\n<p><strong>Customize style explicitly (itemStyle, lineStyle, areaStyle, label, ...)</strong></p>\n<p>It is a common way to set style explicitly. Throughout ECharts <a href=\"option.html\" target=\"_blank\">option</a>, style related options can be set in various place, including <a href=\"option.html#series.itemStyle\" target=\"_blank\">itemStyle</a>, <a href=\"option.html#series-line.lineStyle\" target=\"_blank\">lineStyle</a>, <a href=\"option.html#series-line.areaStyle\" target=\"_blank\">areaStyle</a>, <a href=\"option.html#series.label\" target=\"_blank\">label</a>, etc.</p>\n<p>Generally speaking, all of the built-in components and series follow the naming convention like <code class=\"codespan\">itemStyle</code>, <code class=\"codespan\">lineStyle</code>, <code class=\"codespan\">areaStyle</code>, <code class=\"codespan\">label</code> etc., although they may occur in different place according to different series or components.</p>\n<p>There is another article for style setting, <a href=\"#Customized%20Chart%20Styles\">Customized Chart Styles</a>.</p>\n<p><br></p>\n<hr>\n<p><br></p>\n<p><strong>Style of emphasis state</strong></p>\n<p>When mouse hovering a graphic elements, usually the emphasis style will be displayed. By default, the emphasis style is auto generated by the normal style. However they can be specified by <a href=\"option.html#series-scatter.emphasis\" target=\"_blank\">emphasis</a> property. The options in <a href=\"option.html#series-scatter.emphasis\" target=\"_blank\">emphasis</a> is the same as the ones for normal state, for example:</p>\n<pre><code class=\"lang-js\">option = {\n    series: {\n        type: &#39;scatter&#39;,\n\n        // Styles for normal state.\n        itemStyle: {\n            // Color of the point.\n            color: &#39;red&#39;\n        },\n        label: {\n            show: true,\n            // Text of labels.\n            formatter: &#39;This is a normal label.&#39;\n        },\n\n        // Styles for emphasis state.\n        emphasis: {\n            itemStyle: {\n                // Color in emphasis state.\n                color: &#39;blue&#39;\n            },\n            label: {\n                show: true,\n                // Text in emphasis.\n                formatter: &#39;This is a emphasis label.&#39;\n            }\n        }\n    }\n}\n</code></pre>\n<p>Notice: Before ECharts4, the emphasis style should be written like this:</p>\n<pre><code class=\"lang-js\">option = {\n    series: {\n        type: &#39;scatter&#39;,\n\n        itemStyle: {\n            // Styles for normal state.\n            normal: {\n                color: &#39;red&#39;\n            },\n            // Styles for emphasis state.\n            emphasis: {\n                color: &#39;blue&#39;\n            }\n        },\n\n        label: {\n            // Styles for normal state.\n            normal: {\n                show: true,\n                formatter: &#39;This is a normal label.&#39;\n            },\n            // Styles for emphasis state.\n            emphasis: {\n                show: true,\n                formatter: &#39;This is a emphasis label.&#39;\n            }\n        }\n    }\n}\n</code></pre>\n<p>The option format is still <strong>compatible</strong>, but not recommended. In fact, in most cases, users only set normal style, and use the default emphasis style. So since ECharts4, we support to write style without the &quot;normal&quot; term, which makes the option more simple and neat.</p>\n<p><br></p>\n<hr>\n<p><br></p>\n<p><strong>Visual encoding (visualMap component)</strong></p>\n<p><a href=\"option.html#visualMap\" target=\"_blank\">visualMap component</a> supports config the rule that mapping value to visual channel (color, size, ...). More details can be check in <a href=\"#Visual%20Map%20of%20Data\">Visual Map of Data</a>.</p>\n"},"Loading and Updating of Asynchronous Data":{"type":["*"],"description":"<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 Apache ECharts<sup>TM</sup> is very easy. After initialization, you can pass in data and configuration item through <code class=\"codespan\">setOption</code> after data obtained through  jQuery and other tools at any time.</p>\n<pre><code class=\"lang-js\">var myChart = echarts.init(document.getElementById(&#39;main&#39;));\n\n$.get(&#39;data.json&#39;).done(function (data) {\n    myChart.setOption({\n        title: {\n            text: &#39;asynchronous data loading example&#39;\n        },\n        tooltip: {},\n        legend: {\n            data:[&#39;Sales&#39;]\n        },\n        xAxis: {\n            data: data.categories\n        },\n        yAxis: {},\n        series: [{\n            name: &#39;Sales&#39;,\n            type: &#39;bar&#39;,\n            data: data.data\n        }]\n    });\n});\n</code></pre>\n<p>Or, you may set other styles, displaying an empty rectangular axis, and then fill in data when ready.</p>\n<pre><code class=\"lang-js\">var myChart = echarts.init(document.getElementById(&#39;main&#39;));\n// show title. legend and empty axis\nmyChart.setOption({\n    title: {\n        text: &#39;asynchronous data loading example&#39;\n    },\n    tooltip: {},\n    legend: {\n        data:[&#39;Sales&#39;]\n    },\n    xAxis: {\n        data: []\n    },\n    yAxis: {},\n    series: [{\n        name: &#39;Sales&#39;,\n        type: &#39;bar&#39;,\n        data: []\n    }]\n});\n\n// Asynchronous data loading\n$.get(&#39;data.json&#39;).done(function (data) {\n    // fill in data\n    myChart.setOption({\n        xAxis: {\n            data: data.categories\n        },\n        series: [{\n            // find series by name\n            name: &#39;Sales&#39;,\n            data: data.data\n        }]\n    });\n});\n</code></pre>\n<p>For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/tutorial-async&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<p>In ECharts, updating data need to find the corresponding series through <code class=\"codespan\">name</code>. In the above example, updating can be performed correctly according to series order if <code class=\"codespan\">name</code> is not defined. But in most cases, it is recommended to update data with series <code class=\"codespan\">name</code> information.</p>\n<h2 id=\"loading-animation\">Loading Animation</h2>\n<p>If data loading time is too long, an empty axis on the canvas may confuse users. In this case, a loading animation is needed to tell the user that it&#39;s still loading.</p>\n<p>ECharts provides a simple loading animation by default. You only need <a href=\"api.html#echartsInstance.showLoading\" target=\"_blank\">showLoading</a> to show, and then use <a href=\"api.html#echartsInstance.hideLoading\" target=\"_blank\">hideLoading</a> to hide loading animation after data loading.</p>\n<pre><code class=\"lang-js\">myChart.showLoading();\n$.get(&#39;data.json&#39;).done(function (data) {\n    myChart.hideLoading();\n    myChart.setOption(...);\n});\n</code></pre>\n<p>Effects are as followed:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/tutorial-loading&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<h2 id=\"dynamic-data-updating\">Dynamic Data Updating</h2>\n<p>ECharts is driven by data. Change of data changes the presentation of chart, therefore, implementing dynamic data updating is extremely easy.</p>\n<p>All data updating are through <a href=\"#api.html#echartsInstance.setOption\">setOption</a>. You only need to get data as you wish, fill in data to <a href=\"#api.html#echartsInstance.setOption\">setOption</a> without considering the changes brought by data, ECharts will find the difference between two group of data and present the difference through proper animation.</p>\n<blockquote>\n<p>In ECharts 3, addData in ECharts 2 is removed.If a single data needs to be added, you can first data.push(value) and then setOption.</p>\n</blockquote>\n<p>See details in the following example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/tutorial-dynamic-data&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n\n"},"Dataset":{"type":["*"],"description":"<p><code class=\"codespan\">dataset</code> component is published since Apache ECharts<sup>TM</sup> 4. <code class=\"codespan\">dataset</code> brings convenience in data management separated with styles and enables data reuse by different series. More importantly, it 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: {\n        type: &#39;category&#39;,\n        data: [&#39;Matcha Latte&#39;, &#39;Milk Tea&#39;, &#39;Cheese Cocoa&#39;, &#39;Walnut Brownie&#39;]\n    },\n    yAxis: {},\n    series: [\n        {\n            type: &#39;bar&#39;,\n            name: &#39;2015&#39;,\n            data: [89.3, 92.1, 94.4, 85.4]\n        },\n        {\n            type: &#39;bar&#39;,\n            name: &#39;2016&#39;,\n            data: [95.8, 89.4, 91.2, 76.9]\n        },\n        {\n            type: &#39;bar&#39;,\n            name: &#39;2017&#39;,\n            data: [97.7, 83.1, 92.5, 78.1]\n        }\n    ]\n}\n</code></pre>\n<p>This approach is easy to be understand and is flexible when some series needs special data definitions. But the shortcomings are also obvious: some data extra works are usually needed to split the original data to each series, and it not supports sharing data in different series, moreover, it is not good for encode.</p>\n<p>ECharts4 starts to provide <code class=\"codespan\">dataset</code> component, which brings benefits below:</p>\n<ul>\n<li>Benefit from <code class=\"codespan\">dataset</code>, we can follow the common methodology of data visualization: based on data, specify the mapping (via the option <a href=\"option.html#series.encode\" target=\"_blank\">encode</a>) from data to visual.</li>\n<li>Data can be managed and configured separately from other configurations.</li>\n<li>Data can be reused by different series and components.</li>\n<li>Support more common data format (like 2d-array, object-array), to avoid data transform works for users.</li>\n</ul>\n<h2 id=\"get-started\">Get started</h2>\n<p>This is a simplest example of <code class=\"codespan\">dataset</code>:</p>\n<pre><code class=\"lang-js\">option = {\n    legend: {},\n    tooltip: {},\n    dataset: {\n        // Provide data.\n        source: [\n            [&#39;product&#39;, &#39;2015&#39;, &#39;2016&#39;, &#39;2017&#39;],\n            [&#39;Matcha Latte&#39;, 43.3, 85.8, 93.7],\n            [&#39;Milk Tea&#39;, 83.1, 73.4, 55.1],\n            [&#39;Cheese Cocoa&#39;, 86.4, 65.2, 82.5],\n            [&#39;Walnut Brownie&#39;, 72.4, 53.9, 39.1]\n        ]\n    },\n    // Declare X axis, which is a category axis, mapping\n    // to the first column by default.\n    xAxis: {type: &#39;category&#39;},\n    // Declare Y axis, which is a value axis.\n    yAxis: {},\n    // Declare several series, each of them mapped to a\n    // column of the dataset by default.\n    series: [\n        {type: &#39;bar&#39;},\n        {type: &#39;bar&#39;},\n        {type: &#39;bar&#39;}\n    ]\n}\n</code></pre>\n<p>This is the result:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=dataset-simple0&edit=1&reset=1\" width=\"500\" height=\"300\" ></iframe>\n\n\n<p>Or the common format object-array is also supported:</p>\n<pre><code class=\"lang-js\">option = {\n    legend: {},\n    tooltip: {},\n    dataset: {\n        // Here the declared `dimensions` is mainly for providing the order of\n        // the dimensions, which enables ECharts to apply the default mapping\n        // from dimensions to axes.\n        // Alternatively, we can declare `series.encode` to specify the mapping,\n        // which will be introduced later.\n        dimensions: [&#39;product&#39;, &#39;2015&#39;, &#39;2016&#39;, &#39;2017&#39;],\n        source: [\n            {product: &#39;Matcha Latte&#39;, &#39;2015&#39;: 43.3, &#39;2016&#39;: 85.8, &#39;2017&#39;: 93.7},\n            {product: &#39;Milk Tea&#39;, &#39;2015&#39;: 83.1, &#39;2016&#39;: 73.4, &#39;2017&#39;: 55.1},\n            {product: &#39;Cheese Cocoa&#39;, &#39;2015&#39;: 86.4, &#39;2016&#39;: 65.2, &#39;2017&#39;: 82.5},\n            {product: &#39;Walnut Brownie&#39;, &#39;2015&#39;: 72.4, &#39;2016&#39;: 53.9, &#39;2017&#39;: 39.1}\n        ]\n    },\n    xAxis: {type: &#39;category&#39;},\n    yAxis: {},\n    series: [\n        {type: &#39;bar&#39;},\n        {type: &#39;bar&#39;},\n        {type: &#39;bar&#39;}\n    ]\n};\n</code></pre>\n<h2 id=\"mapping-from-data-to-graphic\">Mapping from data to graphic</h2>\n<p>In this tutorial, we make charts following this methodology: base on data, config the rule to map data to graphic, namely, encode the data to graphic.</p>\n<p>Generally, this mapping can be performed:</p>\n<ul>\n<li>Configure whether columns or rows of a dataset will mapped to series, namely, the series layout on the columns or rows of a dataset. This can be specified by <a href=\"option.html#series.seriesLayoutBy\" target=\"_blank\">series.seriesLayoutBy</a>. <code class=\"codespan\">&#39;column&#39;</code> is the default value.</li>\n<li>Configure the mapping rule from dimensions (a dimension means a column/row) to axes in coordinate system, tooltip, labels, color, symbol size, etc. This can be specified by <a href=\"option.html#series.encode\" target=\"_blank\">series.encode</a> and <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a> (if visual encoding is required). The example above does not give a mapping rule, so ECharts make default mapping by common sense: because x axis is a category axis, the first column is mapped to the x axis, and each series use each subsequent column in order.</li>\n</ul>\n<p>Let&#39;s illustrate them in detail below.</p>\n<h2 id=\"mapping-by-column-or-row\">Mapping by column or row</h2>\n<p>Giving dataset, users can configure whether columns or rows of a dataset will be mapped to series, namely, the series layout on the columns or rows of a dataset. This can be specified by <a href=\"option.html#series.seriesLayoutBy\" target=\"_blank\">series.seriesLayoutBy</a>. The optional values are:</p>\n<ul>\n<li>&#39;column&#39;: series are positioned on each columns of the dataset. Default value.</li>\n<li>&#39;row&#39;: series are positioned on each row of the dataset.</li>\n</ul>\n<p>See the example below:</p>\n<pre><code class=\"lang-js\">option = {\n    legend: {},\n    tooltip: {},\n    dataset: {\n        source: [\n            [&#39;product&#39;, &#39;2012&#39;, &#39;2013&#39;, &#39;2014&#39;, &#39;2015&#39;],\n            [&#39;Matcha Latte&#39;, 41.1, 30.4, 65.1, 53.3],\n            [&#39;Milk Tea&#39;, 86.5, 92.1, 85.7, 83.1],\n            [&#39;Cheese Cocoa&#39;, 24.1, 67.2, 79.5, 86.4]\n        ]\n    },\n    xAxis: [\n        {type: &#39;category&#39;, gridIndex: 0},\n        {type: &#39;category&#39;, gridIndex: 1}\n    ],\n    yAxis: [\n        {gridIndex: 0},\n        {gridIndex: 1}\n    ],\n    grid: [\n        {bottom: &#39;55%&#39;},\n        {top: &#39;55%&#39;}\n    ],\n    series: [\n        // These series is in the first cartesian (grid), and each\n        // is mapped to a row.\n        {type: &#39;bar&#39;, seriesLayoutBy: &#39;row&#39;},\n        {type: &#39;bar&#39;, seriesLayoutBy: &#39;row&#39;},\n        {type: &#39;bar&#39;, seriesLayoutBy: &#39;row&#39;},\n        // These series is in the second cartesian (grid), and each\n        // is mapped to a column.\n        {type: &#39;bar&#39;, xAxisIndex: 1, yAxisIndex: 1},\n        {type: &#39;bar&#39;, xAxisIndex: 1, yAxisIndex: 1},\n        {type: &#39;bar&#39;, xAxisIndex: 1, yAxisIndex: 1},\n        {type: &#39;bar&#39;, xAxisIndex: 1, yAxisIndex: 1}\n    ]\n}\n</code></pre>\n<p>This is the result:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=dataset-series-layout-by&edit=1&reset=1\" width=\"800\" height=\"600\" ></iframe>\n\n\n\n<h2 id=\"dimension\">Dimension</h2>\n<p>Before introducing <code class=\"codespan\">encode</code>, we should clarify the concept of <code class=\"codespan\">dimension</code>.</p>\n<p>Most of common charts describe data in the format of &quot;two-dimensions table&quot; (note that the meaning of the word &quot;dimension&quot; in &quot;two-dimension table&quot; is not the same as the dimensions in ECharts. \bIn order not to be confusing, we use &quot;2d-table&quot;, &quot;2d-array&quot; below). In the examples above, we use 2d-array to carry the 2d-table. When we set <code class=\"codespan\">seriesLayoutBy</code> as <code class=\"codespan\">&#39;column&#39;</code>, namely, mapping columns to series, each column is called a dimension, and each row is a data item. When we set <code class=\"codespan\">seriesLayoutBy</code> as <code class=\"codespan\">&#39;row&#39;</code>, namely, mapping rows to series, each row is called a dimension, and each column is a data item.</p>\n<p>Dimension can have its name to displayed on charts. Dimension name can be defined on the first row/column. Take the code above as an example, <code class=\"codespan\">&#39;score&#39;</code>、<code class=\"codespan\">&#39;amount&#39;</code>、<code class=\"codespan\">&#39;product&#39;</code> are dimension names, and data start from the second row. By default ECharts auto detect whether the first row/column of <code class=\"codespan\">dataset.source</code> is dimension name or data. Use can also set <code class=\"codespan\">dataset.sourceHeader</code> as <code class=\"codespan\">true</code> to mandatorily specify the first row/column is dimension name, or set as <code class=\"codespan\">false</code> to indicate the data start from the first row/column.</p>\n<p>The definitions of the dimensions can also be provided separately in <code class=\"codespan\">dataset.dimensions</code> or <code class=\"codespan\">series.dimensions</code>, where not only dimension name, but also dimension type can be specified:</p>\n<pre><code class=\"lang-js\">var option1 = {\n    dataset: {\n        dimensions: [\n            // Each item can be object or string.\n            {name: &#39;score&#39;},\n            // A string indicates the dimension name.\n            &#39;amount&#39;,\n            // Dimension type can be specified.\n            {name: &#39;product&#39;, type: &#39;ordinal&#39;}\n        ],\n        source: [...]\n    },\n    ...\n};\n\nvar option2 = {\n    dataset: {\n        source: [...]\n    },\n    series: {\n        type: &#39;line&#39;,\n        // Dimensions declared in series will be adapted with higher priority.\n        dimensions: [\n            null, // Set as null means we dont want to set dimension name.\n            &#39;amount&#39;,\n            {name: &#39;product&#39;, type: &#39;ordinal&#39;}\n        ]\n    },\n    ...\n};\n</code></pre>\n<p>Generally, we do not need to set dimensions types, because it can be auto detected based on data by ECharts. But in some cases, for example, the data is empty, the detection might not be accurate, where dimension type can be set manually.</p>\n<p>The optional values of dimension types can be:</p>\n<ul>\n<li><code class=\"codespan\">&#39;number&#39;</code>: Normal data, default value.</li>\n<li><code class=\"codespan\">&#39;ordinal&#39;</code>: Represents string data like category data or text data. ECharts will auto detect them by default. They can be set manually if the detection fail.</li>\n<li><code class=\"codespan\">&#39;time&#39;</code>: Represents time data, where it is supported that parse time string to timestamp. For example, if users need to parse &#39;2017-05-10&#39; to timestamp, it should be set as <code class=\"codespan\">time</code> type. If the dimension is used on a time axis (<a href=\"option.html#xAxis.type\" target=\"_blank\">axis.type</a> is <code class=\"codespan\">&#39;time&#39;</code>), it will be auto set to <code class=\"codespan\">time</code> type. The supported time string is listed in <a href=\"option.html#series.data\" target=\"_blank\">data</a>.</li>\n<li><code class=\"codespan\">&#39;float&#39;</code>: If set as <code class=\"codespan\">&#39;float&#39;</code>, it will be stored in <code class=\"codespan\">TypedArray</code>, which is good for performance optimization.</li>\n<li><code class=\"codespan\">&#39;int&#39;</code>: If set as <code class=\"codespan\">&#39;int&#39;</code>, it will be stored in <code class=\"codespan\">TypedArray</code>, which is good for performance optimization.</li>\n</ul>\n<h2 id=\"mapping-from-data-to-graphic-encode-\">Mapping from data to graphic (encode)</h2>\n<p>Having the concept of dimension clarified, we can use <a href=\"option.html#series.encode\" target=\"_blank\">encode</a> to map data to graphic:</p>\n<pre><code class=\"lang-js\">var option = {\n    dataset: {\n        source: [\n            [&#39;score&#39;, &#39;amount&#39;, &#39;product&#39;],\n            [89.3, 58212, &#39;Matcha Latte&#39;],\n            [57.1, 78254, &#39;Milk Tea&#39;],\n            [74.4, 41032, &#39;Cheese Cocoa&#39;],\n            [50.1, 12755, &#39;Cheese Brownie&#39;],\n            [89.7, 20145, &#39;Matcha Cocoa&#39;],\n            [68.1, 79146, &#39;Tea&#39;],\n            [19.6, 91852, &#39;Orange Juice&#39;],\n            [10.6, 101852, &#39;Lemon Juice&#39;],\n            [32.7, 20112, &#39;Walnut Brownie&#39;]\n        ]\n    },\n    xAxis: {},\n    yAxis: {type: &#39;category&#39;},\n    series: [\n        {\n            type: &#39;bar&#39;,\n            encode: {\n                // Map dimension &quot;amount&quot; to the X axis.\n                x: &#39;amount&#39;,\n                // Map dimension &quot;product&quot; to the Y axis.\n                y: &#39;product&#39;\n            }\n        }\n    ]\n};\n</code></pre>\n<p>This is the result:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/dataset-encode-simple0&edit=1&reset=1\" width=\"500\" height=\"300\" ></iframe>\n\n\n\n<p>The basic structure of <a href=\"option.html#series.encode\" target=\"_blank\">encode</a> is illustrated as follows, where the left part of colon is the name of axis like <code class=\"codespan\">&#39;x&#39;</code>, <code class=\"codespan\">&#39;y&#39;</code>, <code class=\"codespan\">&#39;radius&#39;</code>, <code class=\"codespan\">&#39;angle&#39;</code> or some special reserved names like &quot;tooltip&quot;, &quot;itemName&quot; etc., and the right part of the colon is the dimension names or dimension indices (based on 0). One or more dimensions can be specified. Usually not all of mappings need to be specified, only specify needed ones.</p>\n<p>The properties available in <code class=\"codespan\">encode</code> listed as follows:</p>\n<pre><code class=\"lang-js\">// In any of the series and coordinate systems,\n// these properties are available:\nencode: {\n    // Display dimension &quot;product&quot; and &quot;score&quot; in the tooltip.\n    tooltip: [&#39;product&#39;, &#39;score&#39;]\n    // Set the series name as the concat of the names of dimensions[1] and dimensions[3].\n    // (sometimes the dimension names are too long to type in series.name manually).\n    seriesName: [1, 3],\n    // Using dimensions[2] as the id of each data item. This is useful when dynamically\n    // update data by `chart.setOption()`, where the new and old data item can be\n    // corresponded by id, by which the appropriate animation can be performed when updating.\n    itemId: 2,\n    // Using dimensions[3] as the name of each data item. This is useful in charts like\n    // &#39;pie&#39;, &#39;funnel&#39;, where data item name can be displayed in legend.\n    itemName: 3\n}\n\n// These properties only work in cartesian(grid) coordinate system:\nencode: {\n    // Map dimensions[1], dimensions[5] and dimension &quot;score&quot; to the X axis.\n    x: [1, 5, &#39;score&#39;],\n    // Map dimensions[0] to the Y axis.\n    y: 0\n}\n\n// These properties only work in polar coordinate system:\nencode: {\n    radius: 3,\n    angle: 2,\n    ...\n}\n\n// These properties only work in geo coordinate system:\nencode: {\n    lng: 3,\n    lat: 2\n}\n\n// For some type of series that are not in any coordinate system,\n// like &#39;pie&#39;, &#39;funnel&#39; etc.:\nencode: {\n    value: 3\n}\n</code></pre>\n<p>There is an other example for <code class=\"codespan\">encode</code>:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=dataset-encode1&edit=1&reset=1\" width=\"800\" height=\"600\" ></iframe>\n\n\n\n\n\n<h2 id=\"visual-encoding-color-symbol-etc-\">Visual encoding (color, symbol, etc.)</h2>\n<p>We can use <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a> component to map data to visual channel like color, symbol size, etc.. More info about it can be checked in its <a href=\"option.html#visualMap\" target=\"_blank\">doc</a>.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=dataset-encode0&edit=1&reset=1\" width=\"500\" height=\"400\" ></iframe>\n\n\n\n\n<h2 id=\"default-encoding\">Default encoding</h2>\n<p>For some common cases (line chart, bar chart, scatter plot, candlestick, pie, funnel, etc.), EChart provides default encoding settings, by which chart will be displayed even if no <code class=\"codespan\">encode</code> option is specified. (If <code class=\"codespan\">encode</code> option is specified, default encoding will not be applied.) The rule of default encoding should not be too complicated. Basically it is:</p>\n<ul>\n<li>In coordinate system (like cartesian(grid), polar):<ul>\n<li>If category axis (i.e., axis.type is <code class=\"codespan\">&#39;category&#39;</code>) exists, map the first column/row to the axis, and each series use a following column/row.</li>\n<li>If no category axis exists, and the coordinate system contains two axis (like X Y in cartesian), each series use two columns/rows, one for a axis.</li>\n</ul>\n</li>\n<li>If no coordinate system (like pie chart):<ul>\n<li>Use the first column/row as item name, and the second column/row as item value.</li>\n</ul>\n</li>\n</ul>\n<p>If the default rule does not meet the requirements, configure the <code class=\"codespan\">encode</code> yourself please.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=dataset-default&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n\n<h2 id=\"q-a\">Q &amp; A</h2>\n<p>Q: How to map the third column to X axis, and map the fifth column to Y axis?</p>\n<p>A:</p>\n<pre><code class=\"lang-js\">series: {\n    // Notice that the dimension index is based on 0,\n    // thus the third column is dimensions[2].\n    encode: {x: 2, y: 4},\n    ...\n}\n</code></pre>\n<p>Q: How to map the third row th X axis, and map the fifth row to Y axis?</p>\n<p>A:</p>\n<pre><code class=\"lang-js\">series: {\n    encode: {x: 2, y: 4},\n    seriesLayoutBy: &#39;row&#39;,\n    ...\n}\n</code></pre>\n<p>Q: How to use the values in the second column in label.</p>\n<p>A:\nThe <a href=\"option.html#series.label.formatter\" target=\"_blank\">label.formatter</a> supports refer value in a certain dimension. For example:</p>\n<pre><code class=\"lang-js\">series: {\n    label: {\n        // `&#39;{@score}&#39;` means use the value in the &quot;score&quot; dimension.\n        // `&#39;{@[4]}&#39;` means use the value in dimensions[4].\n        formatter: &#39;aaa{@product}bbb{@score}ccc{@[4]}ddd&#39;\n    }\n}\n</code></pre>\n<p>Q: How to display the second column and the third column in tooltip?</p>\n<p>A:</p>\n<pre><code class=\"lang-js\">series: {\n    encode: {\n        tooltip: [1, 2]\n        ...\n    },\n    ...\n}\n</code></pre>\n<p>Q: If there is no dimension name in dataset.source, how to give dimension name?</p>\n<p>A:</p>\n<pre><code class=\"lang-js\">dataset: {\n    dimensions: [&#39;score&#39;, &#39;amount&#39;],\n    source: [\n        [89.3, 3371],\n        [92.1, 8123],\n        [94.4, 1954],\n        [85.4, 829]\n    ]\n}\n</code></pre>\n<p>Q: How to encode the third column in bubble size in bubble plot?</p>\n<p>A:</p>\n<pre><code class=\"lang-js\">var option = {\n    dataset: {\n        source: [\n            [12, 323, 11.2],\n            [23, 167, 8.3],\n            [81, 284, 12],\n            [91, 413, 4.1],\n            [13, 287, 13.5]\n        ]\n    },\n    // Use visualMap to perform visual encoding.\n    visualMap: {\n        show: false,\n        dimension: 2, // Encode the third column.\n        min: 2, // Min value is required in visualMap component.\n        max: 15, // Max value is required in visualMap component.\n        inRange: {\n            // The range of bubble size, from 5 pixel to 60 pixel.\n            symbolSize: [5, 60]\n        }\n    },\n    xAxis: {},\n    yAxis: {},\n    series: {\n        type: &#39;scatter&#39;\n    }\n};\n</code></pre>\n<p>Q: We have specified <code class=\"codespan\">encode</code>, but why it does not work?</p>\n<p>A: Maybe we can try to check typo, for example, the dimension name is <code class=\"codespan\">&#39;Life Expectancy&#39;</code>, be we typed <code class=\"codespan\">&#39;Life Expectency&#39;</code> in <code class=\"codespan\">encode</code> option.</p>\n<h2 id=\"various-formats-in-dataset\">Various formats in dataset</h2>\n<p>In lots of cases, data is described in 2d-table. For example, some data processing software like MS Excel, Numbers are based on 2d-table. The data can be exported as JSON format and input to <code class=\"codespan\">dataset.source</code>.</p>\n<blockquote>\n<p>Some csv tools can be used to export the table data to JSON, for example, <a href=\"https://github.com/d3/d3-dsv\" target=\"_blank\">dsv</a> or <a href=\"https://github.com/mholt/PapaParse\" target=\"_blank\">PapaParse</a>.</p>\n</blockquote>\n<p>In common used data transfer formats in JavaScript, 2d-array is a good choice to carry table data, which has been illustrated in the examples above.</p>\n<p>Besides, 2d-array, <code class=\"codespan\">dataset</code> also support key-value format as follows, which is also commonly used. But notice, the option <a href=\"option.html#series.seriesLayoutBy\" target=\"_blank\">seriesLayoutBy</a> is not supported in this format.</p>\n<pre><code class=\"lang-js\">dataset: [{\n    // Row based key-value format, namely, object array, is a commonly used format.\n    source: [\n        {product: &#39;Matcha Latte&#39;, count: 823, score: 95.8},\n        {product: &#39;Milk Tea&#39;, count: 235, score: 81.4},\n        {product: &#39;Cheese Cocoa&#39;, count: 1042, score: 91.2},\n        {product: &#39;Walnut Brownie&#39;, count: 988, score: 76.9}\n    ]\n}, {\n    // Column based key-value format is also supported.\n    source: {\n        &#39;product&#39;: [&#39;Matcha Latte&#39;, &#39;Milk Tea&#39;, &#39;Cheese Cocoa&#39;, &#39;Walnut Brownie&#39;],\n        &#39;count&#39;: [823, 235, 1042, 988],\n        &#39;score&#39;: [95.8, 81.4, 91.2, 76.9]\n    }\n}]\n</code></pre>\n<h2 id=\"multiple-datasets-and-references\">Multiple datasets and references</h2>\n<p>Multiple datasets can be defined, and series can refer them by <a href=\"option.html#series.datasetIndex\" target=\"_blank\">series.datasetIndex</a>.</p>\n<pre><code class=\"lang-js\">var option = {\n    dataset: [{\n        source: [...],\n    }, {\n        source: [...]\n    }, {\n        source: [...]\n    }],\n    series: [{\n        // Use the third dataset.\n        datasetIndex: 2\n    }, {\n        // Use the second dataset.\n        datasetIndex: 1\n    }]\n}\n</code></pre>\n<h2 id=\"data-transform\">Data transform</h2>\n<p><code class=\"codespan\">Data transform</code> has been supported since Apache ECharts<sup>TM</sup> 5. In echarts, the term <code class=\"codespan\">data transform</code> means that generate new data from user provided source data and transform functions. This feature is enable users to process data in declarative way, and provides users some common &quot;transform functions&quot; to make that kind of tasks &quot;out-of-the-box&quot;.</p>\n<p>See the details of data transform in this <a href=\"#data-transform\">doc</a>.</p>\n<h2 id=\"echarts3-data-setting-approach-series-data-can-be-used-normally\">ECharts3 data setting approach (series.data) can be used normally</h2>\n<p>The data setting approach before ECharts4 can still be used normally. If a series has declared <a href=\"option.html#series.data\" target=\"_blank\">series.data</a>, it will be used but not <code class=\"codespan\">dataset</code>.</p>\n<pre><code class=\"lang-js\">{\n    xAxis: {\n        type: &#39;category&#39;\n        data: [&#39;Matcha Latte&#39;, &#39;Milk Tea&#39;, &#39;Cheese Cocoa&#39;, &#39;Walnut Brownie&#39;]\n    },\n    yAxis: {},\n    series: [{\n        type: &#39;bar&#39;,\n        name: &#39;2015&#39;,\n        data: [89.3, 92.1, 94.4, 85.4]\n    }, {\n        type: &#39;bar&#39;,\n        name: &#39;2016&#39;,\n        data: [95.8, 89.4, 91.2, 76.9]\n    }, {\n        type: &#39;bar&#39;,\n        name: &#39;2017&#39;,\n        data: [97.7, 83.1, 92.5, 78.1]\n    }]\n}\n</code></pre>\n<p>In fact, setting data via <a href=\"option.html#series.data\" target=\"_blank\">series.data</a> is not deprecated and useful in some cases. For example, for some charts, like <a href=\"option.html#series-treemap\" target=\"_blank\">treemap</a>, <a href=\"option.html#series-graph\" target=\"_blank\">graph</a>, <a href=\"option.html#series-lines\" target=\"_blank\">lines</a>, that do not apply table data, <code class=\"codespan\">dataset</code> is not supported for yet. Moreover, for the case of large data rendering (for example, millions of data), <a href=\"api.html#echartsInstance.appendData\" target=\"_blank\">appendData</a> is probably needed to load data incrementally. <code class=\"codespan\">dataset</code> is not supported in the case.</p>\n<h2 id=\"data-transform\">Data transform</h2>\n<p>See <a href=\"#Data%20Transform\">data transform</a>.</p>\n<h2 id=\"others\">Others</h2>\n<p>Currently, not all types of series support dataset. Series that support dataset includes:</p>\n<p><code class=\"codespan\">line</code>, <code class=\"codespan\">bar</code>, <code class=\"codespan\">pie</code>, <code class=\"codespan\">scatter</code>, <code class=\"codespan\">effectScatter</code>, <code class=\"codespan\">parallel</code>, <code class=\"codespan\">candlestick</code>, <code class=\"codespan\">map</code>, <code class=\"codespan\">funnel</code>, <code class=\"codespan\">custom</code>.</p>\n<p>More types of series will support dataset in our further work.</p>\n<p>Finally, this is an example, multiple series sharing one <code class=\"codespan\">dataset</code> and having interactions:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=dataset-link&edit=1&reset=1\" width=\"800\" height=\"500\" ></iframe>\n\n\n\n\n"},"Data Transform":{"type":["*"],"description":"<p><code class=\"codespan\">Data transform</code> has been supported since Apache ECharts<sup>TM</sup> 5. In echarts, the term <code class=\"codespan\">data transform</code> means that generate new data from user provided source data and transform functions. both This feature is enable users to process data in declarative way, and provides users some common &quot;transform functions&quot; to make that kind of tasks &quot;out-of-the-box&quot;. (For consistency in the context, the noun form of the word we keep using the &quot;transform&quot; rather than &quot;transformation&quot;).</p>\n<p>The abstract formula of data transform is: <code class=\"codespan\">outData = f(inputData)</code>, where the transform function <code class=\"codespan\">f</code> can be like <code class=\"codespan\">filter</code>, <code class=\"codespan\">sort</code>, <code class=\"codespan\">regression</code>, <code class=\"codespan\">boxplot</code>, <code class=\"codespan\">cluster</code>, <code class=\"codespan\">aggregate</code>(todo) ...\nWith the help of those transform methods, users can be implements the features like:</p>\n<ul>\n<li>Partition data into multiple series.</li>\n<li>Make some statistics and visualize the result.</li>\n<li>Adapt some visualization algorithms to data and display the result.</li>\n<li>Sort data.</li>\n<li>Remove or choose some kind of empty or special datums.</li>\n<li>...</li>\n</ul>\n<h2 id=\"get-started-to-data-transform\">Get started to data transform</h2>\n<p>In echarts, data transform is implemented based on the concept of <a href=\"#dataset\">dataset</a>. A <a href=\"option.html#dataset.transform\" target=\"_blank\">dataset.transform</a> can be configured in a dataset instance to indicate that this dataset is to be generated from this <code class=\"codespan\">transform</code>. For example:</p>\n<pre><code class=\"lang-js\">var option = {\n    dataset: [{\n        // This dataset is on `datasetIndex: 0`.\n        source: [\n            [&#39;Product&#39;, &#39;Sales&#39;, &#39;Price&#39;, &#39;Year&#39;],\n            [&#39;Cake&#39;, 123, 32, 2011],\n            [&#39;Cereal&#39;, 231, 14, 2011],\n            [&#39;Tofu&#39;, 235, 5, 2011],\n            [&#39;Dumpling&#39;, 341, 25, 2011],\n            [&#39;Biscuit&#39;, 122, 29, 2011],\n            [&#39;Cake&#39;, 143, 30, 2012],\n            [&#39;Cereal&#39;, 201, 19, 2012],\n            [&#39;Tofu&#39;, 255, 7, 2012],\n            [&#39;Dumpling&#39;, 241, 27, 2012],\n            [&#39;Biscuit&#39;, 102, 34, 2012],\n            [&#39;Cake&#39;, 153, 28, 2013],\n            [&#39;Cereal&#39;, 181, 21, 2013],\n            [&#39;Tofu&#39;, 395, 4, 2013],\n            [&#39;Dumpling&#39;, 281, 31, 2013],\n            [&#39;Biscuit&#39;, 92, 39, 2013],\n            [&#39;Cake&#39;, 223, 29, 2014],\n            [&#39;Cereal&#39;, 211, 17, 2014],\n            [&#39;Tofu&#39;, 345, 3, 2014],\n            [&#39;Dumpling&#39;, 211, 35, 2014],\n            [&#39;Biscuit&#39;, 72, 24, 2014],\n        ],\n        // id: &#39;a&#39;\n    }, {\n        // This dataset is on `datasetIndex: 1`.\n        // A `transform` is configured to indicate that the\n        // final data of this dataset is transformed via this\n        // transform function.\n        transform: {\n            type: &#39;filter&#39;,\n            config: { dimension: &#39;Year&#39;, value: 2011 }\n        },\n        // There can be optional properties `fromDatasetIndex` or `fromDatasetId`\n        // to indicate that where is the input data of the transform from.\n        // For example, `fromDatasetIndex: 0` specify the input data is from\n        // the dataset on `datasetIndex: 0`, or `fromDatasetId: &#39;a&#39;` specify the\n        // input data is from the dataset having `id: &#39;a&#39;`.\n        // [DEFAULT_RULE]\n        // If both `fromDatasetIndex` and `fromDatasetId` are omitted,\n        // `fromDatasetIndex: 0` are used by default.\n    }, {\n        // This dataset is on `datasetIndex: 2`.\n        // Similarly, if neither `fromDatasetIndex` nor `fromDatasetId` is\n        // specified, `fromDatasetIndex: 0` is used by default\n        transform: {\n            // The &quot;filter&quot; transform filters and gets data items only match\n            // the given condition in property `config`.\n            type: &#39;filter&#39;,\n            // Transforms has a property `config`. In this &quot;filter&quot; transform,\n            // the `config` specify the condition that each result data item\n            // should be satisfied. In this case, this transform get all of\n            // the data items that the value on dimension &quot;Year&quot; equals to 2012.\n            config: { dimension: &#39;Year&#39;, value: 2012 }\n        }\n    }, {\n        // This dataset is on `datasetIndex: 3`\n        transform: {\n            type: &#39;filter&#39;,\n            config: { dimension: &#39;Year&#39;, value: 2013 }\n        }\n    }],\n    series: [{\n        type: &#39;pie&#39;, radius: 50, center: [&#39;25%&#39;, &#39;50%&#39;],\n        // In this case, each &quot;pie&quot; series reference to a dataset that has\n        // the result of its &quot;filter&quot; transform.\n        datasetIndex: 1\n    }, {\n        type: &#39;pie&#39;, radius: 50, center: [&#39;50%&#39;, &#39;50%&#39;],\n        datasetIndex: 2\n    }, {\n        type: &#39;pie&#39;, radius: 50, center: [&#39;75%&#39;, &#39;50%&#39;],\n        datasetIndex: 3\n    }]\n};\n</code></pre>\n<p>The case shows how we get three pies, representing the data from 2011, 2012, 2013.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=data-transform-multiple-pie&reset=1&edit=1\" width=\"800\" height=\"300\" ></iframe>\n\n\n\n<p>Let&#39;s summarize the key points of using data transform:</p>\n<ul>\n<li>Generate new data from existing declared data via the declaration of <code class=\"codespan\">transform</code>, <code class=\"codespan\">fromDatasetIndex</code>/<code class=\"codespan\">fromDatasetId</code> in some blank dataset.</li>\n<li>Series references these datasets to show the result.</li>\n</ul>\n<h2 id=\"advanced-usage\">Advanced usage</h2>\n<h4 id=\"piped-transform\">Piped transform</h4>\n<p>There is a syntactic sugar that pipe transforms like:</p>\n<pre><code class=\"lang-js\">option: {\n    dataset: [{\n        source: [ ... ] // The original data\n    }, {\n        // Declare transforms in an array to pipe multiple transforms,\n        // which makes them execute one by one and take the output of\n        // the previous transform as the input of the next transform.\n        transform: [{\n            type: &#39;filter&#39;,\n            config: { dimension: &#39;Product&#39;, value: &#39;Tofu&#39; }\n        }, {\n            type: &#39;sort&#39;,\n            config: { dimension: &#39;Year&#39;, order: &#39;desc&#39; }\n        }]\n    }],\n    series: {\n        type: &#39;pie&#39;,\n        // Display the result of the piped transform.\n        datasetIndex: 1\n    }\n}\n</code></pre>\n<blockquote>\n<p>Note: theoretically any type of transform is able to have multiple input data and multiple output data. But when a transform is piped, it is only able to take one input (except it is the first transform of the pipe) and product one output (except it is the last transform of the pipe).</p>\n</blockquote>\n<h4 id=\"output-multiple-data\">Output multiple data</h4>\n<p>In most cases, transform functions only need to produce one data. But there is indeed scenarios that a transform function needs to produce multiple data, each of whom might be used by different series.</p>\n<p>For example, in the built-in boxplot transform, besides boxplot data produced, the outlier data are also produced, which can be used in a scatter series. See the <a href=\"https://echarts.apache.org/examples/en/editor.html?c=boxplot-light-velocity&amp;edit=1&amp;reset=1\" target=\"_blank\">example</a>.</p>\n<p>We use prop <a href=\"option.html#dataset.fromTransformResult\" target=\"_blank\">dataset.fromTransformResult</a> to satisfy this requirement. For example:</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        // Original source data.\n        source: [...]\n    }, {\n        transform: {\n            type: &#39;boxplot&#39;\n        }\n        // After this &quot;boxplot transform&quot; two result data generated:\n        // result[0]: The boxplot data\n        // result[1]: The outlier data\n        // By default, when series or other dataset reference this dataset,\n        // only result[0] can be visited.\n        // If we need to visit result[1], we have to use another dataset\n        // as follows:\n    }, {\n        // This extra dataset references the dataset above, and retrieves\n        // the result[1] as its own data. Thus series or other dataset can\n        // reference this dataset to get the data from result[1].\n        fromDatasetIndex: 1,\n        fromTransformResult: 1\n    }],\n    xAxis: {\n        type: &#39;category&#39;\n    },\n    yAxis: {\n    },\n    series: [{\n        name: &#39;boxplot&#39;,\n        type: &#39;boxplot&#39;,\n        // Reference the data from result[0].\n        datasetIndex: 1\n    }, {\n        name: &#39;outlier&#39;,\n        type: &#39;scatter&#39;,\n        // Reference the data from result[1].\n        datasetIndex: 2\n    }]\n};\n</code></pre>\n<p>What more, <a href=\"option.html#dataset.fromTransformResult\" target=\"_blank\">dataset.fromTransformResult</a> and <a href=\"option.html#dataset.transform\" target=\"_blank\">dataset.transform</a> can both appear in one dataset, which means that the input of the transform is from retrieved from the upstream result specified by <code class=\"codespan\">fromTransformResult</code>. For example:</p>\n<pre><code class=\"lang-js\">{\n    fromDatasetIndex: 1,\n    fromTransformResult: 1,\n    transform: {\n        type: &#39;sort&#39;,\n        config: { dimension: 2, order: &#39;desc&#39; }\n    }\n}\n</code></pre>\n<h4 id=\"debug-in-develop-environment\">Debug in develop environment</h4>\n<p>When using data transform, we might run into the trouble that the final chart do not display correctly but we do not know where the config is wrong. There is a property <code class=\"codespan\">transform.print</code> might help in such case. (<code class=\"codespan\">transform.print</code> is only available in dev environment).</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        source: [ ... ]\n    }, {\n        transform: {\n            type: &#39;filter&#39;,\n            config: { ... }\n            // The result of this transform will be printed\n            // in dev tool via `console.log`.\n            print: true\n        }\n    }],\n    ...\n}\n</code></pre>\n<h2 id=\"the-transform-filter\">The transform &quot;filter&quot;</h2>\n<p>Transform type &quot;filter&quot; is a built-in transform that provide data filter according to specified conditions. The basic option is like:</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        source: [\n            [&#39;Product&#39;, &#39;Sales&#39;, &#39;Price&#39;, &#39;Year&#39;],\n            [&#39;Cake&#39;, 123, 32, 2011],\n            [&#39;Latte&#39;, 231, 14, 2011],\n            [&#39;Tofu&#39;, 235, 5, 2011],\n            [&#39;Milk Tee&#39;, 341, 25, 2011],\n            [&#39;Porridge&#39;, 122, 29, 2011],\n            [&#39;Cake&#39;, 143, 30, 2012],\n            [&#39;Latte&#39;, 201, 19, 2012],\n            [&#39;Tofu&#39;, 255, 7, 2012],\n            [&#39;Milk Tee&#39;, 241, 27, 2012],\n            [&#39;Porridge&#39;, 102, 34, 2012],\n            [&#39;Cake&#39;, 153, 28, 2013],\n            [&#39;Latte&#39;, 181, 21, 2013],\n            [&#39;Tofu&#39;, 395, 4, 2013],\n            [&#39;Milk Tee&#39;, 281, 31, 2013],\n            [&#39;Porridge&#39;, 92, 39, 2013],\n            [&#39;Cake&#39;, 223, 29, 2014],\n            [&#39;Latte&#39;, 211, 17, 2014],\n            [&#39;Tofu&#39;, 345, 3, 2014],\n            [&#39;Milk Tee&#39;, 211, 35, 2014],\n            [&#39;Porridge&#39;, 72, 24, 2014]\n        ]\n    }, {\n        transform: {\n            type: &#39;filter&#39;,\n            config: { dimension: &#39;Year&#39;, &#39;=&#39;: 2011 }\n            // The config is the &quot;condition&quot; of this filter.\n            // This transform traverse the source data and\n            // and retrieve all the items that the &quot;Year&quot;\n            // is `2011`.\n        }\n    }],\n    series: {\n        type: &#39;pie&#39;,\n        datasetIndex: 1\n    }\n};\n</code></pre>\n<p><br>\n<br>\nThis is another example of filter transform:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=data-transform-filter&reset=1&edit=1\" width=\"600\" height=\"350\" ></iframe>\n\n\n\n<p><strong>About dimension:</strong></p>\n<p>The <code class=\"codespan\">config.dimension</code> can be:</p>\n<ul>\n<li>Dimension name declared in dataset, like <code class=\"codespan\">config: { dimension: &#39;Year&#39;, &#39;=&#39;: 2011 }</code>. Dimension name declaration is not mandatory.</li>\n<li>Dimension index (start from 0), like <code class=\"codespan\">config: { dimension: 3, &#39;=&#39;: 2011 }</code>.</li>\n</ul>\n<p><strong>About relational operator:</strong></p>\n<p>The relational operator can be:\n<code class=\"codespan\">&gt;</code>(<code class=\"codespan\">gt</code>), <code class=\"codespan\">&gt;=</code>(<code class=\"codespan\">gte</code>), <code class=\"codespan\">&lt;</code>(<code class=\"codespan\">lt</code>), <code class=\"codespan\">&lt;=</code>(<code class=\"codespan\">lte</code>), <code class=\"codespan\">=</code>(<code class=\"codespan\">eq</code>), <code class=\"codespan\">!=</code>(<code class=\"codespan\">ne</code>, <code class=\"codespan\">&lt;&gt;</code>), <code class=\"codespan\">reg</code>. (The name in the parentheses are aliases). They follows the common semantics.\nBesides the common number comparison, there is some extra features:</p>\n<ul>\n<li>Multiple operators are able to appear in one {} item like <code class=\"codespan\">{ dimension: &#39;Price&#39;, &#39;&gt;=&#39;: 20, &#39;&lt;&#39;: 30 }</code>, which means logical &quot;and&quot; (Price &gt;= 20 and Price &lt; 30).</li>\n<li>The data value can be &quot;numeric string&quot;. Numeric string is a string that can be converted to number. Like &#39; 123 &#39;. White spaces and line breaks will be auto trimmed in the conversion.</li>\n<li>If we need to compare &quot;JS <code class=\"codespan\">Date</code> instance&quot; or date string (like &#39;2012-05-12&#39;), we need to specify <code class=\"codespan\">parser: &#39;time&#39;</code> manually, like <code class=\"codespan\">config: { dimension: 3, lt: &#39;2012-05-12&#39;, parser: &#39;time&#39; }</code>.</li>\n<li>Pure string comparison is supported but can only be used in <code class=\"codespan\">=</code>, <code class=\"codespan\">!=</code>. <code class=\"codespan\">&gt;</code>, <code class=\"codespan\">&gt;=</code>, <code class=\"codespan\">&lt;</code>, <code class=\"codespan\">&lt;=</code> do not support pure string comparison (the &quot;right value&quot; of the four operators can not be a &quot;string&quot;).</li>\n<li>The operator <code class=\"codespan\">reg</code> can be used to make regular expression test. Like using <code class=\"codespan\">{ dimension: &#39;Name&#39;, reg: /\\s+Müller\\s*$/ }</code> to select all data items that the &quot;Name&quot; dimension contains family name Müller.</li>\n</ul>\n<p><strong>About logical relationship:</strong></p>\n<p>Sometimes we also need to express logical relationship ( <code class=\"codespan\">and</code> / <code class=\"codespan\">or</code> / <code class=\"codespan\">not</code> ):</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        source: [...]\n    }, {\n        transform: {\n            type: &#39;filter&#39;,\n            config: {\n                // Use operator &quot;and&quot;.\n                // Similarly, we can also use &quot;or&quot;, &quot;not&quot; in the same place.\n                // But &quot;not&quot; should be followed with a {...} rather than `[...]`.\n                and: [\n                    { dimension: &#39;Year&#39;, &#39;=&#39;: 2011 },\n                    { dimension: &#39;Price&#39;, &#39;&gt;=&#39;: 20, &#39;&lt;&#39;: 30 }\n                ]\n            }\n            // The condition is &quot;Year&quot; is 2011 and &quot;Price&quot; is greater\n            // or equal to 20 but less than 30.\n        }\n    }],\n    series: {\n        type: &#39;pie&#39;,\n        datasetIndex: 1\n    }\n};\n</code></pre>\n<p><code class=\"codespan\">and</code>/<code class=\"codespan\">or</code>/<code class=\"codespan\">not</code> can be nested like:</p>\n<pre><code class=\"lang-js\">transform: {\n    type: &#39;filter&#39;,\n    config: {\n        or: [{\n            and: [{\n                dimension: &#39;Price&#39;, &#39;&gt;=&#39;: 10, &#39;&lt;&#39;: 20\n            }, {\n                dimension: &#39;Sales&#39;, &#39;&lt;&#39;: 100\n            }, {\n                not: { dimension: &#39;Product&#39;, &#39;=&#39;: &#39;Tofu&#39; }\n            }]\n        }, {\n            and: [{\n                dimension: &#39;Price&#39;, &#39;&gt;=&#39;: 10, &#39;&lt;&#39;: 20\n            }, {\n                dimension: &#39;Sales&#39;, &#39;&lt;&#39;: 100\n            }, {\n                not: { dimension: &#39;Product&#39;, &#39;=&#39;: &#39;Cake&#39; }\n            }]\n        }]\n    }\n}\n</code></pre>\n<p><strong>About parser:</strong></p>\n<p>Some &quot;parser&quot; can be specified when make value comparison. At present only supported:</p>\n<ul>\n<li><code class=\"codespan\">parser: &#39;time&#39;</code>: Parse the value to date time before comparing. The parser rule is the same as <code class=\"codespan\">echarts.time.parse</code>, where JS <code class=\"codespan\">Date</code> instance, timestamp number (in millisecond) and time string (like <code class=\"codespan\">&#39;2012-05-12 03:11:22&#39;</code>) are supported to be parse to timestamp number, while other value will be parsed to <code class=\"codespan\">NaN</code>.</li>\n<li><code class=\"codespan\">parser: &#39;trim&#39;</code>: Trim the string before making comparison. For non-string, return the original value.</li>\n<li><code class=\"codespan\">parser: &#39;number&#39;</code>: Force to convert the value to number before making comparison. If not possible to be converted to a meaningful number, converted to <code class=\"codespan\">NaN</code>. In most cases it is not necessary, because by default the value will be auto converted to number if possible before making comparison. But the default conversion is strict while this parser provide a loose strategy. If we meet the case that number string with unit suffix (like <code class=\"codespan\">&#39;33%&#39;</code>, <code class=\"codespan\">12px</code>), we should use <code class=\"codespan\">parser: &#39;number&#39;</code> to convert them to number before making comparison.</li>\n</ul>\n<p>This is an example to show the <code class=\"codespan\">parser: &#39;time&#39;</code>:</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        source: [\n            [&#39;Product&#39;, &#39;Sales&#39;, &#39;Price&#39;, &#39;Date&#39;],\n            [&#39;Milk Tee&#39;, 311, 21, &#39;2012-05-12&#39;],\n            [&#39;Cake&#39;, 135, 28, &#39;2012-05-22&#39;],\n            [&#39;Latte&#39;, 262, 36, &#39;2012-06-02&#39;],\n            [&#39;Milk Tee&#39;, 359, 21, &#39;2012-06-22&#39;],\n            [&#39;Cake&#39;, 121, 28, &#39;2012-07-02&#39;],\n            [&#39;Latte&#39;, 271, 36, &#39;2012-06-22&#39;],\n            ...\n        ]\n    }, {\n        transform: {\n            type: &#39;filter&#39;,\n            config: {\n                { dimension: &#39;Date&#39;, &#39;&gt;=&#39;: &#39;2012-05&#39;, &#39;&lt;&#39;: &#39;2012-06&#39;, parser: &#39;time&#39; }\n            }\n        }\n    }]\n}\n</code></pre>\n<p><strong>Formally definition:</strong></p>\n<p>Finally, we give the formally definition of the filter transform config here:</p>\n<pre><code class=\"lang-ts\">type FilterTransform = {\n    type: &#39;filter&#39;;\n    config: ConditionalExpressionOption;\n};\ntype ConditionalExpressionOption =\n    true | false | RelationalExpressionOption | LogicalExpressionOption;\ntype RelationalExpressionOption = {\n    dimension: DimensionName | DimensionIndex;\n    parser?: &#39;time&#39; | &#39;trim&#39; | &#39;number&#39;;\n    lt?: DataValue; // less than\n    lte?: DataValue; // less than or equal\n    gt?: DataValue; // greater than\n    gte?: DataValue; // greater than or equal\n    eq?: DataValue; // equal\n    ne?: DataValue; // not equal\n    &#39;&lt;&#39;?: DataValue; // lt\n    &#39;&lt;=&#39;?: DataValue; // lte\n    &#39;&gt;&#39;?: DataValue; // gt\n    &#39;&gt;=&#39;?: DataValue; // gte\n    &#39;=&#39;?: DataValue; // eq\n    &#39;!=&#39;?: DataValue; // ne\n    &#39;&lt;&gt;&#39;?: DataValue; // ne (SQL style)\n    reg?: RegExp | string; // RegExp\n};\ntype LogicalExpressionOption = {\n    and?: ConditionalExpressionOption[];\n    or?: ConditionalExpressionOption[];\n    not?: ConditionalExpressionOption;\n};\ntype DataValue = string | number | Date;\ntype DimensionName = string;\ntype DimensionIndex = number;\n</code></pre>\n<h2 id=\"the-transform-sort\">The transform &quot;sort&quot;</h2>\n<p>Another built-in transform is &quot;sort&quot;.</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        dimensions: [&#39;name&#39;, &#39;age&#39;, &#39;profession&#39;, &#39;score&#39;, &#39;date&#39;],\n        source: [\n            [&#39; Hannah Krause &#39;, 41, &#39;Engineer&#39;, 314, &#39;2011-02-12&#39;],\n            [&#39;Zhao Qian &#39;, 20, &#39;Teacher&#39;, 351, &#39;2011-03-01&#39;],\n            [&#39; Jasmin Krause &#39;, 52, &#39;Musician&#39;, 287, &#39;2011-02-14&#39;],\n            [&#39;Li Lei&#39;, 37, &#39;Teacher&#39;, 219, &#39;2011-02-18&#39;],\n            [&#39; Karle Neumann &#39;, 25, &#39;Engineer&#39;, 253, &#39;2011-04-02&#39;],\n            [&#39; Adrian Groß&#39;, 19, &#39;Teacher&#39;, null, &#39;2011-01-16&#39;],\n            [&#39;Mia Neumann&#39;, 71, &#39;Engineer&#39;, 165, &#39;2011-03-19&#39;],\n            [&#39; Böhm Fuchs&#39;, 36, &#39;Musician&#39;, 318, &#39;2011-02-24&#39;],\n            [&#39;Han Meimei &#39;, 67, &#39;Engineer&#39;, 366, &#39;2011-03-12&#39;],\n        ]\n    }, {\n        transform: {\n            type: &#39;sort&#39;,\n            // Sort by score.\n            config: { dimension: &#39;score&#39;, order: &#39;asc&#39; }\n        }\n    }],\n    series: {\n        type: &#39;bar&#39;,\n        datasetIndex: 1\n    },\n    ...\n};\n</code></pre>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=data-transform-sort-bar&reset=1&edit=1\" width=\"600\" height=\"350\" ></iframe>\n\n\n\n\n<p>Some extra features about &quot;sort transform&quot;:</p>\n<ul>\n<li>Order by multiple dimensions is supported. See examples below.</li>\n<li>The sort rule:<ul>\n<li>By default &quot;numeric&quot; (that is, number and numeric-string like <code class=\"codespan\">&#39; 123 &#39;</code>) are able to sorted by numeric order.</li>\n<li>Otherwise &quot;non-numeric-string&quot; are also able to be ordered among themselves. This might help to the case like grouping data items with the same tag, especially when multiple dimensions participated in the sort (See example below).</li>\n<li>When &quot;numeric&quot; is compared with &quot;non-numeric-string&quot;, or either of them is compared with other types of value, they are not comparable. So we call the latter one as &quot;incomparable&quot; and treat it as &quot;min value&quot; or &quot;max value&quot; according to the prop <code class=\"codespan\">incomparable: &#39;min&#39; | &#39;max&#39;</code>. This feature usually helps to decide whether to put the empty values (like <code class=\"codespan\">null</code>, <code class=\"codespan\">undefined</code>, <code class=\"codespan\">NaN</code>, <code class=\"codespan\">&#39;&#39;</code>, <code class=\"codespan\">&#39;-&#39;</code>) or other illegal values to the head or tail.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">filter: &#39;time&#39; | &#39;trim&#39; | &#39;number&#39;</code> can be used, the same as &quot;filter transform&quot;.<ul>\n<li>If intending to sort time values (JS <code class=\"codespan\">Date</code> instance or time string like <code class=\"codespan\">&#39;2012-03-12 11:13:54&#39;</code>), <code class=\"codespan\">parser: &#39;time&#39;</code> should be specified. Like <code class=\"codespan\">config: { dimension: &#39;date&#39;, order: &#39;desc&#39;, parser: &#39;time&#39; }</code></li>\n<li>If intending to sort values with unit suffix (like <code class=\"codespan\">&#39;33%&#39;</code>, <code class=\"codespan\">&#39;16px&#39;</code>), need to use <code class=\"codespan\">parser: &#39;number&#39;</code>.</li>\n</ul>\n</li>\n</ul>\n<p>See an example of multiple order:</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        dimensions: [&#39;name&#39;, &#39;age&#39;, &#39;profession&#39;, &#39;score&#39;, &#39;date&#39;],\n        source: [\n            [&#39; Hannah Krause &#39;, 41, &#39;Engineer&#39;, 314, &#39;2011-02-12&#39;],\n            [&#39;Zhao Qian &#39;, 20, &#39;Teacher&#39;, 351, &#39;2011-03-01&#39;],\n            [&#39; Jasmin Krause &#39;, 52, &#39;Musician&#39;, 287, &#39;2011-02-14&#39;],\n            [&#39;Li Lei&#39;, 37, &#39;Teacher&#39;, 219, &#39;2011-02-18&#39;],\n            [&#39; Karle Neumann &#39;, 25, &#39;Engineer&#39;, 253, &#39;2011-04-02&#39;],\n            [&#39; Adrian Groß&#39;, 19, &#39;Teacher&#39;, null, &#39;2011-01-16&#39;],\n            [&#39;Mia Neumann&#39;, 71, &#39;Engineer&#39;, 165, &#39;2011-03-19&#39;],\n            [&#39; Böhm Fuchs&#39;, 36, &#39;Musician&#39;, 318, &#39;2011-02-24&#39;],\n            [&#39;Han Meimei &#39;, 67, &#39;Engineer&#39;, 366, &#39;2011-03-12&#39;],\n        ]\n    }, {\n        transform: {\n            type: &#39;sort&#39;,\n            config: [\n                // Sort by the two dimensions.\n                { dimension: &#39;profession&#39;, order: &#39;desc&#39; },\n                { dimension: &#39;score&#39;, order: &#39;desc&#39; }\n            ]\n        }\n    }],\n    series: {\n        type: &#39;bar&#39;,\n        datasetIndex: 1\n    },\n    ...\n};\n</code></pre>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/data-transform-multiple-sort-bar&reset=1&edit=1\" width=\"600\" height=\"350\" ></iframe>\n\n\n\n<p>Finally, we give the formally definition of the sort transform config here:</p>\n<pre><code class=\"lang-ts\">type SortTransform = {\n    type: &#39;filter&#39;;\n    config: OrderExpression | OrderExpression[];\n};\ntype OrderExpression = {\n    dimension: DimensionName | DimensionIndex;\n    order: &#39;asc&#39; | &#39;desc&#39;;\n    incomparable?: &#39;min&#39; | &#39;max&#39;;\n    parser?: &#39;time&#39; | &#39;trim&#39; | &#39;number&#39;;\n};\ntype DimensionName = string;\ntype DimensionIndex = number;\n</code></pre>\n<h2 id=\"use-external-transforms\">Use external transforms</h2>\n<p>Besides built-in transforms (like &#39;filter&#39;, &#39;sort&#39;), we can also use external transforms to provide more powerful functionalities. Here we use a third-party library <a href=\"https://github.com/ecomfe/echarts-stat\" target=\"_blank\">ecStat</a> as an example:</p>\n<p>This case show how to make a regression line via ecStat:</p>\n<pre><code class=\"lang-js\">// Register the external transform at first.\necharts.registerTransform(ecStatTransform(ecStat).regression);\n</code></pre>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        source: rawData\n    }, {\n        transform: {\n            // Reference the registered external transform.\n            // Note that external transform has a namespace (like &#39;ecStat:xxx&#39;\n            // has namespace &#39;ecStat&#39;).\n            // built-in transform (like &#39;filter&#39;, &#39;sort&#39;) does not have a namespace.\n            type: &#39;ecStat:regression&#39;,\n            config: {\n                // Parameters needed by the external transform.\n                method: &#39;exponential&#39;\n            }\n        }\n    }],\n    xAxis: { type: &#39;category&#39; },\n    yAxis: {},\n    series: [{\n        name: &#39;scatter&#39;,\n        type: &#39;scatter&#39;,\n        datasetIndex: 0\n    }, {\n        name: &#39;regression&#39;,\n        type: &#39;line&#39;,\n        symbol: &#39;none&#39;,\n        datasetIndex: 1\n    }]\n};\n</code></pre>\n<p>Examples with echarts-stat:</p>\n<ul>\n<li><a href=\"https://echarts.apache.org/examples/en/editor.html?c=bar-histogram&amp;edit=1&amp;reset=1\" target=\"_blank\">Bar histogram</a></li>\n<li><a href=\"https://echarts.apache.org/examples/en/editor.html?c=scatter-clustering&amp;edit=1&amp;reset=1\" target=\"_blank\">Scatter clustering</a></li>\n<li><a href=\"https://echarts.apache.org/examples/en/editor.html?c=scatter-linear-regression&amp;edit=1&amp;reset=1\" target=\"_blank\">Scatter linear regression</a></li>\n<li><a href=\"https://echarts.apache.org/examples/en/editor.html?c=scatter-exponential-regression&amp;edit=1&amp;reset=1\" target=\"_blank\">Scatter exponential regression</a></li>\n<li><a href=\"https://echarts.apache.org/examples/en/editor.html?c=scatter-logarithmic-regression&amp;edit=1&amp;reset=1\" target=\"_blank\">Scatter logarithmic regression</a></li>\n<li><a href=\"https://echarts.apache.org/examples/en/editor.html?c=scatter-polynomial-regression&amp;edit=1&amp;reset=1\" target=\"_blank\">Scatter polynomial regression</a></li>\n</ul>\n"},"Add interaction to the chart component":{"type":["*"],"description":"<p>Apache ECharts<sup>TM</sup> 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\">datazoom component</code> <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a>、<code class=\"codespan\">dataline component</code> <a href=\"option.html#timeline\" target=\"_blank\">timeline</a></p>\n<p>Following is an example of <code class=\"codespan\">datazoom component</code> <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a> as an introduction of how to add this kind of component.</p>\n<h2 id=\"introduction-of-data-zoom-component-datazoom-\">Introduction of data zoom component (dataZoom)</h2>\n<p>Data overview by default, and detail by requirement is a basic interaction need of data visualization. <code class=\"codespan\">dataZoom</code> component can implement this function in rectangular coordinate (<a href=\"option.html#grid\" target=\"_blank\">grid</a>) and polar coordinate (<a href=\"option.html#polar\" target=\"_blank\">polar</a>.</p>\n<p><strong>For example: </strong></p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/scatter-dataZoom-all&edit=1&reset=1\" width=\"600\" height=\"400\" ></iframe>\n\n\n<p><br></p>\n<ul>\n<li><code class=\"codespan\">dataZoom</code> component operates <em>data window zoom</em> and <em>data window translation</em> on <code class=\"codespan\">axis</code>.</li>\n</ul>\n<blockquote>\n<p>Use <a href=\"option.html#dataZoom.xAxisIndex\" target=\"_blank\">dataZoom.xAxisIndex</a>, <a href=\"option.html#dataZoom.yAxisIndex\" target=\"_blank\">dataZoom.yAxisIndex</a> to specify which axis <code class=\"codespan\">dataZoom</code> controls.</p>\n</blockquote>\n<ul>\n<li><p>Multiple <code class=\"codespan\">dataZoom</code> components can exist at the same time to control function together. Components controling the same axis will be connected automatically. The example below explains in detail.</p>\n</li>\n<li><p>Operation principle of <code class=\"codespan\">dataZoom</code> achieves <em>data window zooming</em> through <em>data filtering</em>.</p>\n<p>  Different settings of data filtering modes lead to different data window zooming effects, please see: <a href=\"option.html#dataZoom.filterMode\" target=\"_blank\">dataZoom.filterMode</a>.</p>\n</li>\n<li><p>Setting of <code class=\"codespan\">dataZoom</code> data window range supports two formats currently:</p>\n<ul>\n<li><p>Percentage: see <a href=\"option.html#dataZoom.start\" target=\"_blank\">dataZoom.start</a> and <a href=\"option.html#dataZoom.end\" target=\"_blank\">dataZoom.end</a>.</p>\n</li>\n<li><p>Absolute value: see <a href=\"option.html#dataZoom.startValue\" target=\"_blank\">dataZoom.startValue</a> and <a href=\"option.html#dataZoom.endValue\" target=\"_blank\">dataZoom.endValue</a>.</p>\n</li>\n</ul>\n</li>\n</ul>\n<p><strong>dataZoom component supports several child components: </strong></p>\n<ul>\n<li><p><a href=\"option.html#dataZoom-inside\" target=\"_blank\">Inside data zoom component (dataZoomInside)</a>: inside coordinates.</p>\n</li>\n<li><p><a href=\"option.html#dataZoom-slider\" target=\"_blank\">Slider data zoom component (dataZoomSlider)</a>: has seperate slide option.</p>\n</li>\n<li><p><a href=\"option.html#toolbox.feature.dataZoom\" target=\"_blank\">Select data zoom component (dataZoomSelect)</a>: full-screen box for zoom data area. Entrance and configuration item are both in <code class=\"codespan\">toolbox</code>.</p>\n</li>\n</ul>\n<h2 id=\"adding-datazoom-component\">Adding dataZoom component</h2>\n<p>First, only add dataZoom component to x-axis. Following examples shows the code.</p>\n<pre><code class=\"lang-javascript\">\noption = {\n    xAxis: {\n        type: &#39;value&#39;\n    },\n    yAxis: {\n        type: &#39;value&#39;\n    },\n    dataZoom: [\n        {   // This dataZoom component controls x-axis by dafault\n            type: &#39;slider&#39;, // this dataZoom component is dataZoom component of slider\n            start: 10,      // the left is located at 10%\n            end: 60         // the right is located at 60%\n        }\n    ],\n    series: [\n        {\n            type: &#39;scatter&#39;, // this is scatter chart\n            itemStyle: {\n                opacity: 0.8\n            },\n            symbolSize: function (val) {\n                return val[2] * 40;\n            },\n            data: [[&quot;14.616&quot;,&quot;7.241&quot;,&quot;0.896&quot;],[&quot;3.958&quot;,&quot;5.701&quot;,&quot;0.955&quot;],[&quot;2.768&quot;,&quot;8.971&quot;,&quot;0.669&quot;],[&quot;9.051&quot;,&quot;9.710&quot;,&quot;0.171&quot;],[&quot;14.046&quot;,&quot;4.182&quot;,&quot;0.536&quot;],[&quot;12.295&quot;,&quot;1.429&quot;,&quot;0.962&quot;],[&quot;4.417&quot;,&quot;8.167&quot;,&quot;0.113&quot;],[&quot;0.492&quot;,&quot;4.771&quot;,&quot;0.785&quot;],[&quot;7.632&quot;,&quot;2.605&quot;,&quot;0.645&quot;],[&quot;14.242&quot;,&quot;5.042&quot;,&quot;0.368&quot;]]\n        }\n    ]\n}\n</code></pre>\n<p>which will show the following result:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/scatter-tutorial-dataZoom-1&edit=1&reset=1\" width=\"600\" height=\"300\" ></iframe>\n\n\n<p><br></p>\n<p>The chart above can only change window by dragging dataZoom component. If you want to drag in coordinate, or use mouse wheel (or slides with two fingers on mobile) to zoom, then another inside dataZoom component needs to be added. You can just add in the <code class=\"codespan\">option.dataZoom</code> above:</p>\n<pre><code class=\"lang-javascript\">option = {\n    ...,\n    dataZoom: [\n        {   // this dataZoom component controls x-axis by dafault\n            type: &#39;slider&#39;, // this dataZoom component is dataZoom component of slider\n            start: 10,      // the left is located at 10%\n            end: 60         // the right is located at 60%\n        },\n        {   // This dataZoom component controls x-axis by dafault\n            type: &#39;inside&#39;, // this dataZoom component is dataZoom component of inside\n            start: 10,      // the left is located at 10%\n            end: 60         // the right is located at 60%\n        }\n    ],\n    ...\n}\n</code></pre>\n<p>Following results can be seen (you can now slide or use mouse wheel to zoom in coordinate) :</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/scatter-tutorial-dataZoom-2&edit=1&reset=1\" width=\"600\" height=\"300\" ></iframe>\n\n\n\n<p><br></p>\n<p>If you want to enable zooming on y-axis, then you need to add dataZoom componet on y-axis:</p>\n<pre><code class=\"lang-javascript\">option = {\n    ...,\n    dataZoom: [\n        {\n            type: &#39;slider&#39;,\n            xAxisIndex: 0,\n            start: 10,\n            end: 60\n        },\n        {\n            type: &#39;inside&#39;,\n            xAxisIndex: 0,\n            start: 10,\n            end: 60\n        },\n        {\n            type: &#39;slider&#39;,\n            yAxisIndex: 0,\n            start: 30,\n            end: 80\n        },\n        {\n            type: &#39;inside&#39;,\n            yAxisIndex: 0,\n            start: 30,\n            end: 80\n        }\n    ],\n    ...\n}\n</code></pre>\n<p>Following result can be seen:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/scatter-tutorial-dataZoom-3&edit=1&reset=1\" width=\"600\" height=\"300\" ></iframe>\n\n\n\n\n\n\n\n\n"},"Responsive Mobile-End":{"type":["*"],"description":"<p>Apache ECharts<sup>TM</sup> 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, especially on small screens on mobile-end.</p>\n<p>Besides, sometimes one chart may need to be displayed on both PC and mobile-end, which involves the ability of ECharts inner components to be responsive with different container sizes.</p>\n<p>To solve this problem, ECharts improved component location algorithm, and implemented responsive ability similar to <a href=\"https://www.w3.org/TR/css3-mediaqueries/\" target=\"_blank\">CSS Media Query</a>.</p>\n<h2 id=\"location-and-layout-of-echarts-components\">Location and layout of ECharts components</h2>\n<p>Most <em>component</em> and <em>series</em> follow two locating methods:</p>\n<p><br>\n<strong>left/right/top/bottom/width/height locating method:</strong></p>\n<p>Each of those six parameters can be <em>absolute value</em> or <em>percentage</em> or <em>location description</em>.</p>\n<ul>\n<li><p>Absolute value</p>\n<p>  in browser pixels (px); in form of <code class=\"codespan\">number</code> (no unit); e.g.: <code class=\"codespan\">{left: 23, height: 400}</code>.</p>\n</li>\n<li><p>Percentage</p>\n<p>  to the width and height of DOM container; in form of <code class=\"codespan\">string</code>; e.g.: <code class=\"codespan\">{right: &#39;30%&#39;, bottom: &#39;40%&#39;}</code>.</p>\n</li>\n<li><p>Location Description</p>\n<ul>\n<li>can be set to <code class=\"codespan\">left: &#39;center&#39;</code>, for horizontally centering.</li>\n<li>can be set to <code class=\"codespan\">top: &#39;middle&#39;</code>, for vertically centering.</li>\n</ul>\n</li>\n</ul>\n<p>The concept of these six parameters is similar to that in CSS:</p>\n<ul>\n<li>left: distance to left border of DOM container.</li>\n<li>right: distance to right border of DOM container.</li>\n<li>top: distance to top border of DOM container.</li>\n<li>bottom: distance to bottom border of DOM container.</li>\n<li>width: width.</li>\n<li>height: height.</li>\n</ul>\n<p>Two out of the three horizontal parameters, <code class=\"codespan\">left</code>, <code class=\"codespan\">right</code>, <code class=\"codespan\">width</code>, are enough to determine the component location. For example, <code class=\"codespan\">left</code> and <code class=\"codespan\">right</code>, or <code class=\"codespan\">right</code> and <code class=\"codespan\">width</code> can both determine component location and size.\nThe same goes for vertical paramters <code class=\"codespan\">top</code>, <code class=\"codespan\">bottom</code> and <code class=\"codespan\">height</code>.</p>\n<p><br>\n<strong>Locating method of <code class=\"codespan\">center</code> / <code class=\"codespan\">radius</code>: </strong></p>\n<ul>\n<li><p><code class=\"codespan\">center</code></p>\n<p>  an array in form of <code class=\"codespan\">[x, y]</code>, in which <code class=\"codespan\">x</code> and <code class=\"codespan\">y</code> can either be <em>absolute value</em> or <em>percentage</em>, as described above.</p>\n</li>\n<li><p><code class=\"codespan\">radius</code></p>\n<p>  an array in form of <code class=\"codespan\">[innerRadius, outerRadius]</code>, in which <code class=\"codespan\">innerRadius</code> and <code class=\"codespan\">outerRadius</code> can either be <em>absolute value</em> or <em>percentage</em>, as described above.</p>\n<p>  Percentage location turns out to be very useful for responsive positioning.</p>\n</li>\n</ul>\n<p><br>\n<strong>Horizontal and vertical</strong></p>\n<p>Most of ECharts&#39;s long and narrow components (such as <code class=\"codespan\">legend</code>,<code class=\"codespan\">visualMap</code>,<code class=\"codespan\">dataZoom</code>,<code class=\"codespan\">timeline</code> and so on), provide option to set them to be horizontal or vertical. For example, long and narrow screen of mobile-end, vertical layout may be a more suitable choice, while horizontal may more suit for PC&#39;s wide screen.</p>\n<p>Setting of horizontal or vertical layout is usually with component or series&#39;s <code class=\"codespan\">orient</code> or <code class=\"codespan\">layout</code> option, which can be set to <code class=\"codespan\">&#39;horizontal&#39;</code> or <code class=\"codespan\">&#39;vertical&#39;</code>.</p>\n<p><br>\n<strong>Compatibility with ECharts2: </strong></p>\n<p>Naming of <code class=\"codespan\">x/x2/y/y2</code> in ECharts2 is still compatible, as well as the newly added <code class=\"codespan\">left/right/top/bottom</code>. But <code class=\"codespan\">left/right/top/bottom</code> is recommended.</p>\n<p>To be compatible with ECharts2, there may be settings that seems to be odd, e.g.: <code class=\"codespan\">left: &#39;right&#39;</code>, <code class=\"codespan\">left: &#39;left&#39;</code>, <code class=\"codespan\">top: &#39;bottom&#39;</code>, <code class=\"codespan\">top: &#39;top&#39;</code>, which are equal to: <code class=\"codespan\">right: 0</code>, <code class=\"codespan\">left: 0</code>, <code class=\"codespan\">bottom: 0</code>, <code class=\"codespan\">top: 0</code>, in a more normal expression.</p>\n<h2 id=\"media-query\">Media Query</h2>\n<p><a href=\"https://www.w3.org/TR/css3-mediaqueries/#media1\" target=\"_blank\">Media Query</a> provides the ability to be responsive with container size.</p>\n<p>As shown in the following example, you may drag <strong>the circle in bottom-right corner</strong> to see the legend and series change layout position and method with container size.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/pie-media&edit=1&reset=1\" width=\"750\" height=\"600\" ></iframe>\n\n\n<p>The following format should be followed if you need to set Media Query in option:</p>\n<pre><code class=\"lang-javascript\">option = {\n    // here defines baseOption\n    title: {...},\n    legend: {...},\n    series: [{...}, {...}, ...],\n    ...,\n    media: [ // each rule of media query is defined here\n        {\n            query: {...},   // write rule here\n            option: {       // write options accordingly\n                legend: {...},\n                ...\n            }\n        },\n        {\n            query: {...},   // the second rule\n            option: {       // the second option\n                legend: {...},\n                ...\n            }\n        },\n        {                   // default with no rules,\n            option: {       // when all rules fail, use this option\n                legend: {...},\n                ...\n            }\n        }\n    ]\n};\n</code></pre>\n<p>In the above example, <code class=\"codespan\">baseOption</code> and every option in <code class=\"codespan\">media</code> are all <em>simple options</em>, which are regular options containing components and series. <code class=\"codespan\">baseOption</code> is always be used, while options of every will be merged with <code class=\"codespan\">chart.mergeOption()</code> when given <code class=\"codespan\">query</code> condition is satisfied with.</p>\n<p><strong>query: </strong></p>\n<p>A <code class=\"codespan\">query</code> is in the following format:</p>\n<pre><code class=\"lang-javascript\">{\n    minWidth: 200,\n    maxHeight: 300,\n    minAspectRatio: 1.3\n}\n</code></pre>\n<p>Currently there are three supported attributes:<code class=\"codespan\">width</code>, <code class=\"codespan\">height</code>, <code class=\"codespan\">aspectRatio</code> (height / width), each of which can add <code class=\"codespan\">min</code> or <code class=\"codespan\">max</code> as prefix. E.g., <code class=\"codespan\">minWidth: 200</code> stands for when width is greater than or equal to 200px. When two attributes are written together, it means <em>and</em> in Bool logic. For example, <code class=\"codespan\">{minWidth: 200, maxHeight: 300}</code> stands for when width is greater than or equal to 200px and height is smaller than or equal to 300px.</p>\n<p><strong>option: </strong></p>\n<p>Since option in <code class=\"codespan\">media</code> is <em>simple option</em>, technically speaking, you can write every option configuration item. But usually we only write those related to layout. Take part of the above query option as example:</p>\n<pre><code class=\"lang-javascript\">media: [\n    ...,\n    {\n        query: {\n            maxAspectRatio: 1           // when length-to-width ratio is less than 1\n        },\n        option: {\n            legend: {                   // legend is placed in middle-bottom\n                right: &#39;center&#39;,\n                bottom: 0,\n                orient: &#39;horizontal&#39;    // horizontal layout of legend\n            },\n            series: [                   // left and right layout of two pie charts\n                {\n                    radius: [20, &#39;50%&#39;],\n                    center: [&#39;50%&#39;, &#39;30%&#39;]\n                },\n                {\n                    radius: [30, &#39;50%&#39;],\n                    center: [&#39;50%&#39;, &#39;70%&#39;]\n                }\n            ]\n        }\n    },\n    {\n        query: {\n            maxWidth: 500               // when container width is smaller than 500\n        },\n        option: {\n            legend: {\n                right: 10,              // legend is placed in middle-right\n                top: &#39;15%&#39;,\n                orient: &#39;vertical&#39;      // vertical layout\n            },\n            series: [                   // top and bottom layout of two pie charts\n                {\n                    radius: [20, &#39;50%&#39;],\n                    center: [&#39;50%&#39;, &#39;30%&#39;]\n                },\n                {\n                    radius: [30, &#39;50%&#39;],\n                    center: [&#39;50%&#39;, &#39;75%&#39;]\n                }\n            ]\n        }\n    },\n    ...\n]\n</code></pre>\n<p><strong>Priority when multiple queries are satisfied: </strong></p>\n<p>Attention: When multiple <code class=\"codespan\">query</code> are satisfied at the same time, all of them will be merged with <code class=\"codespan\">mergeOption</code> and those are defined later will be merged later, thus provides them with higher priority.</p>\n<p><strong>Query by default: </strong></p>\n<p>If an item in <code class=\"codespan\">media</code> has no not <code class=\"codespan\">query</code>, then it means <em>default value</em>, which will be used when all other rules fail.</p>\n<p><strong>Pay attention when container size changes:</strong></p>\n<p>In many cases, container DOM node doesn&#39;t need to change size with user dragging. Instead, it may set to several sizes on varied ends.</p>\n<p>But if the container DOM node needs to change size with dragging, you need to pay attention to this: if certain configuration item appears in one <code class=\"codespan\">query option</code>, then it should also appeared in other <code class=\"codespan\">query option</code>, or it will not be able to return to the original state. (<code class=\"codespan\">left/right/top/bottom/width/height</code> are not restricted to this rule.)</p>\n<p><strong><code class=\"codespan\">media</code> in <em>composite option</em> does not support merge</strong></p>\n<p>When <code class=\"codespan\">chart.setOption(rawOption)</code> for the second, third, fourth, fifth, and etc. times, if <code class=\"codespan\">rawOption</code> is <code class=\"codespan\">composite option</code> (which means it contains <code class=\"codespan\">media</code> list), then, the new <code class=\"codespan\">rawOption.media</code> list will not merge with the old <code class=\"codespan\">media</code>. instead, it will simply replace the option. Of course, <code class=\"codespan\">baseOption</code> will still merge with the old option normally.</p>\n<p><br>\nFinally, let&#39;s see an example combining with timeline:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/bar-media-timeline&edit=1&reset=1\" width=\"750\" height=\"700\" ></iframe>\n\n\n\n\n\n"},"Visual Map of Data":{"type":["*"],"description":"<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 Apache ECharts<sup>TM</sup> 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</code>, and <code class=\"codespan\">treemap</code> have their own built-in mapping.</p>\n<p>Besides, ECharts provides <a href=\"option.html#visualMap\" target=\"_blank\">visualMap component</a> for general visual mapping. Visual elements allowed in <code class=\"codespan\">visualMap</code> component are:<br>\n<code class=\"codespan\">symbol</code>, <code class=\"codespan\">symbolSize</code><br>\n<code class=\"codespan\">color</code>, <code class=\"codespan\">opacity</code>, <code class=\"codespan\">colorAlpha</code>, <br>\n<code class=\"codespan\">colorLightness</code>, <code class=\"codespan\">colorSaturation</code>, <code class=\"codespan\">colorHue</code></p>\n<p>Next, we are going to introduce how to use <code class=\"codespan\">visualMap</code> component.</p>\n<h2 id=\"data-and-dimension\">Data and Dimension</h2>\n<p>Data are usually stored in <a href=\"option.html#series.data\" target=\"_blank\">series.data</a> in ECharts. Depending on chart types, like list, tree, graph, and so on, the form of data may vary somehow. But they have one common feature, that they are a collection of <code class=\"codespan\">dataItem</code>s. Every data item contains data value, and other information if needed. Every data value can be a single value (one dimension) or an array (multiple dimensions).</p>\n<p>For example, <a href=\"option.html#series.data\" target=\"_blank\">series.data</a> is the most common form, which is a <code class=\"codespan\">list</code>, a common array:</p>\n<pre><code class=\"lang-javascript\">series: {\n    data: [\n        {       // every item here is a dataItem\n            value: 2323, // this is data value\n            itemStyle: {...}\n        },\n        1212,   // it can also be a value of dataItem, which is a more common case\n        2323,   // every data value here is one dimension\n        4343,\n        3434\n    ]\n}\n</code></pre>\n<pre><code class=\"lang-javascript\">series: {\n    data: [\n        {                        // every item here is a dataItem\n            value: [3434, 129,  &#39;San Marino&#39;], // this is data value\n            itemStyle: {...}\n        },\n        [1212, 5454, &#39;Vatican&#39;],   // it can also be a value of dataItem, which is a more common case\n        [2323, 3223, &#39;Nauru&#39;],     // every data value here is three dimension\n        [4343, 23,   &#39;Tuvalu&#39;]    // If is scatter chart, usually map the first dimension to x axis,\n                                 // the second dimension to y axis,\n                                 // and the third dimension to symbolSize\n    ]\n}\n</code></pre>\n<p>Usually the first one or two dimensions are used for mapping. For example, map the first dimension to x axis, and the second dimension to y axis. If you want to represent more dimensions, <code class=\"codespan\">visualMap</code> is what you need. Most likely, <a href=\"option.html#series-scatter\" target=\"_blank\">scatter charts</a> use radius to represent the third dimension.</p>\n<h2 id=\"visualmap-component\">visualMap Component</h2>\n<p>visualMap component defines the mapping from <em>which dimension of data</em> to <em>what visual elements</em>.</p>\n<p>The following two types of visualMap components are supported, identified with <a href=\"option.html#visualMap.type\" target=\"_blank\">visualMap.type</a>.</p>\n<p>Its structure is defined as:</p>\n<pre><code class=\"lang-javascript\">option = {\n    visualMap: [ // can define multiple visualMap components at the same time\n        { // the first visualMap component\n            type: &#39;continuous&#39;, // defined as continuous visualMap\n            ...\n        },\n        { // the second visualMap component\n            type: &#39;piecewise&#39;, // defined as discrete visualMap\n            ...\n        }\n    ],\n    ...\n};\n</code></pre>\n<p><a href=\"option.html#visualMap-continuous\" target=\"_blank\">visualMapContinuous</a>:</p>\n<p><a href=\"option.html#visualMap-piecewise\" target=\"_blank\">visualMapPiecewise</a>:</p>\n<p>Piecewise visual map component(visualMapPiecewise)has three types:</p>\n<ul>\n<li>Equal division of continuous data: divide equally based on <a href=\"option.html#visualMap-piecewise.splitNumber\" target=\"_blank\">visualMap-piecewise.splitNumber</a>;</li>\n<li>User-defined division of continuous data: divide with range in <a href=\"option.html#visualMap-piecewise.pieces\" target=\"_blank\">visualMap-piecewise.pieces</a>;</li>\n<li>Discrete data (data in category type): divide with <a href=\"option.html#visualMap-piecewise.categories\" target=\"_blank\">visualMap-piecewise.categories</a>.</li>\n</ul>\n<p><br>\n<strong>Configuration of visualMap mapping method</strong></p>\n<p>As we have introduced above, <code class=\"codespan\">visualMap</code> maps a certain dimension to a certain visual element, we can configure which dimension of the data (see in <a href=\"#visualMap.dimension\">visualMap.dimension</a>) to be mapped to which visual elements (see in <a href=\"option.html#visualMap.inRange\" target=\"_blank\">visualMap.inRange</a> and <a href=\"option.html#visualMap.outOfRange\" target=\"_blank\">visualMap.outOfRange</a>).</p>\n<p>Example A:</p>\n<pre><code class=\"lang-javascript\">option = {\n    visualMap: [\n        {\n            type: &#39;piecewise&#39;,\n            min: 0,\n            max: 5000,\n            dimension: 3,       // the fourth dimension of series.data, or value[3], is mapped\n            seriesIndex: 4,     // map with the fourth series\n            inRange: {          // visual configuration items in selected range\n                color: [&#39;blue&#39;, &#39;#121122&#39;, &#39;red&#39;], // defines color list of mapping\n                                                   // The largest value will be mapped to &#39;red&#39;,\n                                                   // and others will be interpolated\n                symbolSize: [30, 100]              // the smallest value will be mapped to size of 30,\n                                                   // the largest to 100,\n                                                   // and others will be interpolated\n            },\n            outOfRange: {       // visual configuration items out of selected range\n                symbolSize: [30, 100]\n            }\n        },\n        ...\n    ]\n};\n</code></pre>\n<p>Example B:</p>\n<pre><code class=\"lang-javascript\">option = {\n    visualMap: [\n        {\n            ...,\n            inRange: {          // visual configuration items in selected range\n                colorLightness: [0.2, 1], // map to lightness, which will process lightness based on original color\n                                          // original color may be selected from global color palette,\n                                          // which is not concerned by visualMap component\n                symbolSize: [30, 100]\n            },\n            ...\n        },\n        ...\n    ]\n};\n</code></pre>\n<p>For more information, please refer to <a href=\"option.html#visualMap.inRange\" target=\"_blank\">visualMap.inRange</a> and <a href=\"option.html#visualMap.outOfRange\" target=\"_blank\">visualMap.outOfRange</a>.</p>\n"},"Events and Actions in ECharts":{"type":["*"],"description":"<p>User interactions trigger corresponding events in Apache ECharts<sup>TM</sup>. 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 3 are the same as DOM event names, in lowercases. Below is an example of binding clicking operation.</p>\n<pre><code class=\"lang-js\">myChart.on(&#39;click&#39;, function (params) {\n    // printing data name in console\n    console.log(params.name);\n});\n</code></pre>\n<p>Event in ECharts can be divided in two kinds. One is mouse event, which is triggered when mouse clicks on certain component, the other is triggered with interaction components, such as triggering <a href=\"api.html#events.legendselectchanged\" target=\"_blank\">&#39;legendselectchanged&#39;</a> event when toggling legend (Notice here, that <code class=\"codespan\">&#39;legendselected&#39;</code> event will not be triggered when toggling legend), triggering <a href=\"api.html#events.legendselectchanged\" target=\"_blank\">&#39;datazoom&#39;</a> event when data zooming in some area.</p>\n<h2 id=\"mouse-events-handling\">Mouse Events Handling</h2>\n<p>ECharts support regular mouse events, which includes <code class=\"codespan\">&#39;click&#39;</code>, <code class=\"codespan\">&#39;dblclick&#39;</code>, <code class=\"codespan\">&#39;mousedown&#39;</code>, <code class=\"codespan\">&#39;mousemove&#39;</code>, <code class=\"codespan\">&#39;mouseup&#39;</code>, <code class=\"codespan\">&#39;mouseover&#39;</code>, <code class=\"codespan\">&#39;mouseout&#39;</code>, <code class=\"codespan\">&#39;globalout&#39;</code>, <code class=\"codespan\">&#39;contextmenu&#39;</code>. Next let&#39;s see an example of opening Baidu search page when clicks a bar chart.</p>\n<pre><code class=\"lang-js\">// initialize ECharts instance based on prepared dom\nvar myChart = echarts.init(document.getElementById(&#39;main&#39;));\n\n// data and configuration item of specific chart\nvar option = {\n    xAxis: {\n        data: [&quot;shirt&quot;,&quot;cardign&quot;,&quot;chiffon shirt&quot;,&quot;pants&quot;,&quot;heels&quot;,&quot;socks&quot;]\n    },\n    yAxis: {},\n    series: [{\n        name: &#39;sales&#39;,\n        type: &#39;bar&#39;,\n        data: [5, 20, 36, 10, 10, 20]\n    }]\n};\n// use specified configuration item and data to show chart\nmyChart.setOption(option);\n// handle click event and redirect to corresponding Baidu search page\nmyChart.on(&#39;click&#39;, function (params) {\n    window.open(&#39;https://www.baidu.com/s?wd=&#39; + encodeURIComponent(params.name));\n});\n</code></pre>\n<p>All types of mouse events have a common parameter called <code class=\"codespan\">params</code>, which is an object that contains data information of the clicked chart, whose format is as followed:</p>\n<pre><code class=\"lang-js\">{\n    // component name of clicked component\n    // e.g., &#39;series&#39;, &#39;markLine&#39;, &#39;markPoint&#39;, &#39;timeLine&#39;\n    componentType: string,\n    // series type (useful when componentType is &#39;series&#39;)\n    // e.g., &#39;line&#39;, &#39;bar&#39;, &#39;pie&#39;\n    seriesType: string,\n    // series index in option.series (useful when componentType is &#39;series&#39;)\n    seriesIndex: number,\n    // series name (useful when componentType is &#39;series&#39;)\n    seriesName: string,\n    // data name, or category name\n    name: string,\n    // data index in input data array\n    dataIndex: number,\n    // raw input data item\n    data: Object,\n    // Some series, such as sankey or graph, maintains both nodeData and edgeData,\n    // in which case, dataType is set to be &#39;node&#39; or &#39;edge&#39; to identify.\n    // On the other hand, most other series have only one type of data,\n    // where dataType is not needed.\n    dataType: string,\n    // input data value\n    value: number|Array\n    // color of component (useful when componentType is &#39;series&#39;)\n    color: string\n}\n</code></pre>\n<p>How to know where the mouse clicked:</p>\n<pre><code class=\"lang-js\">myChart.on(&#39;click&#39;, function (params) {\n    if (params.componentType === &#39;markPoint&#39;) {\n        // clicked on markPoint\n        if (params.seriesIndex === 5) {\n            // clicked on a markPoint which belongs to a series indexed with 5\n        }\n    }\n    else if (params.componentType === &#39;series&#39;) {\n        if (params.seriesType === &#39;graph&#39;) {\n            if (params.dataType === &#39;edge&#39;) {\n                // clicked on an edge of the graph\n            }\n            else {\n                // clicked on a node of the graph\n            }\n        }\n    }\n});\n</code></pre>\n<p>Use <code class=\"codespan\">query</code> to call handler only on the graphic elements of the specified components:</p>\n<pre><code class=\"lang-js\">chart.on(eventName, query, handler);\n</code></pre>\n<p><code class=\"codespan\">query</code> can be <code class=\"codespan\">string</code> or <code class=\"codespan\">Object</code>.</p>\n<p>If <code class=\"codespan\">string</code>, the formatter can be &#39;mainType&#39; or &#39;mainType.subType&#39;. For example:</p>\n<pre><code class=\"lang-js\">chart.on(&#39;click&#39;, &#39;series&#39;, function () {...});\nchart.on(&#39;click&#39;, &#39;series.line&#39;, function () {...});\nchart.on(&#39;click&#39;, &#39;dataZoom&#39;, function () {...});\nchart.on(&#39;click&#39;, &#39;xAxis.category&#39;, function () {...});\n</code></pre>\n<p>If <code class=\"codespan\">Object</code>, one or more properties below can be included, and any of them is optional.</p>\n<pre><code class=\"lang-js\">{\n    &lt;mainType&gt;Index: number // component index\n    &lt;mainType&gt;Name: string // component name\n    &lt;mainType&gt;Id: string // component id\n    dataIndex: number // data item index\n    name: string // data item name\n    dataType: string // data item type, e.g.,\n                     // &#39;node&#39; and &#39;edge&#39; in graph.\n    element: string // element name in custom series\n}\n</code></pre>\n<p>For example:</p>\n<pre><code class=\"lang-js\">chart.setOption({\n    // ...\n    series: [{\n        name: &#39;uuu&#39;\n        // ...\n    }]\n});\nchart.on(&#39;mouseover&#39;, {seriesName: &#39;uuu&#39;}, function () {\n    // When the graphic elements in the series with name &#39;uuu&#39; mouse overed, this method called.\n});\n</code></pre>\n<p>For example:</p>\n<pre><code class=\"lang-js\">chart.setOption({\n    // ...\n    series: [{\n        // ...\n    }, {\n        // ...\n        data: [\n            {name: &#39;xx&#39;, value: 121},\n            {name: &#39;yy&#39;, value: 33}\n        ]\n    }]\n});\nchart.on(&#39;mouseover&#39;, {seriesIndex: 1, name: &#39;xx&#39;}, function () {\n    // When the graphic elements of the data item with name &#39;xx&#39; in the series with index 1 mouse overed, this method called.\n});\n</code></pre>\n<p>For example:</p>\n<pre><code class=\"lang-js\">chart.setOption({\n    // ...\n    series: [{\n        type: &#39;graph&#39;,\n        nodes: [{name: &#39;a&#39;, value: 10}, {name: &#39;b&#39;, value: 20}],\n        edges: [{source: 0, target: 1}]\n    }]\n});\nchart.on(&#39;click&#39;, {dataType: &#39;node&#39;}, function () {\n    // When the nodes of the graph clicked, this method is called.\n});\nchart.on(&#39;click&#39;, {dataType: &#39;edge&#39;}, function () {\n    // When the edges of the graph clicked, this method is called.\n});\n</code></pre>\n<p>For example:</p>\n<pre><code class=\"lang-js\">chart.setOption({\n    // ...\n    series: {\n        // ...\n        type: &#39;custom&#39;,\n        renderItem: function (params, api) {\n            return {\n                type: &#39;group&#39;,\n                children: [{\n                    type: &#39;circle&#39;,\n                    name: &#39;my_el&#39;,\n                    // ...\n                }, {\n                    // ...\n                }]\n            }\n        },\n        data: [[12, 33]]\n    }\n})\nchart.on(&#39;click&#39;, {element: &#39;my_el&#39;}, function () {\n    // When the element with name &#39;my_el&#39; clicked, this method called.\n});\n</code></pre>\n<p>You may update chart or show customized layer with information got from your own data warehouse, indexed from data name or series name of an object received from a callback function. Sample code is shown as followed:</p>\n<pre><code class=\"lang-js\">myChart.on(&#39;click&#39;, function (parmas) {\n    $.get(&#39;detail?q=&#39; + params.name, function (detail) {\n        myChart.setOption({\n            series: [{\n                name: &#39;pie&#39;,\n                // present data distribution  of a single bar through pie chart\n                data: [detail.data]\n            }]\n        });\n    });\n});\n</code></pre>\n<h2 id=\"interaction-events-with-components\">Interaction Events with Components</h2>\n<p>Basically all component interactions in ECharts trigger corresponding events. Frequently used events and corresponding parameters are listed in <a href=\"api.html#events\" target=\"_blank\">events</a>.</p>\n<p>Below is example that listens to a legend toggling:</p>\n<pre><code class=\"lang-js\">// legend toggling triggers legendselectchanged event only\nmyChart.on(&#39;legendselectchanged&#39;, function (params) {\n    // obtain selecting status of clicked legend\n    var isSelected = params.selected[params.name];\n    // print in console\n    console.log((isSelected ? &#39;select&#39; : &#39;unselect&#39;) + &#39;legend&#39; + params.name);\n    // print all legend status\n    console.log(params.selected);\n});\n</code></pre>\n<h2 id=\"triggering-component-actions-through-code-in-echarts\">Triggering Component Actions through Code in ECharts</h2>\n<p>Actions like <code class=\"codespan\">&#39;legendselectchanged&#39;</code> mentioned above will be triggered by component interaction. Besides that, sometimes we need to trigger certain actions in our program, such as showing tooltip, or selecting legend.</p>\n<p>ECharts 2.x triggers actions through <code class=\"codespan\">myChart.component.tooltip.showTip</code>, whose entrance is deep and involves organization of inner components. On the other hand, ECharts 3 triggers actions through <code class=\"codespan\">myChart.dispatchAction({ type: &#39;&#39; })</code>, which manages all actions in a uniformed way, and may record user&#39;s event path when need.</p>\n<p>Frequently used actions and the parameters are listed in <a href=\"api.html#action\" target=\"_blank\">action</a>.</p>\n<p>Below displays how to highlight each sector of pie chart in turn through <code class=\"codespan\">dispatchAction</code>.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/pie-highlight&edit=1&reset=1\" width=\"600\" height=\"400\" ></iframe>\n\n\n\n<h2 id=\"listen-to-events-from-the-blank\">Listen to events from the blank</h2>\n<p>Sometimes developers need to listen to the events that are triggered from the blank of the canvas. For example, need to reset the chart when users click on the blank.</p>\n<p>Before we talk about this feature, we need to clarify two kinds of events: <code class=\"codespan\">zrender events</code> and <code class=\"codespan\">echarts events</code>.</p>\n<pre><code class=\"lang-js\">myChart.getZr().on(&#39;click&#39;, function (event) {\n    // This listener is listening to a `zrender event`.\n});\nmyChart.on(&#39;click&#39;, function (event) {\n    // This listener is listening to a `echarts event`.\n});\n</code></pre>\n<p><code class=\"codespan\">zrender events</code> are different from <code class=\"codespan\">echarts events</code>. The former one are triggered when mouse/pointer is at everywhere, while the latter one can only be triggered when mouse/pointer is at the graphic elements. In fact, <code class=\"codespan\">echarts events</code> are implemented based on <code class=\"codespan\">zrender events</code>, that is, when a <code class=\"codespan\">zrender events</code> is triggered at a graphic element, <code class=\"codespan\">echarts</code> will trigger a <code class=\"codespan\">echarts event</code>.</p>\n<p>Having <code class=\"codespan\">zrender events</code>, we can implement &quot;listen to events from the blank&quot; as follows:</p>\n<pre><code class=\"lang-js\">myChart.getZr().on(&#39;click&#39;, function (event) {\n    // No &quot;target&quot; means that mouse/pointer is not on\n    // any of the graphic elements, which is &quot;blank&quot;.\n    if (!event.target) {\n        // Click on blank. Do something.\n    }\n});\n</code></pre>\n"},"Bar Race":{"type":["*"],"description":"<p>Bar race is a chart that shows changes in the ranking of data over time and it is supported by default sinde ECharts 5.</p>\n<blockquote>\n<p>Bar race charts usually use horizontal bars. If you want to use vertical bars, just take the X axis and Y axis in this tutorial to the opposite.</p>\n</blockquote>\n<ol>\n<li>Set <code class=\"codespan\">yAxis.realtimeSort</code> to be <code class=\"codespan\">true</code> to enable bar race</li>\n<li>Set <code class=\"codespan\">yAxis.inverse</code> to be <code class=\"codespan\">true</code> to display longer bars at top</li>\n<li><code class=\"codespan\">yAxis.animationDuration</code> is suggested to be set to be <code class=\"codespan\">300</code> for bar reordering animation for the first time</li>\n<li><code class=\"codespan\">yAxis.animationDurationUpdate</code> is suggested to be set to be <code class=\"codespan\">300</code> for bar reordering animation for later times</li>\n<li>Set <code class=\"codespan\">yAxis.max</code> to be <em>n - 1</em> where <em>n</em> is the number of bars to be displayed; otherwise, all bars are displayed</li>\n<li><code class=\"codespan\">xAxis.max</code> is suggested to be set to be <code class=\"codespan\">&#39;dataMax&#39;</code> so that the maximum of data is used as X maximum.</li>\n<li>If realtime label changing is required, set <code class=\"codespan\">series.label.valueAnimation</code> to be <code class=\"codespan\">true</code></li>\n<li>Set <code class=\"codespan\">animationDuration</code> to be <code class=\"codespan\">0</code> so that the first animation doesn&#39;t start from 0; if you wish otherwise, set it to be the same value as <code class=\"codespan\">animationDurationUpdate</code></li>\n<li><code class=\"codespan\">animationDurationUpdate</code> is suggested to be set to be <code class=\"codespan\">3000</code> for animation update duration, which should be the same as the frequency of calling <code class=\"codespan\">setOption</code></li>\n<li>Call <code class=\"codespan\">setOption</code> to update data to be of next time with <code class=\"codespan\">setInterval</code> at the frequency of <code class=\"codespan\">animationDurationUpdate</code></li>\n</ol>\n<p>A full example is:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=bar-race&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n<p>As you see, there are many options to be set to enable bar race effect. We are going to provide a tool that doesn&#39;t require any coding to help you make bar race charts more easily.</p>\n"},"An Example: Implement Dragging":{"type":["*"],"description":"<p>This is a tiny example, introducing how to implement dragging of graphic elements in Apache ECharts<sup>TM</sup>. 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/en/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. Although it is simple example, but we can do more based on that, like edit charts viually. So let&#39;s get started from this simple example.</p>\n<h2 id=\"-part-1-implement-basic-dragging\">[ Part 1 ] Implement basic dragging</h2>\n<p>First of all, we create a basic <a href=\"option.html#series-line\" target=\"_blank\">line chart (line series)</a>:</p>\n<pre><code class=\"lang-js\">var symbolSize = 20;\nvar data = [[15, 0], [-50, 10], [-56.5, 20], [-46.5, 30], [-22.1, 40]];\n\nmyChart.setOption({\n    xAxis: {\n        min: -100,\n        max: 80,\n        type: &#39;value&#39;,\n        axisLine: {onZero: false}\n    },\n    yAxis: {\n        min: -30,\n        max: 60,\n        type: &#39;value&#39;,\n        axisLine: {onZero: false}\n    },\n    series: [\n        {\n            id: &#39;a&#39;,\n            type: &#39;line&#39;,\n            smooth: true,\n            // Set a big symbolSize for dragging convenience.\n            symbolSize: symbolSize,\n            data: data\n        }\n    ]\n});\n</code></pre>\n<p>Since the symbols in line is not draggable, we make them draggable by using <a href=\"option.html#graphic\" target=\"_blank\">graphic component</a> to add draggable circular elements to symbols respectively.</p>\n<pre><code class=\"lang-js\">myChart.setOption({\n    // Declare a graphic component, which contains some graphic elements\n    // with the type of &#39;circle&#39;.\n    // Here we have used the method `echarts.util.map`, which has the same\n    // behavior as Array.prototype.map, and is compatible with ES5-.\n    graphic: echarts.util.map(data, function (dataItem, dataIndex) {\n        return {\n            // &#39;circle&#39; means this graphic element is a shape of circle.\n            type: &#39;circle&#39;,\n\n            shape: {\n                // The radius of the circle.\n                r: symbolSize / 2\n            },\n            // Transform is used to located the circle. position:\n            // [x, y] means translate the circle to the position [x, y].\n            // The API `convertToPixel` is used to get the position of\n            // the circle, which will introduced later.\n            position: myChart.convertToPixel(&#39;grid&#39;, dataItem),\n\n            // Make the circle invisible (but mouse event works as normal).\n            invisible: true,\n            // Make the circle draggable.\n            draggable: true,\n            // Give a big z value, which makes the circle cover the symbol\n            // in line series.\n            z: 100,\n            // This is the event handler of dragging, which will be triggered\n            // repeatly while dragging. See more details below.\n            // A util method `echarts.util.curry` is used here to generate a\n            // new function the same as `onPointDragging`, except that the\n            // first parameter is fixed to be the `dataIndex` here.\n            ondrag: echarts.util.curry(onPointDragging, dataIndex)\n        };\n    })\n});\n</code></pre>\n<p>In the code above, API <a href=\"api.html#echartsInstance.convertToPixel\" target=\"_blank\">convertToPixel</a> is used to convert data to its &quot;pixel coodinate&quot;, based on which each graphic elements can be rendered on canvas. The term &quot;pixel coodinate&quot; means the coordinate is in canvas pixel, whose origin is the top-left of the canvas. In the sentence <code class=\"codespan\">myChart.convertToPixel(&#39;grid&#39;, dataItem)</code>, the first parameter <code class=\"codespan\">&#39;grid&#39;</code> indicates that <code class=\"codespan\">dataItem</code> should be converted in the first <a href=\"option.html#grid\" target=\"_blank\">grid component (cartesian)</a>.</p>\n<p><strong>Notice:</strong> <code class=\"codespan\">convertToPixel</code> should not be called before the first time that <code class=\"codespan\">setOption</code> called. Namely, it can only be used after coordinate systems (grid/polar/...) initialized.</p>\n<p>Now points have been made draggable. Then we will bind event listeners on dragging to those points.</p>\n<pre><code class=\"lang-js\">// This function will be called repeatly while dragging.\n// The mission of this function is to update `series.data` based on\n// the new points updated by dragging, and to re-render the line\n// series based on the new data, by which the graphic elements of the\n// line series can be synchronized with dragging.\nfunction onPointDragging(dataIndex) {\n    // Here the `data` is declared in the code block in the beginning\n    // of this article. The `this` refers to the dragged circle.\n    // `this.position` is the current position of the circle.\n    data[dataIndex] = myChart.convertFromPixel(&#39;grid&#39;, this.position);\n    // Re-render the chart based on the updated `data`.\n    myChart.setOption({\n        series: [{\n            id: &#39;a&#39;,\n            data: data\n        }]\n    });\n}\n</code></pre>\n<p>In the code above, API <a href=\"api.html#echartsInstance.convertFromPixel\" target=\"_blank\">convertFromPixel</a> is used, which is the reversed process of <a href=\"api.html#echartsInstance.convertToPixel\" target=\"_blank\">convertToPixel</a>. <code class=\"codespan\">myChart.convertFromPixel(&#39;grid&#39;, this.position)</code> converts a pixel coordinate to data item in <a href=\"option.html#grid\" target=\"_blank\">grid (cartesian)</a>.</p>\n<p>Finally, add those code to make graphic elements responsive to change of canvas size.</p>\n<pre><code class=\"lang-js\">window.addEventListener(&#39;resize&#39;, function () {\n    // Re-calculate the position of each circle and update chart using `setOption`.\n    myChart.setOption({\n        graphic: echarts.util.map(data, function (item, dataIndex) {\n            return {\n                position: myChart.convertToPixel(&#39;grid&#39;, item)\n            };\n        })\n    });\n});\n\n</code></pre>\n<h2 id=\"-part-2-add-tooltip-component\">[ Part 2 ] Add tooltip component</h2>\n<p>Now basic functionality have been implemented by parte 1. If we need the data can be displayed realtime when dragging, we can use <a href=\"option.html#tooltip\" target=\"_blank\">tooltip component</a> to do that. Nevertheless, tooltip component has its default &quot;show/hide rule&quot;, which is not applicable in this case. So we need to customize the &quot;show/hide rule&quot; for our case.</p>\n<p>Add these snippets to the code block above:</p>\n<pre><code class=\"lang-js\">myChart.setOption({\n    ...,\n    tooltip: {\n        // Means disable default &quot;show/hide rule&quot;.\n        triggerOn: &#39;none&#39;,\n        formatter: function (params) {\n            return &#39;X: &#39; + params.data[0].toFixed(2) + &#39;&lt;br&gt;Y: &#39; + params.data[1].toFixed(2);\n        }\n    }\n});\n</code></pre>\n<pre><code class=\"lang-js\">myChart.setOption({\n    graphic: echarts.util.map(data, function (item, dataIndex) {\n        return {\n            type: &#39;circle&#39;,\n            ...,\n            // Customize &quot;show/hide rule&quot;, show when mouse over, hide when mouse out.\n            onmousemove: echarts.util.curry(showTooltip, dataIndex),\n            onmouseout: echarts.util.curry(hideTooltip, dataIndex),\n        };\n    })\n});\n\nfunction showTooltip(dataIndex) {\n    myChart.dispatchAction({\n        type: &#39;showTip&#39;,\n        seriesIndex: 0,\n        dataIndex: dataIndex\n    });\n}\n\nfunction hideTooltip(dataIndex) {\n    myChart.dispatchAction({\n        type: &#39;hideTip&#39;\n    });\n}\n</code></pre>\n<p>The API <a href=\"api.html#echartsInstance.dispatchAction\" target=\"_blank\">dispatchAction</a> is used to show/hide tooltip content, where actions <a href=\"api.html#action.tooltip.showTip\" target=\"_blank\">showTip</a> and <a href=\"api.html#action.tooltip.hideTip\" target=\"_blank\">hideTip</a> is dispatched.</p>\n<h2 id=\"-part-3-full-code\">[ Part 3 ] Full code</h2>\n<p>Full code is shown as follow:</p>\n<pre><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n    &lt;meta charset=&quot;utf-8&quot;&gt;\n    &lt;script src=&quot;dist/echarts.min.js&quot;&gt;&lt;/script&gt;\n&lt;/head&gt;\n&lt;body&gt;\n    &lt;div id=&quot;main&quot; style=&quot;width: 600px;height:400px;&quot;&gt;&lt;/div&gt;\n    &lt;script type=&quot;text/javascript&quot;&gt;\n\n    var symbolSize = 20;\n    var data = [[15, 0], [-50, 10], [-56.5, 20], [-46.5, 30], [-22.1, 40]];\n\n    var myChart = echarts.init(document.getElementById(&#39;main&#39;));\n\n    myChart.setOption({\n        tooltip: {\n            triggerOn: &#39;none&#39;,\n            formatter: function (params) {\n                return &#39;X: &#39; + params.data[0].toFixed(2) + &#39;&lt;br&gt;Y: &#39; + params.data[1].toFixed(2);\n            }\n        },\n        xAxis: {\n            min: -100,\n            max: 80,\n            type: &#39;value&#39;,\n            axisLine: {onZero: false}\n        },\n        yAxis: {\n            min: -30,\n            max: 60,\n            type: &#39;value&#39;,\n            axisLine: {onZero: false}\n        },\n        series: [\n            {\n                id: &#39;a&#39;,\n                type: &#39;line&#39;,\n                smooth: true,\n                symbolSize: symbolSize,\n                data: data\n            }\n        ],\n    });\n\n    myChart.setOption({\n        graphic: echarts.util.map(data, function (item, dataIndex) {\n            return {\n                type: &#39;circle&#39;,\n                position: myChart.convertToPixel(&#39;grid&#39;, item),\n                shape: {\n                    r: symbolSize / 2\n                },\n                invisible: true,\n                draggable: true,\n                ondrag: echarts.util.curry(onPointDragging, dataIndex),\n                onmousemove: echarts.util.curry(showTooltip, dataIndex),\n                onmouseout: echarts.util.curry(hideTooltip, dataIndex),\n                z: 100\n            };\n        })\n    });\n\n    window.addEventListener(&#39;resize&#39;, function () {\n        myChart.setOption({\n            graphic: echarts.util.map(data, function (item, dataIndex) {\n                return {\n                    position: myChart.convertToPixel(&#39;grid&#39;, item)\n                };\n            })\n        });\n    });\n\n    function showTooltip(dataIndex) {\n        myChart.dispatchAction({\n            type: &#39;showTip&#39;,\n            seriesIndex: 0,\n            dataIndex: dataIndex\n        });\n    }\n\n    function hideTooltip(dataIndex) {\n        myChart.dispatchAction({\n            type: &#39;hideTip&#39;\n        });\n    }\n\n    function onPointDragging(dataIndex, dx, dy) {\n        data[dataIndex] = myChart.convertFromPixel(&#39;grid&#39;, this.position);\n        myChart.setOption({\n            series: [{\n                id: &#39;a&#39;,\n                data: data\n            }]\n        });\n    }\n\n&lt;/script&gt;\n&lt;/body&gt;\n&lt;/html&gt;\n</code></pre><p><br></p>\n<p>With knowledge introduced above, more feature can be implemented. For example, <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom component</a> can be added to cooperate with the cartesian, or we can make a plotting board on coordinate systems. Use your imagination ~</p>\n"},"Custom Series":{"type":["*"],"description":"<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 does Apache ECharts<sup>TM</sup> supports <code class=\"codespan\">custom series</code>?</p>\n<p>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 necessary to provide an approach to make new types of chart for developers. This approach should be as simple as possible, which had better not to bothered developers with some details of implementation, such as creating and deleting graphic elements, transition animation, tooltip supporting, working with <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a> or <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a>. Having considered the factors above, a solution <a href=\"option.html#series-custom\" target=\"_blank\">custom series</a> is published.</p>\n<p><strong>For example, a &quot;x-range&quot; chart is made by custom sereis:</strong></p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=custom-profile&reset=1&edit=1\" width=\"800\" height=\"500\" ></iframe>\n\n\n<p><strong><a href=\"https://echarts.apache.org/examples/en/index.html#chart-type-custom\" target=\"_blank\">More samples of custom series</a></strong></p>\n<p>Let&#39;s begin the tutorial.</p>\n<h2 id=\"-i-the-method-renderitem\">(I) The method <code class=\"codespan\">renderItem</code></h2>\n<p>The snippet of graphic elements rendering should be written in <code class=\"codespan\">renderItem</code> method my developers. For example:</p>\n<pre><code class=\"lang-js\">var option = {\n    ...,\n    series: [{\n        type: &#39;custom&#39;,\n        renderItem: function (params, api) {\n            // ...\n        },\n        data: data\n    }]\n}\n</code></pre>\n<p>In the rendering phase of echarts workflow, <a href=\"option.html#series-custom.renderItem\" target=\"_blank\">renderItem</a> is called respectively for each <code class=\"codespan\">dataItem</code> in <a href=\"option.html#series-custom.data\" target=\"_blank\">series.data</a>. <code class=\"codespan\">renderItem</code> is responsible for build a group of definitions of graphic elements, including graphic type, size, location, style, etc. echarts will then build graphic elements according to those definitions. For example:</p>\n<pre><code class=\"lang-js\">var option = {\n    ...,\n    series: [{\n        type: &#39;custom&#39;,\n        renderItem: function (params, api) {\n            // This method will be called for each dataItem repectively.\n            // Notice: it does not ensure that called according to the order\n            // of `dataItem`.\n\n            // Some processes, such as coordinate conversion.\n            // `api.value(0)` is used to retrieve the value on the first\n            // dimension in the current `dataItem`.\n            var categoryIndex = api.value(0);\n            // `api.coord(...)` is used to convert data values to pixel values,\n            // will are necessary for graphic elements rendering.\n            var startPoint = api.coord([api.value(1), categoryIndex]);\n            var endPoint = api.coord([api.value(2), categoryIndex]);\n            // `api.size(...)` is used to calculate the pixel size corresponding to\n            // the a value range that the length is 1 on Y axis.\n            var height = api.size([0, 1])[1] * 0.6;\n\n            // The property `shape` incicates the location and size of thsi\n            // element.\n            // `echarts.graphic.clipRectByRect` is used for clipping the\n            // rectangular when it overflow the bounding box of the current\n            // coordinate system (cartesian).\n            // If the rect is totally clipped, returns undefined.\n            var rectShape = echarts.graphic.clipRectByRect({\n                // position and location of the rectangular.\n                x: startPoint[0],\n                y: startPoint[1] - height / 2,\n                width: endPoint[0] - startPoint[0],\n                height: height\n            }, {\n                // Bounding box of the current cooridinate system (cartesian).\n                x: params.coordSys.x,\n                y: params.coordSys.y,\n                width: params.coordSys.width,\n                height: params.coordSys.height\n            })\n\n            // Returns definitions for the current `dataItem`.\n            return rectShape &amp;&amp; {\n                // &#39;rect&#39; indicates that the graphic element is rectangular.\n                // Can also be &#39;circle&#39;, &#39;sector&#39;, &#39;polygon&#39;, ...\n                type: &#39;rect&#39;,\n                shape: rectShape,\n                // `api.style(...)` is used to obtain style settings, which\n                // includes itemStyle settings in optino and the result of\n                // visual mapping.\n                style: api.style()\n            };\n        },\n        data: [\n            [12, 44, 55, 60], // The first dataItem.\n            [53, 31, 21, 56], // The second dataItem.\n            [71, 33, 10, 20], // The third dataItem.\n            ...\n        ]\n    }]\n}\n</code></pre>\n<p><a href=\"option.html#series-custom.renderItem\" target=\"_blank\">renderItem</a> provides two parameters:</p>\n<ul>\n<li><a href=\"option.html#series-custom.renderItem.arguments.params\" target=\"_blank\">params</a>:provides info about the current series (such as <code class=\"codespan\">seriesIndex</code>、<code class=\"codespan\">dataIndex</code>, etc.) and data (such as <code class=\"codespan\">dataIndex</code>, <code class=\"codespan\">dataIndexInside</code>, etc.) and coordinate system (such as location and size of bounding box of the current coordinate system)</li>\n<li><a href=\"option.html#series-custom.renderItem.arguments.api\" target=\"_blank\">api</a> provides some methods to developers (such as <code class=\"codespan\">api.value()</code>, <code class=\"codespan\">api.coord()</code>).</li>\n</ul>\n<p><a href=\"option.html#series-custom.renderItem\" target=\"_blank\">renderItem</a> method should return definitions of graphic elements for the current <code class=\"codespan\">dataItem</code>. See <a href=\"option.html#series-custom.renderItem.return\" target=\"_blank\">renderItem.return</a>.</p>\n<p>Generally, the main process of <a href=\"option.html#series-custom.renderItem\" target=\"_blank\">renderItem</a> is that retrieve value from data and convert them to graphic elements on the current coordinate system. Two methods in <a href=\"option.html#series-custom.renderItem.arguments.api\" target=\"_blank\">renderItem.arguments.api</a> are always used in this procedure:</p>\n<ul>\n<li><a href=\"option.html#series-custom.renderItem.arguments.api.value\" target=\"_blank\">api.value(...)</a> is used to retrieve value from data. For example, <code class=\"codespan\">api.value(0)</code> retrieve the value of the first dimension in the current data item.</li>\n<li><a href=\"option.html#series-custom.renderItem.arguments.api.coord\" target=\"_blank\">api.coord(...)</a> is used to convert data to coordinate. For example, <code class=\"codespan\">var point = api.coord([api.value(0), api.value(1)])</code> converet the data to the point on the current coordinate system.</li>\n</ul>\n<p>Sometimes <a href=\"option.html#series-custom.renderItem.arguments.api.size\" target=\"_blank\">api.size(...)</a> method is needed, which calculates the size on the coordinate system by a given data range.</p>\n<p>Moreover, <a href=\"option.html#series-custom.renderItem.arguments.api.style\" target=\"_blank\">api.style(...)</a> method can be used to set style. It provides not only the style settings specified in <a href=\"option.html#series-custom.itemStyle\" target=\"_blank\">series.itemStyle</a>, but also the result of visual mapping. This method can also be called like <code class=\"codespan\">api.style({fill: &#39;green&#39;, stroke: &#39;yellow&#39;})</code> to override those style settings.</p>\n<p>Having <code class=\"codespan\">renderItem</code> provided, 90% of the work of creating custom series has been accomplished. The rest of this work is to refine and polish them.</p>\n<h2 id=\"-ii-make-the-extent-of-axes-fit-the-data\">(II) Make the extent of axes fit the data</h2>\n<p>There is axes in some coordinate systems, such as <a href=\"option.html#grid\" target=\"_blank\">cartesian2d (grid)</a>and <a href=\"option.html#polar\" target=\"_blank\">polar</a>. The extent of an axis should fit the data automatically, otherwise the graphic elements would be overflow the bounding box of the coordinate system. So, for example, in <a href=\"option.html#grid\" target=\"_blank\">cartesian2d (grid)</a>, developers should specify that which dimensions correspond to <code class=\"codespan\">x</code> axis and which to <code class=\"codespan\">y</code> axis use the property <a href=\"option.html#series-custom.encode\" target=\"_blank\">encode</a>:</p>\n<pre><code class=\"lang-js\">option = {\n    series: [{\n        type: &#39;custom&#39;,\n        renderItem: function () {\n            ...\n        },\n        encode: {\n            // `dim1` and `dim2` correspond to `x` axis.\n            x: [1, 2],\n            // `dim0` corresponds to `y` axis.\n            y: 0\n        },\n        data: [\n            // dim0  dim1  dim2  dim3\n            [   12,   44,   55,   60   ], // The first dataItem.\n            [   53,   31,   21,   56   ], // The second dataItem.\n            [   71,   33,   10,   20   ], // The third dataItem.\n            ...\n        ]\n    }]\n};\n</code></pre>\n<h2 id=\"-iii-set-tooltip-content\">(III) Set tooltip content</h2>\n<p>Of course <a href=\"option.html#tooltip.formatter\" target=\"_blank\">tooltip.formatter</a> can be used to define the content in tooltip. But it is easier to do that by setting <a href=\"option.html#series-custom.encode\" target=\"_blank\">encode</a> and <a href=\"option.html#series-custom.dimensions\" target=\"_blank\">dimensions</a>:</p>\n<pre><code class=\"lang-js\">option = {\n    series: [{\n        type: &#39;custom&#39;,\n        renderItem: function () {\n            ...\n        },\n        encode: {\n            x: [1, 2],\n            y: 0,\n            // `dim2` and `dim3` will displayed in tooltip.\n            tooltip: [2, 3]\n        },\n        // `dim2` is named as &quot;Age&quot; and `dim3` is named as &quot;Satisfaction&quot;.\n        dimensions: [null, null, &#39;Age&#39;, &#39;Satisfaction&#39;],\n        data: [\n            // dim0  dim1  dim2  dim3\n            [   12,   44,   55,   60   ],\n            [   53,   31,   21,   56   ],\n            [   71,   33,   10,   20   ],\n            ...\n        ]\n    }]\n};\n</code></pre>\n<p><br>\n<br>\n<br></p>\n<hr>\n<p>Several other issues about <code class=\"codespan\">custom series</code> are introduced below.</p>\n<h2 id=\"-iv-shape-clipping-when-overflow-the-coordinates-area\">(IV) Shape clipping when overflow the coordinates area</h2>\n<p>When use <code class=\"codespan\">custom series</code> with <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a>, <a href=\"option.html#dataZoom.filterMode\" target=\"_blank\">dataZoom.filterMode</a> usually be set as <code class=\"codespan\">&#39;weakFilter&#39;</code>, which prevent <code class=\"codespan\">dataItem</code> from being filtered when only part of its dimensions are out of the current data window. For example:</p>\n<pre><code class=\"lang-js\">option = {\n    dataZoom: {\n        xAxisIndex: 0,\n        filterMode: &#39;weakFilter&#39;\n    },\n    series: [{\n        type: &#39;custom&#39;,\n        renderItem: function () {\n            ...\n        },\n        encode: {\n            x: [1, 2],\n            y: 0\n        },\n        data: [\n            // dim0  dim1  dim2  dim3\n            [   12,   44,   55,   60   ], // The first dataItem.\n            [   53,   31,   21,   56   ], // The second dataItem.\n            [   71,   33,   10,   20   ], // The third dataItem.\n            ...\n        ]\n    }]\n};\n</code></pre>\n<p>In the example above, <code class=\"codespan\">dim</code> and <code class=\"codespan\">dim2</code> corresponds to <code class=\"codespan\">x</code> axis, and the <code class=\"codespan\">dataZoom</code> component constrols the data window of <code class=\"codespan\">x</code> axis. If part of a <code class=\"codespan\">dataItem</code> is overflow the extent of <code class=\"codespan\">x</code> axis (the value on <code class=\"codespan\">dim1</code> is overflow and the value on <code class=\"codespan\">dim2</code> is not) while zooming, the <code class=\"codespan\">dataItem</code> will not be filtered if <code class=\"codespan\">dataZoom.filterMode = &#39;weakFilter&#39;</code> set. Thus the <code class=\"codespan\">dataItem</code> can be still rendered (usually be partially rendered by using <code class=\"codespan\">echarts.graphic.clipRectByRect</code> to clip the exceeding part).\nSee the example mentioned above <a href=\"https://echarts.apache.org/examples/en/editor.html?c=custom-profile\" target=\"_blank\">Profile</a>.</p>\n<h2 id=\"-v-about-dataindex\">(V) About dataIndex</h2>\n<p>Developers had better notice that in <a href=\"option.html#series-custom.renderItem.arguments.params\" target=\"_blank\">renderItem.arguments.params</a> <code class=\"codespan\">dataIndexInside</code> and <code class=\"codespan\">dataIndex</code> is different:</p>\n<ul>\n<li><code class=\"codespan\">dataIndex</code> is the index of a <code class=\"codespan\">dataItem</code> in the original data.</li>\n<li><code class=\"codespan\">dataIndexInside</code> is the index of a <code class=\"codespan\">dataItem</code> in the current data window (see <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a>.</li>\n</ul>\n<p><a href=\"option.html#series-custom.renderItem.arguments.api\" target=\"_blank\">renderItem.arguments.api</a> uses <code class=\"codespan\">dataIndexInside</code> as the input parameter but not <code class=\"codespan\">dataIndex</code>, because conversion from <code class=\"codespan\">dataIndex</code> to <code class=\"codespan\">dataIndexInside</code> is time-consuming.</p>\n<h2 id=\"-vi-event-listener\">(VI) Event listener</h2>\n<pre><code class=\"lang-js\">chart.setOption({\n    // ...\n    series: {\n        type: &#39;custom&#39;,\n        renderItem: function () {\n            // ...\n            return {\n                type: &#39;group&#39;,\n                children: [{\n                    type: &#39;circle&#39;\n                    // ...\n                }, {\n                    type: &#39;circle&#39;,\n                    name: &#39;aaa&#39;,\n                    // User specified info, available\n                    // in event handler.\n                    info: 12345,\n                    // ...\n                }]\n            };\n        }\n    }\n});\nchart.on(&#39;click&#39;, {element: &#39;aaa&#39;}, function (params) {\n    // When the element with name &#39;aaa&#39; clicked,\n    // this method called.\n    console.log(params.info);\n});\n</code></pre>\n<h2 id=\"-vii-custom-vector-shapes\">(VII) Custom vector shapes</h2>\n<p><a href=\"http://www.w3.org/TR/SVG/paths.html#PathData\" target=\"_blank\">SVG PathData</a> is supported, which enables to use shapes that are created in vector tool. See <a href=\"option.html#series-custom.renderItem.return_path\" target=\"_blank\">path</a>, and examples: <a href=\"https://echarts.apache.org/examples/en/editor.html?c=custom-calendar-icon\" target=\"_blank\">icons</a>, <a href=\"https://echarts.apache.org/examples/en/editor.html?c=custom-gantt-flight\" target=\"_blank\">shapes</a>.</p>\n<p><br></p>\n<p><strong><a href=\"https://echarts.apache.org/examples/en/index.html#chart-type-custom\" target=\"_blank\">More examples about custom series</a></strong></p>\n"},"Rich Text":{"type":["*"],"description":"<p>Rich text can be used in Apache ECharts<sup>TM</sup> labels of series, axis or other components. For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=pie-rich-text&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=treemap-obama&edit=1&reset=1\" width=\"800\" height=\"550\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=bar-rich-text&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<p><br></p>\n<p>More examples:\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=map-labels&amp;edit=1&amp;reset=1\" target=\"_blank\">Map Labels</a>,\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=pie-nest&amp;edit=1&amp;reset=1\" target=\"_blank\">Pie Labels</a>,\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=gauge-car&amp;edit=1&amp;reset=1\" target=\"_blank\">Gauge</a>.</p>\n<p><br></p>\n<p>Before v3.7, the style options was only able to applied to the whole label text block, and only color and font can be configured, which restricted the expressability of text descriptions.</p>\n<p>Since v3.7, rich text has been supported:</p>\n<ul>\n<li>Box styles (background, border, shadow, etc.), rotation, position of a text block can be specified.</li>\n<li>Styles (color, font, width/height, background, shadow, etc.) and alignment can be customzied on fragments of text.</li>\n<li>Image can be used in text as icon or background.</li>\n<li>Combine these configurations, some special effects can be made, such as simple table, horizontal rule (hr).</li>\n</ul>\n<p>At the beginning, the meanings of two terms that will be used below should be clarified:</p>\n<ul>\n<li>Text Block: The whole block of label text.</li>\n<li>Text fragment: Some piece of text in a text block.</li>\n</ul>\n<p>For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/text-block-fragment&edit=1&reset=1\" width=\"340\" height=\"240\" ></iframe>\n\n\n\n<h2 id=\"options-about-text\">Options about Text</h2>\n<p>echarts provides plenty of text options, including:</p>\n<ul>\n<li>Basic font style: <code class=\"codespan\">fontStyle</code>, <code class=\"codespan\">fontWeight</code>, <code class=\"codespan\">fontSize</code>, <code class=\"codespan\">fontFamily</code>.</li>\n<li>Fill of text: <code class=\"codespan\">color</code>.</li>\n<li>Stroke of text: <code class=\"codespan\">textBorderColor</code>, <code class=\"codespan\">textBorderWidth</code>.</li>\n<li>Shadow of text: <code class=\"codespan\">textShadowColor</code>, <code class=\"codespan\">textShadowBlur</code>, <code class=\"codespan\">textShadowOffsetX</code>, <code class=\"codespan\">textShadowOffsetY</code>.</li>\n<li>Box size of text block or text fragment: <code class=\"codespan\">lineHeight</code>, <code class=\"codespan\">width</code>, <code class=\"codespan\">height</code>, <code class=\"codespan\">padding</code>.</li>\n<li>Alignment of text block or text fragment: <code class=\"codespan\">align</code>, <code class=\"codespan\">verticalAlign</code>.</li>\n<li>Border, background (color or image) of text block or text fragment: <code class=\"codespan\">backgroundColor</code>, <code class=\"codespan\">borderColor</code>, <code class=\"codespan\">borderWidth</code>, <code class=\"codespan\">borderRadius</code>.</li>\n<li>Shadow of text block or text fragment: <code class=\"codespan\">shadowColor</code>, <code class=\"codespan\">shadowBlur</code>, <code class=\"codespan\">shadowOffsetX</code>, <code class=\"codespan\">shadowOffsetY</code>.</li>\n<li>Position and rotation of text block: <code class=\"codespan\">position</code>, <code class=\"codespan\">distance</code>, <code class=\"codespan\">rotate</code>.</li>\n</ul>\n<p>User can defined styles for text fragment in <code class=\"codespan\">rich</code> property. For example, <a href=\"option.html#series-bar.label.rich\" target=\"_blank\">series-bar.label.rich</a></p>\n<p>For example:</p>\n<pre><code class=\"lang-js\">label: {\n    // Styles defined in &#39;rich&#39; can be applied to some fragments\n    // of text by adding some markers to those fragment, like\n    // `{styleName|text content text content}`.\n    // `&#39;\\n&#39;` is the newline character.\n    formatter: [\n        &#39;{a|Style &quot;a&quot; is applied to this fragment}&#39;\n        &#39;{b|Style &quot;b&quot; is applied to this fragment}This fragment use default style{x|use style &quot;x&quot;}&#39;\n    ].join(&#39;\\n&#39;),\n\n    // Styles for the whole text block are defined here:\n    color: &#39;#333&#39;,\n    fontSize: 5,\n    fontFamily: &#39;Arial&#39;,\n    borderWidth: 3,\n    backgroundColor: &#39;#984455&#39;,\n    padding: [3, 10, 10, 5],\n    lineHeight: 20,\n\n    // Styles for text fragments are defined here:\n    rich: {\n        a: {\n            color: &#39;red&#39;,\n            lineHeight: 10\n        },\n        b: {\n            backgroundColor: {\n                image: &#39;xxx/xxx.jpg&#39;\n            },\n            height: 40\n        },\n        x: {\n            fontSize: 18,\n            fontFamily: &#39;Microsoft YaHei&#39;,\n            borderColor: &#39;#449933&#39;,\n            borderRadius: 4\n        },\n        ...\n    }\n}\n</code></pre>\n<blockquote>\n<p>Notice: <code class=\"codespan\">width</code> 和 <code class=\"codespan\">height</code> only work when <code class=\"codespan\">rich</code> specified.</p>\n</blockquote>\n<h2 id=\"basic-styles-of-text-text-block-and-text-fragment\">Basic Styles of Text, Text Block and Text Fragment</h2>\n<p>Basic font style can be set to text: <code class=\"codespan\">fontStyle</code>, <code class=\"codespan\">fontWeight</code>, <code class=\"codespan\">fontSize</code>, <code class=\"codespan\">fontFamily</code>.</p>\n<p>Fill color and stroke color can be set to text: <code class=\"codespan\">color</code>, <code class=\"codespan\">textBorderColor</code>, <code class=\"codespan\">textBorderWidth</code>.</p>\n<p>Border style and background style can be set to text block: <code class=\"codespan\">borderColor</code>, <code class=\"codespan\">borderWidth</code>, <code class=\"codespan\">backgroundColor</code>, <code class=\"codespan\">padding</code>.</p>\n<p>Border style and background style can be set to text fragment too: <code class=\"codespan\">borderColor</code>, <code class=\"codespan\">borderWidth</code>, <code class=\"codespan\">backgroundColor</code>, <code class=\"codespan\">padding</code>.</p>\n<p>For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/text-options&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n\n<h2 id=\"label-position\">Label Position</h2>\n<p><code class=\"codespan\">label</code> option can be use in charts like <code class=\"codespan\">bar</code>, <code class=\"codespan\">line</code>, <code class=\"codespan\">scatter</code>, etc. The position of a label, can be specified by <a href=\"option.html#series-scatter.label.position\" target=\"_blank\">label.position</a>、<a href=\"option.html#series-scatter.label.distance\" target=\"_blank\">label.distance</a>.</p>\n<p>For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/label-position&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<blockquote>\n<p>Notice, there are different optional values of <code class=\"codespan\">position</code> by different chart types. And <code class=\"codespan\">distance</code> is not supported in every chart. More detailed info can be checked in <a href=\"option.html\" target=\"_blank\">option doc</a>.</p>\n</blockquote>\n<h2 id=\"label-rotation\">Label Rotation</h2>\n<p>Sometimes label is needed to be rotated. For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=bar-label-rotation&edit=1&reset=1\" width=\"900\" height=\"500\" ></iframe>\n\n\n<p><a href=\"option.html#series-bar.label.align\" target=\"_blank\">align</a> and<a href=\"option.html#series-bar.label.verticalAlign\" target=\"_blank\">verticalAlign</a> can be used to adjust location of label in this scenario.</p>\n<p>Notice, <code class=\"codespan\">align</code> and <code class=\"codespan\">verticalAlign</code> are applied firstly, then rotate.</p>\n<h2 id=\"layout-and-alignment-of-text-fragment\">Layout and Alignment of Text fragment</h2>\n<p>To understand the layout rule, every text fragment can be imagined as a <code class=\"codespan\">inline-block</code> dom element in CSS.</p>\n<p><code class=\"codespan\">content box size</code> of a text fragment is determined by its font size by default. It can also be specified directly by <code class=\"codespan\">width</code> and <code class=\"codespan\">height</code>, although they are rarely set. <code class=\"codespan\">border box size</code> of a text fragment is calculated by adding the <code class=\"codespan\">border box size</code> and <code class=\"codespan\">padding</code>.</p>\n<p>Only <code class=\"codespan\">&#39;\\n&#39;</code> is the newline character, which breaks a line.</p>\n<p>Multiple text fragment exist in a single line. The height of a line is determined by the biggest <code class=\"codespan\">lineHeight</code> of text fragments. <code class=\"codespan\">lineHeight</code> of a text fragment can be specified in <code class=\"codespan\">rich</code>, or in the parent level of <code class=\"codespan\">rich</code>, otherwise using <code class=\"codespan\">box size</code> of the text fragment.</p>\n<p>Having <code class=\"codespan\">lineHeight</code> determined, the vertical position of text fragments can be determined by <code class=\"codespan\">verticalAlign</code> (there is a little different from the rule in CSS):</p>\n<ul>\n<li><code class=\"codespan\">&#39;bottom&#39;</code>: The bottom edge of the text fragment sticks to the bottom edge of the line.</li>\n<li><code class=\"codespan\">&#39;top&#39;</code>: The top edge of the text fragment sticks to the top edge of the line.</li>\n<li><code class=\"codespan\">&#39;middle&#39;</code>: In the middle of the line.</li>\n</ul>\n<p>The width of a text block can be specified by <code class=\"codespan\">width</code>, otherwise, by the longest line. Having the width determined, text fragment can be placed in each line, where the horizontal position of text fragments can be determined by its <code class=\"codespan\">align</code>.</p>\n<ul>\n<li>Firstly, place text fragments whose <code class=\"codespan\">align</code> is <code class=\"codespan\">&#39;left&#39;</code> from left to right continuously.</li>\n<li>Secondly, place text fragments whose <code class=\"codespan\">align</code> is <code class=\"codespan\">&#39;right&#39;</code> from right to left continuously.</li>\n<li>Finally, the text fragments remained will be sticked and placed in the center of the rest of space.</li>\n</ul>\n<p>The position of text in a text fragment:</p>\n<ul>\n<li>If <code class=\"codespan\">align</code> is <code class=\"codespan\">&#39;center&#39;</code>, text aligns at the center of the text fragment box.</li>\n<li>If <code class=\"codespan\">align</code> is <code class=\"codespan\">&#39;left&#39;</code>, text aligns at the left of the text fragment box.</li>\n<li>If <code class=\"codespan\">align</code> is <code class=\"codespan\">&#39;right&#39;</code>, text aligns at the right of the text fragment box.</li>\n</ul>\n<p>For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/text-fragment-align&edit=1&reset=1\" width=\"800\" height=\"220\" ></iframe>\n\n\n\n\n<h2 id=\"effects-icon-horizontal-rule-title-block-simple-table\">Effects: Icon, Horizontal Rule, Title Block, Simple Table</h2>\n<p>See example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/title-block&edit=1&reset=1\" width=\"600\" height=\"400\" ></iframe>\n\n\n<p>Icon is implemented by using image in <code class=\"codespan\">backgroundColor</code>.</p>\n<pre><code class=\"lang-js\">rich: {\n    Sunny: {\n        backgroundColor: {\n            image: &#39;./data/asset/img/weather/sunny_128.png&#39;\n        },\n        // Can only height specified, but leave width auto obtained\n        // from the image, where the aspect ratio kept.\n        height: 30\n    }\n}\n</code></pre>\n<p>Horizontal rule (like HTML &lt;hr&gt; tag) can be implemented by border:</p>\n<pre><code class=\"lang-js\">rich: {\n    hr: {\n        borderColor: &#39;#777&#39;,\n        // width is set as &#39;100%&#39; to fullfill the text block.\n        // Notice, the percentage is based on the content box, without\n        // padding. Although it is a little different from CSS rule,\n        // it is convinent in most cases.\n        width: &#39;100%&#39;,\n        borderWidth: 0.5,\n        height: 0\n    }\n}\n</code></pre>\n<p>Title block can be implemented by <code class=\"codespan\">backgroundColor</code>:</p>\n<pre><code class=\"lang-js\">// Title is at left.\nformatter: &#39;{titleBg|Left Title}&#39;,\nrich: {\n    titleBg: {\n        backgroundColor: &#39;#000&#39;,\n        height: 30,\n        borderRadius: [5, 5, 0, 0],\n        padding: [0, 10, 0, 10],\n        width: &#39;100%&#39;,\n        color: &#39;#eee&#39;\n    }\n}\n\n// Title is in the center of the line.\n// This implementation is a little tricky, but is works\n// without more complicated layout mechanism involved.\nformatter: &#39;{tc|Center Title}{titleBg|}&#39;,\nrich: {\n    titleBg: {\n        align: &#39;right&#39;,\n        backgroundColor: &#39;#000&#39;,\n        height: 30,\n        borderRadius: [5, 5, 0, 0],\n        padding: [0, 10, 0, 10],\n        width: &#39;100%&#39;,\n        color: &#39;#eee&#39;\n    }\n}\n</code></pre>\n<p>Simple table can be implemented by specify the same width to text fragments that are in the same column of different lines. See the <a href=\"https://echarts.apache.org/examples/en/view.html?c=pie-rich-text&amp;edit=1&amp;reset=1\" target=\"_blank\">example</a> at the mentioned above.</p>\n"},"Server-side Rendering":{"type":["*"],"description":"<p>Apache ECharts<sup>TM</sup> can be rendered at server-side. For example, the thumbnails in the <a href=\"https://echarts.apache.org/examples/en/index.html\" target=\"_blank\">official examples page</a> are generated at a server.</p>\n<p>Commonly used headless tool is required, for example, <a href=\"https://github.com/GoogleChrome/puppeteer\" target=\"_blank\">puppeteer</a>, <a href=\"https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md\" target=\"_blank\">headless chrome</a>, <a href=\"https://github.com/Automattic/node-canvas\" target=\"_blank\">node-canvas</a>, <a href=\"https://github.com/jsdom/jsdom\" target=\"_blank\">jsdom</a>, <a href=\"http://phantomjs.org/\" target=\"_blank\">PhantomJS</a>, etc.</p>\n<p>Some solutions contributed by the community are list as follows:</p>\n<ul>\n<li><a href=\"https://github.com/hellosean1025/node-echarts\" target=\"_blank\">https://github.com/hellosean1025/node-echarts</a></li>\n<li><a href=\"https://github.com/chfw/echarts-scrappeteer\" target=\"_blank\">https://github.com/chfw/echarts-scrappeteer</a></li>\n<li><a href=\"https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js\" target=\"_blank\">https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js</a></li>\n<li><a href=\"https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73\" target=\"_blank\">https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73</a></li>\n</ul>\n"},"Render by Canvas or SVG":{"type":["*"],"description":"<p>Most of browser-side charting libraries use SVG or Canvas as their underlying renderer. In the scope of Apache ECharts<sup>TM</sup>, they are usually alternative, without critical differences. But in some environment and scenarios, they show notable differences in performance or functionality.</p>\n<p>ECharts has been using Canvas as its renderer (use VML for IE8-) from the beginning. As of <a href=\"https://github.com/apache/echarts/releases\" target=\"_blank\">ECharts v3.8</a> we provide an SVG renderer (beta version) as another option. Either of them can be used by specifing parameter <a href=\"api.html#echarts.init\" target=\"_blank\">renderer</a> as <code class=\"codespan\">&#39;canvas&#39;</code> or <code class=\"codespan\">&#39;svg&#39;</code> when initailizing a chart instance.</p>\n<blockquote>\n<p>Both SVG and Canvas, which are very different rendering implementations, are supported in ECharts by leveraging the Canvas and SVG renderers offered by the <a href=\"https://github.com/ecomfe/zrender\" target=\"_blank\">zrender</a> library.</p>\n</blockquote>\n<h2 id=\"how-to-make-a-choice-\">How to make a choice?</h2>\n<p>Generally speaking, Canvas is suitable for cases where there is a large amount of graphical elements (usually due to a large amount of data points), like heatmap and lines or scatter plot with large data in geo or parallel coordinates. In addition, it supports some <a href=\"https://echarts.apache.org/examples/en/editor.html?c=lines-bmap-effect\" target=\"_blank\">special visual effect</a> not supported by SVG. However, in some other scenarios SVG has some critical advantages: it consumes less memory than Canvas (especially in mobile devices), and gives better performance in rendering. Moreover, it never blurs when zooming the viewport of the browser whereas Canvas may blur.</p>\n<p>How to make a choice? These factors, hardware and software environment, data amount and functional requirements, should be considered.</p>\n<ul>\n<li>When not constrained by hardware/software, and the data amount is not large, both should provide equally satisfactory results.</li>\n<li>When encountering performance issues, we can attempt to get better result by choose appropriate renderer.<ul>\n<li>If lots of ECharts instances have to be created, and it causes the browser crash (probably caused by that the large memory consumption) we can try the SVG renderer. Or, generally, when running on some old Android devices, or if we are using some kind of charts like <a href=\"https://ecomfe.github.io/echarts-liquidfill/example/\" target=\"_blank\">liquidfill</a>, the SVG renderer probably gives a better performance.</li>\n<li>If visualizing a large amount of data, or complicated human interactions with data is required, the Canvas renderer works better currently.</li>\n</ul>\n</li>\n</ul>\n<p>Therefore <a href=\"https://github.com/apache/echarts/issues/new\" target=\"_blank\">feedback</a> of experiences and usage scenarios are strongly welcomed, which will help improve the these renderers.</p>\n<h2 id=\"how-to-use-specify-a-renderer-\">How to use specify a renderer?</h2>\n<p>ECharts uses Canvas by default. If a user intends to use the SVG renderer, the module of the SVG renderer should be included in ECharts bundle.</p>\n<ul>\n<li>In the <a href=\"https://www.jsdelivr.com/package/npm/echarts\" target=\"_blank\">pre-build</a> of ECharts, the SVG renderer has been included in <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.common.min.js\" target=\"_blank\">common version</a> and <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js\" target=\"_blank\">complete version</a>. But not in <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.simple.min.js\" target=\"_blank\">simple version</a>.</li>\n<li>When <a href=\"https://echarts.apache.org/en/builder.html\" target=\"_blank\">building ECharts online</a>, the checkbox &quot;SVG Renderer&quot; should be checked.</li>\n<li>When <a href=\"tutorial.html#Use%20ECharts%20with%20bundler%20and%20NPM\" target=\"_blank\">building ECharts offline</a>, the SVG renderer module should be imported:</li>\n</ul>\n<pre><code class=\"lang-js\">import &#39;zrender/lib/svg/svg&#39;;\n</code></pre>\n<p>Then we can specify renderer by <a href=\"api.html#echarts.init\" target=\"_blank\">parameter</a>:</p>\n<pre><code class=\"lang-js\">// Use the Canvas renderer (default).\nvar chart = echarts.init(containerDom, null, {renderer: &#39;canvas&#39;});\n// which is equal to:\nvar chart = echarts.init(containerDom, null, {renderer: &#39;canvas&#39;});\n\n// Use the SVG renderer.\nvar chart = echarts.init(containerDom, null, {renderer: &#39;svg&#39;});\n</code></pre>\n"},"SVG Base Map in Geo Coords and Map Series":{"type":["*"],"description":"<p>Since <code class=\"codespan\">v5.1.0</code>, ECharts support to use SVG as the base map in <a href=\"option.html#geo\" target=\"_blank\">geo coordinate system</a> and <a href=\"option.html#series-map\" target=\"_blank\">map series</a>, where previously only <a href=\"http://geojson.org/\" target=\"_blank\">GeoJSON</a> is supported.</p>\n<p>This feature enables ECharts to display SVG in either of the render modes (<code class=\"codespan\">canvas</code> render mode and <code class=\"codespan\">svg</code> render mode), and enables features like <a href=\"option.html#geo.roam\" target=\"_blank\">zoom</a>, <a href=\"option.html#geo.roam\" target=\"_blank\">pan</a>, <a href=\"option.html#geo.select\" target=\"_blank\">select</a>, <a href=\"option.html#geo.emphasis\" target=\"_blank\">emphasis</a>, <a href=\"option.html#geo.emphasis.focus\" target=\"_blank\">focus-blur</a>, <a href=\"option.html#geo.label\" target=\"_blank\">label</a>, <a href=\"option.html#series-map.labelLayout\" target=\"_blank\">labelLayout</a>, <a href=\"option.html#geo.tooltip\" target=\"_blank\">tooltip</a> on SVG with only simple some ECharts options. Series like <a href=\"option.html#series-scatter\" target=\"_blank\">scatter</a>, <a href=\"option.html#series-effectScatter\" target=\"_blank\">effectScatter</a>, <a href=\"option.html#series-lines\" target=\"_blank\">lines</a>, <a href=\"option.html#series-custom\" target=\"_blank\">custom</a> that are available on <a href=\"option.html#geo\" target=\"_blank\">geo coordinate system</a> can also be positioned and displayed based on SVG base map.</p>\n<p>There are several examples where SVG base map is used:</p>\n<p><a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-beef-cuts\" target=\"_blank\">Beef Cuts</a> |\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-organ\" target=\"_blank\">Organ Visualization</a> |\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-seatmap-flight\" target=\"_blank\">Flight Seatmap</a> |\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-svg-map\" target=\"_blank\">SVG Map</a> |\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-svg-scatter-simple\" target=\"_blank\">SVG Scatter</a> |\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-svg-lines\" target=\"_blank\">SVG Lines</a> |\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-svg-traffic\" target=\"_blank\">SVG Traffic</a></p>\n<h2 id=\"basic-usage\">Basic Usage</h2>\n<p>The usage of SVG base map is the same as the usage of <a href=\"http://geojson.org/\" target=\"_blank\">GeoJSON</a>.</p>\n<p>If used in <a href=\"option.html#geo\" target=\"_blank\">geo coordinate system</a>:</p>\n<pre><code class=\"lang-js\">$.get(&#39;map/organ.svg&#39;, function (svg) {\n    // Firstly we need to register SVG raw string or parsed SVG DOM\n    // to echarts with a name:\n    echarts.registerMap(&#39;organ_diagram&#39;, {svg: svg});\n\n    var chart = echarts.init(document.getElementById(&#39;main&#39;));\n    chart.setOption({\n        geo: {\n            // Reference it in echarts option.\n            map: &#39;organ_diagram&#39;,\n            ...\n        }\n    });\n});\n</code></pre>\n<p>If used in <a href=\"option.html#series-map\" target=\"_blank\">map series</a>:</p>\n<pre><code class=\"lang-js\">$.get(&#39;map/beef_cuts.svg&#39;, function (svg) {\n    // Firstly we need to register SVG raw string or parsed SVG DOM\n    // to echarts with a name:\n    echarts.registerMap(&#39;beef_cuts_diagram&#39;, {svg: svg});\n\n    var chart = echarts.init(document.getElementById(&#39;main&#39;));\n    chart.setOption({\n        series: {\n            type: &#39;map&#39;,\n            // Reference it in echarts option.\n            map: &#39;beef_cuts_diagram&#39;,\n            ...\n        }\n    });\n});\n</code></pre>\n<h2 id=\"zoom-and-pan\">Zoom and Pan</h2>\n<p>For <a href=\"option.html#geo\" target=\"_blank\">Geo coordinate system</a></p>\n<pre><code class=\"lang-js\">option = {\n    geo: {\n        // Enable zoom and pan.\n        roam: true,\n        ...\n    }\n};\n</code></pre>\n<p>For <a href=\"option.html#series-map\" target=\"_blank\">map series</a></p>\n<pre><code class=\"lang-js\">option = {\n    series: {\n        type: &#39;map&#39;,\n        // Enable zoom and pan.\n        roam: true,\n        ...\n    }\n};\n</code></pre>\n<p>See <a href=\"option.html#geo.roam\" target=\"_blank\">roam</a>.\nAlso see example <a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-svg-map\" target=\"_blank\">SVG Map</a>.</p>\n<h2 id=\"named-element\">Named Element</h2>\n<p>If intending to interact with some elements of SVG, we need to mark those elements in SVG firstly. That can be done simply by adding names to the target elements. The interaction related feature like <a href=\"option.html#geo.select\" target=\"_blank\">select</a>, <a href=\"option.html#geo.emphasis\" target=\"_blank\">emphasis</a>, <a href=\"option.html#geo.emphasis.focus\" target=\"_blank\">focus-blur</a>, <a href=\"option.html#geo.label\" target=\"_blank\">label</a>, <a href=\"option.html#series-map.labelLayout\" target=\"_blank\">labelLayout</a>, <a href=\"option.html#geo.tooltip\" target=\"_blank\">tooltip</a> depend on those named elements.</p>\n<p>For example, we add name attribute <code class=\"codespan\">name=&quot;named_rect&quot;</code> only to the left SVG <code class=\"codespan\">path</code>.</p>\n<pre><code class=\"lang-xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\n&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; version=&quot;1.2&quot; fill-rule=&quot;evenodd&quot; xml:space=&quot;preserve&quot;&gt;\n    &lt;path name=&quot;named_rect&quot; d=&quot;M 0,0 L 0,100 100,100 100,0 Z&quot; fill=&quot;#765&quot; /&gt;\n    &lt;path d=&quot;M 150,0 L 150,100 250,100 250,0 Z&quot; fill=&quot;#567&quot; /&gt;\n&lt;/svg&gt;\n</code></pre>\n<p>Then hover on the left rect, it can be highlighted, whereas the right one can not.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/geo-svg-named-basic&edit=1&reset=1\" width=\"500\" height=\"200\" ></iframe>\n\n\n<p>Option for some certain named elements can be specified in <a href=\"option.html#geo.regions\" target=\"_blank\">geo.regions</a>, like:</p>\n<pre><code class=\"lang-js\">option = {\n    geo: {\n        map: &#39;some_svg&#39;,\n        regions: [{\n            name: &#39;element_name_1&#39;,\n            itemStyle: { ... }\n        }, {\n            name: &#39;element_name_2&#39;,\n            itemStyle: { ... }\n        }]\n    }\n};\n</code></pre>\n<p>Note:</p>\n<ul>\n<li>These SVG elements can be named and recognized by ECharts:\n<code class=\"codespan\">rect</code>, <code class=\"codespan\">circle</code>, <code class=\"codespan\">line</code>, <code class=\"codespan\">ellipse</code>, <code class=\"codespan\">polygon</code>, <code class=\"codespan\">polyline</code>, <code class=\"codespan\">path</code>, <code class=\"codespan\">text</code>, <code class=\"codespan\">tspan</code>, <code class=\"codespan\">g</code>.</li>\n<li>It is supported that multiple elements are named with the same name, will they will be highlighted/selected together.</li>\n</ul>\n<h2 id=\"style-customization\">Style Customization</h2>\n<p>Although the style (such as color, font, lineWidth, ...) of SVG Elements can be defined directly in SVG file, style of named elements can also be customized in ECharts option, which will be handy in some scenario.</p>\n<p>Styles can be specified in <a href=\"option.html#geo.itemStyle\" target=\"_blank\">geo.itemStyle</a> and <a href=\"option.html#series-map.itemStyle\" target=\"_blank\">series-map.itemStyle</a> (also includes <code class=\"codespan\">emphasis.itemStyle</code>, <code class=\"codespan\">select.itemStyle</code>, <code class=\"codespan\">blur.itemStyle</code>, <code class=\"codespan\">regions[i].itemStyle</code>, <code class=\"codespan\">regions[i].emphasis.itemStyle</code>, <code class=\"codespan\">regions[i].select.itemStyle</code>, <code class=\"codespan\">regions[i].blur.itemStyle</code>). Some default style of the named elements can also be removed here (e.g., set <code class=\"codespan\">emphasis.itemStyle.color: null</code> to prevent the fill color from changing when mouse hovering.)</p>\n<p>Moreover, named elements can also be styled by <a href=\"option.html#visualMap\" target=\"_blank\">visualMap component</a> if using <a href=\"option.html#series-map\" target=\"_blank\">series-map</a>. See <a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-beef-cuts\" target=\"_blank\">Beef Cuts</a>.</p>\n<p>Note:\nOnly these named elements can be styled in <code class=\"codespan\">itemStyle</code>:\n<code class=\"codespan\">rect</code>, <code class=\"codespan\">circle</code>, <code class=\"codespan\">line</code>, <code class=\"codespan\">ellipse</code>, <code class=\"codespan\">polygon</code>, <code class=\"codespan\">polyline</code>, <code class=\"codespan\">path</code>.</p>\n<h2 id=\"select\">Select</h2>\n<p>Named elements can adopt &quot;select&quot; feature by setting <a href=\"option.html#geo.selectedMode\" target=\"_blank\">geo.selectedMode</a> or <a href=\"option.html#series-map.selectedMode\" target=\"_blank\">series-map.selectedMode</a> as <code class=\"codespan\">&#39;single&#39;</code> or <code class=\"codespan\">&#39;multiple&#39;</code>. The style of element when selected can be specified in <a href=\"option.html#geo.select\" target=\"_blank\">geo.select</a> or <a href=\"option.html#series-map.select\" target=\"_blank\">series-map.select</a>.</p>\n<p>The selected names can be obtained by <a href=\"api.html#event.geoselectchanged\" target=\"_blank\">geoselectchanged</a> event, like:</p>\n<pre><code class=\"lang-js\">myChart.on(&#39;geoselectchanged&#39;, function (params) {\n    var selectedNames = params.allSelected[0].name;\n    console.log(&#39;selected&#39;, selectedNames);\n});\n</code></pre>\n<p>See <a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-seatmap-flight\" target=\"_blank\">Flight Seatmap</a> for more details.</p>\n<h2 id=\"emphasis-and-focus-blur\">Emphasis and Focus-Blur</h2>\n<p><code class=\"codespan\">emphasis</code> state (highlight when hovering) can be auto adopted to named elements.</p>\n<p>Especially, <a href=\"option.html#geo.emphasis.focus\" target=\"_blank\">geo.emphasis.focus</a> and be set as <code class=\"codespan\">&#39;self&#39;</code> to enable &quot;focus-blur&quot; feature, where all all of the other elements will be blurred when hovering on an named element.</p>\n<p>See <a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-organ\" target=\"_blank\">Organ Visualization</a> for more details.</p>\n<h2 id=\"tooltip\">Tooltip</h2>\n<p>Tooltip can be enabled or disabled on named elements.</p>\n<pre><code class=\"lang-js\">option = {\n    // Need to declare the root tooltip to\n    // enable tooltip feature on ECharts.\n    tooltip: {},\n    geo: {\n        map: &#39;some_svg&#39;,\n        tooltip: {\n            // Use `show` to enable/disable tooltip\n            // on geo coordinate system.\n            show: true\n        },\n        regions: [{\n            name: &#39;some_name1&#39;,\n            // Set named element specified tooltip option if needed.\n            tooltip: {\n                formatter: &#39;some special tooltip 1&#39;\n            }\n        }, {\n            name: &#39;some_name2&#39;,\n            tooltip: {\n                formatter: &#39;some special tooltip 2&#39;\n            }\n        }]\n    }\n};\n</code></pre>\n<p>If intending to disable the geo tooltip when hovering a on named elements, just:</p>\n<pre><code class=\"lang-js\">option = {\n    tooltip: {},\n    geo: {\n        map: &#39;some_svg&#39;,\n        tooltip: {\n            show: false\n        }\n    }\n};\n</code></pre>\n<p>See <a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-svg-map\" target=\"_blank\">SVG Map</a> for more details.</p>\n<h2 id=\"label\">Label</h2>\n<p>Although text label can be declared in SVG file directly via <code class=\"codespan\">&lt;text&gt;</code>/<code class=\"codespan\">&lt;tspan&gt;</code>, we can also use ECharts built-in label feature on named elements by specifying <a href=\"option.html#geo.label\" target=\"_blank\">geo.label</a> or <a href=\"option.html#series-map.label\" target=\"_blank\">series-map.label</a>.</p>\n<p>By default the label feature is enabled when hovering on a named element. If intending to disable it, just:</p>\n<pre><code class=\"lang-js\">option = {\n    geo: {\n        map: &#39;some_svg&#39;,\n        emphasis: {\n            label: {\n                show: false\n            }\n        }\n    }\n};\n</code></pre>\n<p>When multiple elements need to share one label text, we have two choices:</p>\n<ul>\n<li>Wrap those elements in a named <code class=\"codespan\">&lt;g&gt;</code> (e.g., <code class=\"codespan\">&lt;g name=&quot;name_a&quot;&gt;</code>), where a single label will be displayed and located based on the bounding rect of the <code class=\"codespan\">&lt;g&gt;</code>.</li>\n<li>Name those elements with the same name (e.g., <code class=\"codespan\">&lt;path name=&quot;name_b&quot;/&gt;&lt;path name=&quot;name_b&quot;/&gt;</code>), where multiple labels will be displayed and located based on each elements self.</li>\n</ul>\n<p>For example (hover to show the labels):</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/geo-svg-label-basic&edit=1&reset=1\" width=\"500\" height=\"300\" ></iframe>\n\n\n<p>Note: Only these named elements can be labeled via <code class=\"codespan\">label</code> option:\n<code class=\"codespan\">rect</code>, <code class=\"codespan\">circle</code>, <code class=\"codespan\">line</code>, <code class=\"codespan\">ellipse</code>, <code class=\"codespan\">polygon</code>, <code class=\"codespan\">polyline</code>, <code class=\"codespan\">path</code>, <code class=\"codespan\">g</code>.</p>\n<p>Also see <a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-organ\" target=\"_blank\">Organ Visualization</a> for the usage of label.</p>\n<h2 id=\"events\">Events</h2>\n<p>Mouse events or touch events of named elements can be listened simply by:</p>\n<pre><code class=\"lang-js\">// &#39;name1&#39; is a name of a SVG element.\nmyChart.on(&#39;click&#39;, { geoIndex: 0, name: &#39;name1&#39; }, function (params) {\n    console.log(params);\n});\n</code></pre>\n<h2 id=\"layout-of-svg-base-map\">Layout of SVG Base Map</h2>\n<p>By default ECharts will position the SVG base map in the center of the canvas. If need some adjust, we usually only adjust <a href=\"option.html#geo.layoutCenter\" target=\"_blank\">layoutCenter</a>/<a href=\"option.html#geo.layoutSize\" target=\"_blank\">layoutSize</a>, and occasionally <code class=\"codespan\">&lt;svg viewBox=&quot;...&quot;&gt;</code>/<a href=\"option.html#geo.boundingCoords\" target=\"_blank\">geo.boundingCoords</a> (difference: clip or not). In most cases they are enough.</p>\n<p>If need some advanced precise control of the position and zoom, several concepts below can be noticed.</p>\n<p>The layout rule and options of <a href=\"option.html#geo\" target=\"_blank\">geo coordinate system</a> and <a href=\"option.html#series-map\" target=\"_blank\">map series</a> are the same. So we only demonstrate <a href=\"option.html#geo\" target=\"_blank\">geo coordinate system</a> below.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/geo-svg-layout-basic&edit=1&reset=1\" width=\"700\" height=\"550\" ></iframe>\n\n\n<p>The demo above shows six <a href=\"option.html#geo\" target=\"_blank\">geo coordinate system</a> with three SVG files in a single ECharts canvas. Each two <a href=\"option.html#geo\" target=\"_blank\">geo</a> that are in the same column use the same SVG file.</p>\n<p>Firstly, what shapes looks like is determined by SVG file itself. That is, in the demo above, determined by the <code class=\"codespan\">&lt;circle&gt;</code> and <code class=\"codespan\">viewBox</code> attribute (<code class=\"codespan\">viewBox</code> cut (clips) the circle). We can noticed that the final shape outlines in each column are the same (despite the difference in position, size and scratch), since they use the same SVG file.</p>\n<p>Secondly, users can use either of the two option groups below to determine the location and the size of the <code class=\"codespan\">geo view port</code> of <a href=\"option.html#geo\" target=\"_blank\">geo coordinate system</a> according to the entire chart canvas (all of these options are measured in echarts canvas pixel, or percentage value):</p>\n<ul>\n<li><a href=\"option.html#geo.layoutCenter\" target=\"_blank\">layoutCenter</a>, <a href=\"option.html#geo.layoutSize\" target=\"_blank\">layoutSize</a> (recommended).</li>\n<li><a href=\"option.html#geo.top\" target=\"_blank\">top</a>, <a href=\"option.html#geo.right\" target=\"_blank\">right</a>, <a href=\"option.html#geo.bottom\" target=\"_blank\">bottom</a>, <a href=\"option.html#geo.left\" target=\"_blank\">left</a> (which is used in the demo above).</li>\n</ul>\n<p>In the demo above, the six geo <code class=\"codespan\">geo view ports</code> are displayed as six black squares.</p>\n<p>Thirdly, a <code class=\"codespan\">bounding rect</code> of the SVG is determined, which is determined by methods below (all of them are measured in SVG local unit):</p>\n<ol>\n<li>If <a href=\"option.html#geo.boundingCoords\" target=\"_blank\">geo.boundingCoords</a> is specified, use it as <code class=\"codespan\">bounding rect</code>.</li>\n<li>Else if <code class=\"codespan\">&lt;svg width=&quot;...&quot; height=&quot;...&quot;&gt;</code> is specified, use <code class=\"codespan\">[0, 0, width, height]</code> as <code class=\"codespan\">bounding rect</code>. (If only <code class=\"codespan\">width</code> or only <code class=\"codespan\">height</code> is specified, only use <code class=\"codespan\">[0, width]</code> or <code class=\"codespan\">[0, height]</code>).</li>\n<li>Else if <code class=\"codespan\">svg viewBox=&quot;...&quot;&gt;</code> is specified, use <code class=\"codespan\">viewBox</code> as <code class=\"codespan\">bounding rect</code>.</li>\n<li>Else use the union bounding rect of all of the SVG elements as the <code class=\"codespan\">bounding rect</code>.</li>\n<li>If <a href=\"option.html#geo.center\" target=\"_blank\">geo.center</a> or <a href=\"option.html#geo.zoom\" target=\"_blank\">geo.zoom</a> is specified, transform the <code class=\"codespan\">bounding rect</code> determined by <code class=\"codespan\">1~4</code> above.</li>\n</ol>\n<p>Having <code class=\"codespan\">bounding rect</code> determined, it will be placed into its corresponding <code class=\"codespan\">geo view port</code>:</p>\n<ul>\n<li>If <a href=\"option.html#geo.layoutCenter\" target=\"_blank\">layoutCenter</a>, <a href=\"option.html#geo.layoutSize\" target=\"_blank\">layoutSize</a> is used, the <code class=\"codespan\">bounding rect</code> will be placed at the center and as big as possible into the <code class=\"codespan\">geo view port</code> (keep aspect ratio).</li>\n<li>If <a href=\"option.html#geo.top\" target=\"_blank\">top</a>, <a href=\"option.html#geo.right\" target=\"_blank\">right</a>, <a href=\"option.html#geo.bottom\" target=\"_blank\">bottom</a>, <a href=\"option.html#geo.left\" target=\"_blank\">left</a> is used, the view rect will be stretched to fill the <code class=\"codespan\">geo view port</code> entirely.</li>\n</ul>\n<h2 id=\"place-series-on-svg-base-map\">Place Series on SVG Base Map</h2>\n<p>Series like <a href=\"option.html#series-scatter\" target=\"_blank\">scatter</a>, <a href=\"option.html#series-effectScatter\" target=\"_blank\">effectScatter</a>, <a href=\"option.html#series-lines\" target=\"_blank\">lines</a>, <a href=\"option.html#series-custom\" target=\"_blank\">custom</a> that are available on <a href=\"option.html#geo\" target=\"_blank\">geo coordinate system</a> can also be positioned and displayed on SVG base map.</p>\n<p>Note that in this kind of usage the unit of series data value is the SVG file local coords. For example:</p>\n<pre><code class=\"lang-js\">option = {\n    geo: {\n        map: &#39;some_svg&#39;\n    },\n    series: {\n        type: &#39;effectScatter&#39;,\n        coordinateSystem: &#39;geo&#39;,\n        geoIndex: 0,\n        data: [\n            // SVG local coords.\n            [488.2358421078053, 459.70913833075736],\n            [770.3415644319939, 757.9672194986475],\n            [1180.0329284196291, 743.6141808346214],\n        ]\n    }\n};\n</code></pre>\n<p>By the way, there is a simple approach to get SVG local coord:</p>\n<pre><code class=\"lang-js\">myChart.setOption({\n    geo: {\n        map: &#39;some_svg&#39;\n    }\n});\nmyChart.getZr().on(&#39;click&#39;, function (params) {\n    var pixelPoint = [params.offsetX, params.offsetY];\n    var dataPoint = myChart.convertFromPixel({ geoIndex: 0 }, pixelPoint);\n    // When click, the data in SVG local coords will be printed,\n    // which can be used in `series.data`.\n    console.log(dataPoint);\n});\n</code></pre>\n<p>See also <a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-svg-scatter-simple\" target=\"_blank\">SVG Scatter</a>, <a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-svg-lines\" target=\"_blank\">SVG Lines</a>, <a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-traffic\" target=\"_blank\">SVG Traffic</a>.</p>\n<h2 id=\"unsupported-svg-features\">Unsupported SVG features</h2>\n<p>Unfortunately it is difficult to implement a complete SVG parser. While the common SVG features are supported, at least these features listed below are not supported yet:</p>\n<ul>\n<li>Flip and skew (will be supported <code class=\"codespan\">v5.1.2</code>):<ul>\n<li>Not support <code class=\"codespan\">transform: skew(...)</code> (including <code class=\"codespan\">transform: matrix(...)</code> that includes skew).</li>\n<li>Not support <code class=\"codespan\">transform: scale(x, y)</code> that <code class=\"codespan\">x</code>, <code class=\"codespan\">y</code> has different sign while has <code class=\"codespan\">rotate</code> (e.g., <code class=\"codespan\">scale: (1, -1), rotate(90)</code>).</li>\n</ul>\n</li>\n<li>Standalone <code class=\"codespan\">&lt;style&gt;</code> tag is not supported.<ul>\n<li>But inline style is supported (e.g., <code class=\"codespan\">&lt;path style=&quot;color:red&quot; /&gt;</code>).</li>\n</ul>\n</li>\n<li>Unit:<ul>\n<li>Only <code class=\"codespan\">px</code> is supported. Other unit like <code class=\"codespan\">width=&quot;231.65mm&quot;</code> is not supported.</li>\n<li>Percentage value like <code class=\"codespan\">&lt;svg width=&quot;30%&quot; height=&quot;40%&quot;&gt;</code> is not supported.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">&lt;defs&gt;</code> tag:<ul>\n<li>Only <code class=\"codespan\">&lt;linearGradient&gt;</code>, <code class=\"codespan\">&lt;radialGradient&gt;</code> are supported.</li>\n<li>other elements (e.g., <code class=\"codespan\">&lt;pattern&gt;</code>, <code class=\"codespan\">&lt;path&gt;</code>, ...) defined in <code class=\"codespan\">&lt;defs&gt;</code> are not supported yet.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">&lt;linearGradient&gt;</code>, <code class=\"codespan\">&lt;radialGradient&gt;</code>:<ul>\n<li><code class=\"codespan\">fx</code>, <code class=\"codespan\">fy</code> is not supported.</li>\n<li><code class=\"codespan\">gradientTransform</code> attribute is not supported.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">fill:url(...)</code>, <code class=\"codespan\">stroke:utl(...)</code>:<ul>\n<li>Only <code class=\"codespan\">url(#someId)</code> is supported.</li>\n<li>Other URL patterns are not supported. e.g.,<ul>\n<li><code class=\"codespan\">url(https://example.com/images/myImg.jpg)</code>;</li>\n<li><code class=\"codespan\">url(data:image/png;base64,iRxVB0…)</code>;</li>\n<li><code class=\"codespan\">url(myFont.woff)</code>;</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><code class=\"codespan\">&lt;switch&gt;</code> tag:<ul>\n<li>All the content inside <code class=\"codespan\">&lt;switch&gt;</code> tag will be displayed. The &quot;switch&quot; feature is not supported.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">&lt;text&gt;</code>:<ul>\n<li><code class=\"codespan\">textPath</code> is not supported.</li>\n<li><a href=\"https://www.w3.org/TR/SVG/text.html#TermAddressableCharacter\" target=\"_blank\">Addressable character</a> is not supported. That is,<pre><code class=\"lang-xml\">&lt;!-- Not supported: --&gt;\n&lt;tspan x=&quot;0 4.94 9.89&quot;&gt;abc&lt;/tspan&gt;\n&lt;!-- Supported: --&gt;\n&lt;tspan x=&quot;0&quot;&gt;a&lt;/tspan&gt;\n&lt;tspan x=&quot;4.94&quot;&gt;b&lt;/tspan&gt;\n&lt;tspan x=&quot;9.89&quot;&gt;c&lt;/tspan&gt;\n</code></pre>\n</li>\n</ul>\n</li>\n</ul>\n"},"Supporting ARIA in Charts":{"type":["*"],"description":"<p>The W3C has developed the <a href=\"https://www.w3.org/WAI/intro/aria\" target=\"_blank\">WAI-ARIA</a>, the Accessible Rich Internet Applications Suite, which is dedicated to making web content and web applications accessible. Apache ECharts<sup>TM</sup> 4 complies with this specification by supporting the automatic generation of intelligent descriptions based on chart configuration items, allowing blind people to understand the chart content with the help of a reading device, making the chart accessible to a wider audience.</p>\n<p>By default, ARIA is disabled. To enable it, you should set <a href=\"#aria.enabled\">aria.enabled</a> to be <code class=\"codespan\">true</code>. After enabling, it will generate descriptions based on charts, series, data, and so on. Users may change the generated description.</p>\n<p><strong>For example:</strong></p>\n<p>For config:</p>\n<pre><code class=\"lang-js\">option = {\n    aria: {\n        show: true\n    },\n    title: {\n        text: &#39;Source of user access to a site&#39;,\n        x: &#39;center&#39;\n    },\n    series: [\n        {\n             Name: &#39;access source&#39;,\n            type: &#39;pie&#39;,\n            data: [\n                { value: 335, name: &#39;direct access&#39; },\n                { value: 310, name: &#39;mail marketing&#39; },\n                { value: 234, name: &#39;union ad&#39; },\n                { value: 135, name: &#39;video ad&#39; },\n                { value: 1548, name: &#39;search engine&#39; }\n            ]\n        }\n    ]\n};\n</code></pre>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/aria-pie&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n<p>There should be an <code class=\"codespan\">aria-label</code> attribute on the chart DOM, which can help the disabled understand the content of charts with the help of certain devices. The value of the label is:</p>\n<pre><code>This is a chart of &quot;Source of user access to a site.&quot; The chart type is a pie chart that indicates the source of the visit. The data is - direct access data is 335, mail marketing data is 310, union ad data is 234, video ad data is 135, search engine data is 1548.\n</code></pre><p>The default language is in defined by the language package (Chinese by default), but you can configure it with templates.</p>\n<p>In addition, Apache ECharts 5 now supports applique textures as a secondary expression of color to further differentiate data. If <code class=\"codespan\">aria.enabled</code> is set to <code class=\"codespan\">true</code>, <code class=\"codespan\">aria.decal.show</code> is set to <code class=\"codespan\">true</code> to adopt the default applique style.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/aria-decal-simple&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n\n<p>Next, let&#39;s describe more specifically how these two accessible designs can be configured.</p>\n<h2 id=\"chart-labels\">Chart Labels</h2>\n<h3 id=\"apply-overall-modification-description\">Apply Overall Modification Description</h3>\n<p>For some charts, the default generated descriptions of the data points are not sufficient to represent the overall information. For example, in the scatter plot below, the default description can include the coordinates of the data points, but knowing the coordinates of hundreds or thousands of points does not help us to effectively understand the information presented in the chart.</p>\n<p><img width=\"600\" height=\"auto\" src=\"documents/asset/img/aria-example.png\"></p>\n<p>At this point, the user can specify the overall description of the chart via the <a href=\"option.html#aria.label.description\" target=\"_blank\">aria.label.description</a> configuration item.</p>\n<h3 id=\"customizing-the-template-description\">Customizing the Template Description</h3>\n<p>In addition to modifying descriptions holistically, we also provide templates for generating descriptions that can be easily modified at a fine-grained level.</p>\n<p>The basic flow for generating descriptions is that if <a href=\"option.html#aria.label.show\" target=\"_blank\">aria.label.description</a> is set to <code class=\"codespan\">true</code>, then the accessibility description is generated, otherwise it is not. If <a href=\"option.html#aria.label.description\" target=\"_blank\">aria.label.description</a> is defined, it is used as the full description of the chart, otherwise the description is generated according to the template stitching. We provide a default algorithm for generating descriptions, and only if the generated descriptions are not quite right, we need to modify these templates, or even override them completely with <code class=\"codespan\">aria.description</code>.</p>\n<p>When using the template, whether <a href=\"#title.text\">title.text</a> is used along with <a href=\"option.html#aria.label.general.withTitle\" target=\"_blank\">aria.label.general.withTitle</a> while <a href=\"option.html#aria.label.general.withoutTitle\" target=\"_blank\">aria.label.general.withoutTitle</a> is used if there is no title text. <code class=\"codespan\">aria.general.withTitle</code> supports a template <code class=\"codespan\">&#39;{title}&#39;</code>, which will be replaced with chart title. This means, if <code class=\"codespan\">aria.general.withTitle</code> is set to be <code class=\"codespan\">&#39;The chart title is {title}.&#39;</code> and the chart title is <code class=\"codespan\">Price Distribution</code>, it will be interpreted into <code class=\"codespan\">&#39;The chart title is Price Distribution.&#39;</code></p>\n<p>After generating the title, the description of the series (<a href=\"option.html#aria.label.series\" target=\"_blank\">aria.label.series</a>) and the description of the data for each series (<a href=\"option.html#aria.label.data\" target=\"_blank\">aria.label.data</a>) are generated in turn. The following is an example of a template. Likewise, each template may include template variables to replace actual values.</p>\n<h2 id=\"decal-pattern\">Decal Pattern</h2>\n<p>The way to use the default applique pattern was described above. If you need to customize the decal pattern, you can use <a href=\"option.html#aria.decal.decals\" target=\"_blank\">aria.decal.decals</a> to configure a flexible decal pattern.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/aria-decal&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n<p>Please refer to <a href=\"option.html#aria\" target=\"_blank\">ARIA option</a> for more detail.</p>\n"}}}}
\ 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 Apache ECharts<sup>TM</sup> using one of the following methods:</p>\n<ul>\n<li><p>Download official source release from <a href=\"https://echarts.apache.org/en/download.html\" target=\"_blank\">Apache ECharts website</a>. Then <a href=\"https://github.com/apache/echarts#build\" target=\"_blank\">build</a> from the source release.</p>\n</li>\n<li><p>Download from <a href=\"https://github.com/apache/echarts/releases\" target=\"_blank\">GitHub</a></p>\n</li>\n<li><p>Using npm: <code class=\"codespan\">npm install echarts --save</code>. <a href=\"tutorial.html#Use%20ECharts%20with%20webpack\" target=\"_blank\">Using ECharts with webpack</a></p>\n</li>\n<li><p>Use CDN like <a href=\"https://www.jsdelivr.com/package/npm/echarts\" target=\"_blank\">jsDelivr</a>.</p>\n</li>\n</ul>\n<h2 id=\"including-echarts\">Including ECharts</h2>\n<p>Load <code class=\"codespan\">echarts.min.js</code> with a script tag.</p>\n<pre><code class=\"lang-html\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n    &lt;meta charset=&quot;utf-8&quot;&gt;\n    &lt;!-- including ECharts file --&gt;\n    &lt;script src=&quot;echarts.min.js&quot;&gt;&lt;/script&gt;\n&lt;/head&gt;\n&lt;/html&gt;\n</code></pre>\n<h2 id=\"draw-a-simple-chart\">Draw a simple chart</h2>\n<p>Before drawing charts, we need to prepare a DOM container with width and height for ECharts.</p>\n<pre><code>&lt;body&gt;\n    &lt;!-- preparing a DOM with width and height for ECharts --&gt;\n    &lt;div id=&quot;main&quot; style=&quot;width:600px; height:400px;&quot;&gt;&lt;/div&gt;\n&lt;/body&gt;\n</code></pre><p>Then we can initialize an ECharts instance using <a href=\"api.html#echarts.init\" target=\"_blank\">echarts.init</a>, and create a simple bar chart with <a href=\"api.html#echartsInstance.setOption\" target=\"_blank\">setOption</a>. Below is the complete code.</p>\n<pre><code class=\"lang-html\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n    &lt;meta charset=&quot;utf-8&quot;&gt;\n    &lt;title&gt;ECharts&lt;/title&gt;\n    &lt;!-- including ECharts file --&gt;\n    &lt;script src=&quot;echarts.js&quot;&gt;&lt;/script&gt;\n&lt;/head&gt;\n&lt;body&gt;\n    &lt;!-- prepare a DOM container with width and height --&gt;\n    &lt;div id=&quot;main&quot; style=&quot;width: 600px;height:400px;&quot;&gt;&lt;/div&gt;\n    &lt;script type=&quot;text/javascript&quot;&gt;\n        // based on prepared DOM, initialize echarts instance\n        var myChart = echarts.init(document.getElementById(&#39;main&#39;));\n\n        // specify chart configuration item and data\n        var option = {\n            title: {\n                text: &#39;ECharts entry example&#39;\n            },\n            tooltip: {},\n            legend: {\n                data:[&#39;Sales&#39;]\n            },\n            xAxis: {\n                data: [&quot;shirt&quot;,&quot;cardign&quot;,&quot;chiffon shirt&quot;,&quot;pants&quot;,&quot;heels&quot;,&quot;socks&quot;]\n            },\n            yAxis: {},\n            series: [{\n                name: &#39;Sales&#39;,\n                type: &#39;bar&#39;,\n                data: [5, 20, 36, 10, 10, 20]\n            }]\n        };\n\n        // use configuration item and data specified to show chart\n        myChart.setOption(option);\n    &lt;/script&gt;\n&lt;/body&gt;\n&lt;/html&gt;\n</code></pre>\n<p>You&#39;ve made your first chart!</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/getting-started&reset=1&edit=1\" width=\"600\" height=\"300\" ></iframe>\n\n\n<p>For more examples, go to the <a href=\"https://echarts.apache.org/examples/en/editor.html?c=doc-example/getting-started\" target=\"_blank\">ECharts Gallery</a></p>\n"},"New features in ECharts 5":{"type":["*"],"description":"<p>Data visualization has come a long way in the last few years. Developers no longer expect visualization products to be simple chart creation tools, but have more advanced needs in terms of interaction, performance, data processing, and more.</p>\n<p>Apache ECharts has always been committed to making it easier for developers to create flexible and rich visualizations. In the latest release of Apache ECharts 5, we have focused on enhancing the storytelling of charts, allowing developers to tell the story behind the data in a simpler way.</p>\n<p><img src=\"documents/asset/img/feature-v5/echarts-5-en.png\" width=\"800px\" /></p>\n<p>&quot;The core of Apache ECharts 5 is &quot;Show, do not tell&quot;, which is a comprehensive upgrade of five topics and 15 features around the stroy telling of visualizations, allowing charts to better tell the story behind the data. It helps developers to create visualizations that meet the needs of various scenarios more easily.</p>\n<h2 id=\"storytelling\">Storytelling</h2>\n<p>The importance of animation to human cognition cannot be overstated. In our previous work, we used initialization animations and transition animations to help users understand the connection between data transformations, making the appearance of charts and transformations seem less rigid. This time, we have even enhanced our animation capabilities, even more significantly. We hope to further exploit the role of animation to help users&#39; cognition, and help them understand the story behind the chart more easily with the dynamic stroy function of the chart.</p>\n<h4 id=\"bar-line-racing\">Bar/Line Racing</h4>\n<p>Apache ECharts 5 adds support for dynamically sorted bar-racing and dynamically sorted line-racing charts to help developers easily create time-series charts that show changes in data over time and tell the evolution of data.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=bar-race-country&edit=1&reset=1\" width=\"700\" height=\"400\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=line-race&edit=1&reset=1\" width=\"700\" height=\"400\" ></iframe>\n\n\n<p>The dynamic sorting chart shows the derivation of different categories in the ranking over time. The developer can enable this effect in ECharts with a few simple configuration code.</p>\n<h4 id=\"custom-series-animation\">Custom Series Animation</h4>\n<p>In addition to dynamic sorting charts, Apache ECharts 5 provides even richer and more powerful animations in the custom series, supporting interpolation animations for label value text, transition animations for morph, combine, separate, and other effects of graphics.</p>\n<p>Imagine what amazing visualizations you can create with these dynamic effects!</p>\n<h2 id=\"visual-design\">Visual Design</h2>\n<p>The role of visual design is not only to make the chart look better, but more importantly, a design that conforms to the principles of visualization can help users understand more quickly what the chart is trying to say and eliminate as much misunderstanding as possible from poor design.</p>\n<h4 id=\"overall-design\">Overall Design</h4>\n<p>We have found that a large percentage of developers use the default theme style for ECharts, so it is important to have an elegant default theme design. In Apache ECharts 5, we redesigned the default theme style, optimizing it for different charts and components. For example, we took into account factors such as differentiation between colors, contrast with background colors, and harmony with adjacent colors, and ensured that people with color blindness could clearly distinguish data.</p>\n<p><img src=\"documents/asset/img/feature-v5/theme-color.png\" width=\"400px\" /></p>\n<p>Let&#39;s look at the new version of the light and dark theme styles using the most commonly used bar chart as an example.</p>\n<p><img src=\"documents/asset/img/feature-v5/new-theme-light.png\" width=\"500px\" />\n<img src=\"documents/asset/img/feature-v5/new-theme-dark.png\" width=\"500px\" /></p>\n<p>For the data area zoom, timeline and other interactive components, we also designed a new style and provide a better interactive experience: &lt;img src=&quot;documents/asset/img/feature/v5/new-theme-dark.png</p>\n<p><img src=\"documents/asset/img/feature-v5/dataZoom.png\" width=\"500px\" /></p>\n<p><img src=\"documents/asset/img/feature-v5/timeline.png\" width=\"500px\" /></p>\n<h4 id=\"label\">Label</h4>\n<p>Labels are one of the core elements of a chart, and clear and unambiguous labels help users to have a more accurate understanding of the data. Apache ECharts 5 provides a variety of new labeling features that allow dense labels to be clearly displayed and accurately represented.</p>\n<p>Apache ECharts 5 can be enabled to automatically hide overlapping labels through a configuration item. For labels that exceed the display area, you can choose to automatically truncate or line break them. Dense pie chart labels now have a more aesthetically pleasing automatic layout.</p>\n<p>These features can help avoid text that is too dense and affects readability. And, no additional code needs to be written by the developer for them to take effect by default, greatly simplifying the development cost for developers.</p>\n<p>We also provide several configuration options to allow developers to actively control the layout strategy of tabs, such as tab dragging, overall display at the edge of the canvas, connecting with guide lines and graphical elements, and still linking to highlight the associated relationships.</p>\n<p>The new label feature allows you to have very clear label presentation even in a confined space mobile:</p>\n<p><img src=\"documents/asset/img/feature-v5/pie-label.png\" height=\"150px\" />\n<img src=\"documents/asset/img/feature-v5/pie-label-2.png\" height=\"150px\" /></p>\n<h4 id=\"time-axis\">Time Axis</h4>\n<p>Apache ECharts 5 brings a time axis suitable for expressing timestamp scales. The default design of the time axis highlights important information more prominently and provides more flexible customization capabilities, allowing developers to tailor the time axis&#39;s label content to different needs.</p>\n<p>First of all, the time axis is no longer split absolutely evenly as before, but instead selects more meaningful points like year, month, day, and whole point to display, and can show different levels of scales at the same time. The <code class=\"codespan\">formatter</code> of labels supports templates for time (e.g. <code class=\"codespan\">{yyyy}-{MM}-{dd}</code>), and different <code class=\"codespan\">formatter</code> can be specified for labels with different time granularity, which can be combined with rich text labels to create eye-catching and diverse time effects.</p>\n<p>The display of the time scale at different dataZoom granularities.</p>\n<p><img src=\"documents/asset/img/feature-v5/time-axis.png\" width=\"600px\" /></p>\n<p><img src=\"documents/asset/img/feature-v5/time-axis-2.png\" width=\"600px\" /></p>\n<h4 id=\"tooltip\">Tooltip</h4>\n<p>Tooltip is one of the most commonly used visualization components to help users interactively understand the details of data. In Apache ECharts 5, we have optimized the style of the tooltip, making the default display of the tooltip elegant and clear by adjusting the font style, color, arrow pointing to the graph, border color following the graph color, and other features. The rendering logic of rich text has been improved to ensure that the display is consistent with the HTML way, allowing users to choose different technical solutions to achieve the same effect in different scenarios.</p>\n<p><img src=\"documents/asset/img/feature-v5/new-tooltip.png\" height=\"200px\" />\n<img src=\"documents/asset/img/feature-v5/new-tooltip-2.png\" height=\"200px\" /></p>\n<p>In addition to this, we have also added the ability to sort the list in the tip box by value size or category order this time.</p>\n<h4 id=\"gauge\">Gauge</h4>\n<p>We have seen a lot of cool gauge charts created by community users, but the way they are configured is often complex and tricky. Therefore, we have upgraded the gauge to support image or vector path drawing pointers, anchor configurations, progress bars, rounded corner effects, and more.</p>\n<p>Different styles of gauge pointers.</p>\n<p><img src=\"documents/asset/img/feature-v5/gauge-pointer.png\" width=\"600px\" /></p>\n<p>These upgrades not only allow developers to achieve cool effects with simpler configuration items, but also bring richer customization capabilities.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=gauge-clock&edit=1&reset=1\" width=\"600\" height=\"600\" ></iframe>\n\n\n<h4 id=\"round-corner\">Round Corner</h4>\n<p>Apache ECharts 5 supports round corner for pie charts, sunburst charts, and treemap charts. Don&#39;t underestimate the simplicity of the rounded corners configuration, but combine them with other effects to create a more personalized visualization.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=sunburst-borderRadius&edit=1&reset=1\" width=\"400\" height=\"400\" ></iframe>\n\n\n\n<h2 id=\"interactivity\">Interactivity</h2>\n<p>The interactivity of the visualization helps users explore the work and deepen their understanding of the main idea of the diagram.</p>\n<h4 id=\"multi-state\">Multi-State</h4>\n<p>In ECharts 4, there were two interactive states, <code class=\"codespan\">emphasis</code> and <code class=\"codespan\">normal</code>, graph will enter the <code class=\"codespan\">emphasis</code> state when the mouse hovered to distinguish the data.</p>\n<p>This time in Apache ECharts 5, we have added a new effect of <strong>blur</strong> other non-related elements to the original mouse hover highlighting, so that the target data can be focused.</p>\n<p>For example, in this <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=bar-y-category-stack\" target=\"_blank\">bar chart</a> example, when the mouse hovers over a series, other non-related series will fade out, thus highlighting more clearly the comparison of data in the focused series. of data in the comparison. On diagrams with more complex data structures such as relationship, tree, sunburst, sankey, etc., it is also possible to see the connections between data by fading out non-related elements. Also, colors, shadows, and other styles that can be set in <code class=\"codespan\">emphasis</code> can now be set in <code class=\"codespan\">blur</code>.</p>\n<p>In addition, we&#39;ve added <strong>click to select</strong> to all series, an interaction that was previously only available in a few series such as pie charts and maps, allowing developers to set it to single or multiple selection mode, and to listen to the <code class=\"codespan\">selectchanged</code> event to get all the selected shapes for further processing. As with <code class=\"codespan\">emphasis</code> and <code class=\"codespan\">blur</code>, the selection style can also be configured in <code class=\"codespan\">select</code>.</p>\n<h4 id=\"performance-improvements\">Performance improvements</h4>\n<h5 id=\"dirty-rectangle-rendering\">Dirty Rectangle Rendering</h5>\n<p>Apache ECharts 5 has new support for dirty rectangle rendering to address performance bottlenecks in large scenes with only local changes. When using the Canvas renderer, the dirty rectangle rendering technique detects and updates only the parts of the view that have changed, rather than any changes causing a complete redraw of the canvas. This can help improve rendering frame rates in some special scenarios, such as scenes where the mouse frequently triggers some graphical highlighting many times. In the past for such scenes, additional Canvas layers were used to optimize performance, but this approach is not universal for all scenes and does not work well for complex styles. Dirty Rectangle rendering does a good job of satisfying both performance and display correctness.</p>\n<p>A visual demonstration of a dirty rectangle, with the red boxed area redrawn for the frame.</p>\n<p><img src=\"documents/asset/img/feature-v5/dirty-rect.gif\" width=\"500px\" /></p>\n<p>You can see the effect by enable dirty rectangle optimization on the new example page.</p>\n<h5 id=\"line-chart-performance-optimization-for-real-time-time-series-data\">Line Chart Performance Optimization for Real-Time Time-Series Data</h5>\n<p>In addition, the performance of line graphs with large amounts of data has also seen a significant performance improvement. We often encounter the need for high-performance plotting of large amounts of real-time time-series data, which will be updated every hundreds or tens of milliseconds.</p>\n<p>Apache ECharts 5 deeply optimizes CPU consumption, memory usage, and initialization time in these scenarios, enabling real-time updates (less than 30ms per update) for millions of data, and even rendering within 1s for ten millions of data, with low memory usage and smooth tooltip interactions.</p>\n<h2 id=\"development-experience\">Development Experience</h2>\n<p>We want such a powerful visualization tool to be used by more developers in a simpler way, so the developer experience is also a very important aspect for us.</p>\n<h4 id=\"datasets\">Datasets</h4>\n<p>ECharts 5 enhances the data transformation capabilities of datasets, allowing developers to implement common data processing such as filtering, sorting, aggregating, histogram, simple clustering, regression, etc. in a simple way. Developers can use these functions in a uniform and declarative way, and can easily implement common data operations.</p>\n<h4 id=\"internationalization\">Internationalization</h4>\n<p>The original internationalization implementation of ECharts takes the form of different distribution files packaged according to different language parameters. In this way, the dynamic language and main code are bound together, and the only way to switch languages when using ECharts is to reload different language versions of ECharts distributions.</p>\n<p>Therefore, starting with Apache ECharts 5, the dynamic language is separated from the main code. To switch languages, you only need to load the corresponding language, use the <code class=\"codespan\">registerLocale</code> function to mount the language object in a similar way to mount the theme, and then reinitialize it to complete the language switch.</p>\n<pre><code class=\"lang-js\">// import the lang object and set when init\necharts.registerLocale(&#39;DE&#39;, lang).\necharts.init(DomElement, null, {\n   locale: &#39;DE&#39;\n});\n</code></pre>\n<h4 id=\"typescript-refactoring\">TypeScript Refactoring</h4>\n<p>In order to continue to refactor and develop new features more safely and efficiently, we started the development of Apache ECharts 5 by rewriting the code using TypeScript. The strong typing brought by TypeScript gave us the confidence to refactor the code drastically to achieve more exciting features during the development of ECharts 5.</p>\n<p>For developers, we can also generate better and more code-compliant <code class=\"codespan\">DTS</code> type description files directly from TypeScript code. Until now, ECharts type description files have been maintained by community developers and published to <a href=\"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/echarts\" target=\"_blank\">DefinityTyped</a>, which is a lot of work, so thanks for your contribution.</p>\n<p>In addition, if a developer&#39;s component is introduced on-demand, we provide a <code class=\"codespan\">ComposeOption</code> type method that can combine a configuration item type that contains only the introduced components, which can bring stricter type checking and help you detect unintroduced component types in advance.</p>\n<h2 id=\"accessibility\">Accessibility</h2>\n<p>Apache ECharts has always taken accessibility design seriously, and we want to make the information conveyed by charts equally to be accessed. We also want to make this possible for chart developers at a very low development cost, thus making developers more willing to support the accessibility.</p>\n<p>In the last major release, we supported automatic intelligent generation of chart descriptions based on different chart types and data, making it very easy for developers to support DOM description information for charts. In ECharts 5, we have also made more accessibility improvements to help people with visual impairments better understand the chart content.</p>\n<h4 id=\"theme-colors\">Theme Colors</h4>\n<p>We took accessibility into account when designing the new default theme, and we repeatedly tested the brightness and color values of the colors to help accessibility users clearly identify the chart data.</p>\n<p>Moreover, for developers with further accessibility needs, we also provide special high-contrast themes to further differentiate the data with higher contrast colors.</p>\n<h4 id=\"decal-patterns\">Decal Patterns</h4>\n<p>ECharts 5 also provides a new feature of decals to help users further differentiate data by using patterns to assist with color representation.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/aria-decal-simple&edit=1&reset=1\" width=\"600\" height=\"350\" ></iframe>\n\n\n<p>In addition, decal patterns can also help in some other scenarios, such as: helping to better distinguish data in printed materials like newspapers and books that have only a single color or very few colors; using graphical elements to facilitate a more intuitive understanding of the data by the user.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/aria-decal-newspaper&edit=1&reset=1\" width=\"600\" height=\"350\" ></iframe>\n\n\n\n\n<h2 id=\"summary\">Summary</h2>\n<p>In addition to the features described above, Apache ECharts has been improved in a very large number of details to help developers more easily create charts that good by default, are flexible in configuration, and tell the story behind the data with charts.</p>\n<p>Thank you to all the developers who have used ECharts, and even participated in community contributions, for making Apache ECharts 5 possible. We&#39;ll be working on future developments with even more enthusiasm, and we&#39;ll see you all in 6 with even more enthusiasm!</p>\n"},"ECharts 5 Upgrade Guide":{"type":["*"],"description":"<p>This guide is for those who want to upgrade from echarts 4.x (hereafter <code class=\"codespan\">v4</code>) to echarts 5.x (hereafter <code class=\"codespan\">v5</code>). You can find out what new features <code class=\"codespan\">v5</code> brings that are worth upgrading in <a href=\"tutorial.html#ECharts%205%20Upgrade%20Guide\" target=\"_blank\">New Features in ECharts 5</a>. In most cases, developers won&#39;t need to do anything extra for this upgrade, as echarts has always tried to keep the API as stable and backward-compatible as possible. However, <code class=\"codespan\">v5</code> still brings some breaking changes that require special attention. In addition, in some cases, <code class=\"codespan\">v5</code> provides a better API to replace the previous one, and these superseded APIs will no longer be recommended (though we have tried to be as compatible as possible with these changes). We&#39;ll try to explain these changes in detail in this document.</p>\n<p>Since we added the new <a href=\"tutorial.html#Use%20ECharts%20with%20bundler%20and%20NPM\" target=\"_blank\">tree-shaking API</a> in <code class=\"codespan\">v5.0.1</code>, this documentation is based on <code class=\"codespan\">v5.0.1</code> or higher.</p>\n<h2 id=\"breaking-changes\">Breaking Changes</h2>\n<h4 id=\"default-theme\">Default theme</h4>\n<p>First of all, the default theme has been changed. <code class=\"codespan\">v5</code> has made a lot of changes and optimizations on the theme design. If you still want to keep the colors of the old version, you can manually declare the colors as follows.</p>\n<pre><code class=\"lang-js\">chart.setOption({\n    color: [\n        &#39;#c23531&#39;, &#39;#2f4554&#39;, &#39;#61a0a8&#39;, &#39;#d48265&#39;, &#39;#91c7ae&#39;, &#39;#749f83&#39;,\n        &#39;#ca8622&#39;, &#39;#bda29a&#39;, &#39;#6e7074&#39;, &#39;#546570&#39;, &#39;#c4ccd3&#39;\n    ],\n    // ...\n});\n</code></pre>\n<p>Or, to make a simple <code class=\"codespan\">v4</code> theme.</p>\n<pre><code class=\"lang-js\">var themeEC4 = {\n    color: [\n        &#39;#c23531&#39;, &#39;#2f4554&#39;, &#39;#61a0a8&#39;, &#39;#d48265&#39;, &#39;#91c7ae&#39;, &#39;#749f83&#39;,\n        &#39;#ca8622&#39;, &#39;#bda29a&#39;, &#39;#6e7074&#39;, &#39;#546570&#39;, &#39;#c4ccd3&#39;\n    ]\n};\nvar chart = echarts.init(dom, themeEC4);\nchart.setOption(/* ... */);\n</code></pre>\n<h4 id=\"importing-echarts\">Importing ECharts</h4>\n<h5 id=\"removing-support-for-default-exports\">Removing support for default exports</h5>\n<p>Since <code class=\"codespan\">v5</code>, echarts only provides <code class=\"codespan\">named exports</code>.</p>\n<p>So if you are importing <code class=\"codespan\">echarts</code> like this:</p>\n<pre><code class=\"lang-js\">import echarts from &#39;echarts&#39;;\n// Or import core module\nimport echarts from &#39;echarts/lib/echarts&#39;;\n</code></pre>\n<p>It will throw error in <code class=\"codespan\">v5</code>. You need to change the code as follows to import the entire module.</p>\n<pre><code class=\"lang-js\">import * as echarts from &#39;echarts&#39;;\n// Or\nimport * as echarts from &#39;echarts/lib/echarts&#39;;\n</code></pre>\n<h5 id=\"tree-shaking-api\">tree-shaking API</h5>\n<p>In 5.0.1, we introduced the new <a href=\"tutorial.html#Use%20ECharts%20with%20bundler%20and%20NPM\" target=\"_blank\">tree-shaking API</a></p>\n<pre><code class=\"lang-js\">import * as echarts from &#39;echarts/core&#39;;\nimport { BarChart } from &#39;echarts/charts&#39;;\nimport { GridComponent } from &#39;echarts/components&#39;;\n// Note that the Canvas renderer is no longer included by default and needs to be imported explictly, or import the SVGRenderer if you need to use the SVG rendering mode\nimport { CanvasRenderer } from &#39;echarts/renderers&#39;;\n\necharts.use([BarChart, GridComponent, CanvasRenderer]);\n</code></pre>\n<p>To make it easier for you to know which modules you need to import based on your option, our new example page adds a new feature to generate the three-shakable code, you can check the <code class=\"codespan\">Full Code</code> tab on the example page to see the modules you need to introduce and the related code.</p>\n<p>In most cases, we recommend using the new tree-shaking interface whenever possible, as it maximizes the power of the packaging tool tree-shaking and effectively resolves namespace conflicts and prevents the exposure of internal structures. If you are still using the CommonJS method of writing modules, the previous approach is still supported:</p>\n<pre><code class=\"lang-js\">const echarts = require(&#39;echarts/lib/echarts&#39;);\nrequire(&#39;echarts/lib/chart/bar&#39;);\nrequire(&#39;echarts/lib/component/grid&#39;);\n</code></pre>\n<p>Second, because our source code has been rewritten using TypeScript, <code class=\"codespan\">v5</code> will no longer support importing files from <code class=\"codespan\">echarts/src</code>. You need to change it to import from <code class=\"codespan\">echarts/lib</code>.</p>\n<h5 id=\"dependency-adjustment\">dependency adjustment</h5>\n<blockquote>\n<p>Note: This section is only for developers who use tree-shaking interfaces to ensure a minimal bundle size, not for those who imports the whole package.</p>\n</blockquote>\n<p>In order to keep the size of the bundle small enough, we remove some dependencies that would have been imported by default. For example, as mentioned above, when using the new on-demand interface, <code class=\"codespan\">CanvasRenderer</code> is no longer introduced by default, which ensures that unneeded Canvas rendering code is not imported when only SVG rendering mode is used, and in addition, the following dependencies are adjusted.</p>\n<ul>\n<li>The right-angle coordinate system component is no longer introduced by default when using line charts and bar charts, so the following introduction method was used before<pre><code class=\"lang-js\">const echarts = require(&#39;echarts/lib/echarts&#39;);\nrequire(&#39;echarts/lib/chart/bar&#39;);\nrequire(&#39;echarts/lib/chart/line&#39;);\n</code></pre>\nNeed to introduce the <code class=\"codespan\">grid</code> component separately again<pre><code class=\"lang-js\">require(&#39;echarts/lib/component/grid&#39;);\n</code></pre>\n</li>\n</ul>\n<p>Reference issues: <a href=\"https://github.com/apache/echarts/issues/14080\" target=\"_blank\">#14080</a>, <a href=\"https://github.com/apache/echarts/issues/13764\" target=\"_blank\">#13764</a></p>\n<ul>\n<li><code class=\"codespan\">aria</code> components are no longer imported by default. You need import it manually if necessary.<pre><code class=\"lang-js\">import { AriaComponent } from &#39;echarts/components&#39;;\necharts.use(AriaComponent);\n</code></pre>\nOr<pre><code class=\"lang-js\">require(&#39;echarts/lib/component/aria&#39;);\n</code></pre>\n</li>\n</ul>\n<h4 id=\"removes-built-in-geojson\">removes built-in geoJSON</h4>\n<p><code class=\"codespan\">v5</code> removes the built-in geoJSON (previously in the <code class=\"codespan\">echarts/map</code> folder). These geoJSON files were always sourced from third parties. If users still need them, they can go get them from the old version, or find more appropriate data and register it with ECharts via the registerMap interface.</p>\n<h4 id=\"browser-compatibility\">Browser Compatibility</h4>\n<p>IE8 is no longer supported by <code class=\"codespan\">v5</code>. We no longer maintain and upgrade the previous <a href=\"https://github.com/ecomfe/zrender/tree/4.3.2/src/vml\" target=\"_blank\">VML renderer</a> for IE8 compatibility. If developers have a strong need for a VML renderer, they are welcome to submit a pull request to upgrade the VML renderer or maintain a separate third-party VML renderer, as we support registration of standalone renderers starting with <code class=\"codespan\">v5.0.1</code>.</p>\n<h4 id=\"echarts-configuration-item-adjustment\">ECharts configuration item adjustment</h4>\n<h5 id=\"visual-style-settings-priority-change\">Visual style settings priority change</h5>\n<p>The priority of the visuals between <a href=\"option.html#visualMap\" target=\"_blank\">visualMap component</a> and <a href=\"option.html#series-scatter.itemStyle\" target=\"_blank\">itemStyle</a> | <a href=\"option.html#series-scatter.lineStyle\" target=\"_blank\">lineStyle</a> | <a href=\"option.html#series-scatter.areaStyle\" target=\"_blank\">areaStyle</a> are reversed since <code class=\"codespan\">v5</code>.</p>\n<p>That is, previously in <code class=\"codespan\">v4</code>, the visuals (i.e., color, symbol, symbolSize, ...) that generated by <a href=\"option.html#visualMap\" target=\"_blank\">visualMap component</a> has the highest priority, which will overwrite the same visuals settings in <a href=\"option.html#series-scatter.itemStyle\" target=\"_blank\">itemStyle</a> | <a href=\"option.html#series-scatter.lineStyle\" target=\"_blank\">lineStyle</a> | <a href=\"option.html#series-scatter.areaStyle\" target=\"_blank\">areaStyle</a>. That brought troubles when needing to specify specific style to some certain data items while using <a href=\"option.html#visualMap\" target=\"_blank\">visualMap component</a>. Since <code class=\"codespan\">v5</code>, the visuals specified in <a href=\"option.html#series-scatter.itemStyle\" target=\"_blank\">itemStyle</a> | <a href=\"option.html#series-scatter.lineStyle\" target=\"_blank\">lineStyle</a> | <a href=\"option.html#series-scatter.areaStyle\" target=\"_blank\">areaStyle</a> has the highest priority.</p>\n<p>In most cases, users will probably not notice this change when migrating from <code class=\"codespan\">v4</code> to <code class=\"codespan\">v5</code>. But users can still check that if <a href=\"option.html#visualMap\" target=\"_blank\">visualMap component</a> and <a href=\"option.html#series-scatter.itemStyle\" target=\"_blank\">itemStyle</a> | <a href=\"option.html#series-scatter.lineStyle\" target=\"_blank\">lineStyle</a> | <a href=\"option.html#series-scatter.areaStyle\" target=\"_blank\">areaStyle</a> are both specified.</p>\n<h5 id=\"padding-for-rich-text\"><code class=\"codespan\">padding</code> for rich text</h5>\n<p><code class=\"codespan\">v5</code> adjusts the <a href=\"option.html#series-scatter.label.rich.&lt;style_name&gt;.padding\" target=\"_blank\">rich.?.padding</a> to make it more compliant with CSS specifications. In <code class=\"codespan\">v4</code>, for example <code class=\"codespan\">rich. .padding: [11, 22, 33, 44]</code> means that <code class=\"codespan\">padding-top</code> is <code class=\"codespan\">33</code> and <code class=\"codespan\">padding-bottom</code> is <code class=\"codespan\">11</code>. The position of the top and bottom is adjusted in <code class=\"codespan\">v5</code>, <code class=\"codespan\">rich. .padding: [11, 22, 33, 44]</code> means that <code class=\"codespan\">padding-top</code> is <code class=\"codespan\">11</code> and <code class=\"codespan\">padding-bottom</code> is <code class=\"codespan\">33</code>.</p>\n<p>If the user is using <a href=\"option.html#series-scatter.label.rich.&lt;style_name&gt;.padding\" target=\"_blank\">rich.?.padding</a>, this order needs to be adjusted.</p>\n<h2 id=\"echarts-related-extensions\">ECharts Related Extensions</h2>\n<p>These extensions need to be upgraded to new version to support echarts <code class=\"codespan\">v5</code>:</p>\n<ul>\n<li><a href=\"https://github.com/ecomfe/echarts-gl\" target=\"_blank\">echarts-gl</a></li>\n<li><a href=\"https://github.com/ecomfe/echarts-wordcloud\" target=\"_blank\">echarts-wordcloud</a></li>\n<li><a href=\"https://github.com/ecomfe/echarts-liquidfill\" target=\"_blank\">echarts-liquidfill</a></li>\n</ul>\n<h2 id=\"deprecated-api\">Deprecated API</h2>\n<p>Some of the API and echarts options are deprecated since <code class=\"codespan\">v5</code>, but are still backward compatible. Users can <strong>keep using these deprecated API</strong>, with only some warning will be printed to console in dev mode. But if users have spare time, it is recommended to upgraded to new API for the consideration of long term maintenance.</p>\n<p>The deprecated API and their corresponding new API are listed as follows:</p>\n<ul>\n<li>Transform related props of a graphic element are changed:<ul>\n<li>Changes:<ul>\n<li><code class=\"codespan\">position: [number, number]</code> are changed to <code class=\"codespan\">x: number</code>/<code class=\"codespan\">y: number</code>.</li>\n<li><code class=\"codespan\">scale: [number, number]</code> are changed to <code class=\"codespan\">scaleX: number</code>/<code class=\"codespan\">scaleY: number</code>.</li>\n<li><code class=\"codespan\">origin: [number, number]</code> are changed to <code class=\"codespan\">originX: number</code>/<code class=\"codespan\">originY: number</code>.</li>\n</ul>\n</li>\n<li>The <code class=\"codespan\">position</code>, <code class=\"codespan\">scale</code> and <code class=\"codespan\">origin</code> are still supported but deprecated.</li>\n<li>It effects these places:<ul>\n<li>In the <code class=\"codespan\">graphic</code> components: the declarations of each element.</li>\n<li>In <code class=\"codespan\">custom series</code>: the declarations of each element in the return of <code class=\"codespan\">renderItem</code>.</li>\n<li>Directly use zrender graphic elements.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Text related props on graphic elements are changed:<ul>\n<li>Changes:<ul>\n<li>The declaration of attached text (or say, rect text) are changed.<ul>\n<li>Prop <code class=\"codespan\">style.text</code> are deprecated in elements except <code class=\"codespan\">Text</code>. Instead, Prop set <code class=\"codespan\">textContent</code> and <code class=\"codespan\">textConfig</code> are provided to support more powerful capabilities.</li>\n<li>These related props at the left part below are deprecated. Use the right part below instead.<ul>\n<li>textPosition =&gt; textConfig.position</li>\n<li>textOffset =&gt; textConfig.offset</li>\n<li>textRotation =&gt; textConfig.rotation</li>\n<li>textDistance =&gt; textConfig.distance</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>The props at the left part below are deprecated in <code class=\"codespan\">style</code> and <code class=\"codespan\">style.rich.?</code>. Use the props at the right part below instead.<ul>\n<li>textFill =&gt; fill</li>\n<li>textStroke =&gt; stroke</li>\n<li>textFont =&gt; font</li>\n<li>textStrokeWidth =&gt; lineWidth</li>\n<li>textAlign =&gt; align</li>\n<li>textVerticalAlign =&gt; verticalAlign);</li>\n<li>textLineHeight =&gt;</li>\n<li>textWidth =&gt; width</li>\n<li>textHeight =&gt; hight</li>\n<li>textBackgroundColor =&gt; backgroundColor</li>\n<li>textPadding =&gt; padding</li>\n<li>textBorderColor =&gt; borderColor</li>\n<li>textBorderWidth =&gt; borderWidth</li>\n<li>textBorderRadius =&gt; borderRadius</li>\n<li>textBoxShadowColor =&gt; shadowColor</li>\n<li>textBoxShadowBlur =&gt; shadowBlur</li>\n<li>textBoxShadowOffsetX =&gt; shadowOffsetX</li>\n<li>textBoxShadowOffsetY =&gt; shadowOffsetY</li>\n</ul>\n</li>\n<li>Note: these props are not changed:<ul>\n<li>textShadowColor</li>\n<li>textShadowBlur</li>\n<li>textShadowOffsetX</li>\n<li>textShadowOffsetY</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>It effects these places:<ul>\n<li>In the <code class=\"codespan\">graphic</code> components: the declarations of each element. [compat, but not accurately the same in some complicated cases.]</li>\n<li>In <code class=\"codespan\">custom series</code>: the declarations of each element in the return of <code class=\"codespan\">renderItem</code>. [compat, but not accurately the same in some complicated cases].</li>\n<li>Directly use zrender API to create graphic elements. [No compat, breaking change].</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>API on chart instance:<ul>\n<li><code class=\"codespan\">chart.one(...)</code> is deprecated.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">label</code>:<ul>\n<li>In props <code class=\"codespan\">color</code>, <code class=\"codespan\">textBorderColor</code>, <code class=\"codespan\">backgroundColor</code> and <code class=\"codespan\">borderColor</code>, the value <code class=\"codespan\">&#39;auto&#39;</code> is deprecated. Use the value <code class=\"codespan\">&#39;inherit&#39;</code> instead.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">hoverAnimation</code>:<ul>\n<li>option <code class=\"codespan\">series.hoverAnimation</code> is deprecated. Use <code class=\"codespan\">series.emphasis.scale</code> instead.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">line series</code>:<ul>\n<li>option <code class=\"codespan\">series.clipOverflow</code> is deprecated. Use <code class=\"codespan\">series.clip</code> instead.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">custom series</code>:<ul>\n<li>In <code class=\"codespan\">renderItem</code>, the <code class=\"codespan\">api.style(...)</code> and <code class=\"codespan\">api.styleEmphasis(...)</code> are deprecated. Because it is not really necessary and hard to ensure backward compatibility. Users can fetch system designated visual by <code class=\"codespan\">api.visual(...)</code>.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">sunburst series</code>:<ul>\n<li>Action type <code class=\"codespan\">highlight</code> is deprecated. Use <code class=\"codespan\">sunburstHighlight</code> instead.</li>\n<li>Action type <code class=\"codespan\">downplay</code> is deprecated. Use <code class=\"codespan\">sunburstUnhighlight</code> instead.</li>\n<li>option <code class=\"codespan\">series.downplay</code> is deprecated. Use <code class=\"codespan\">series.blur</code> instead.</li>\n<li>option <code class=\"codespan\">series.highlightPolicy</code> is deprecated. Use <code class=\"codespan\">series.emphasis.focus</code> instead.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">pie series</code>:<ul>\n<li>The action type at the left part below are deprecated. Use the right part instead:<ul>\n<li><code class=\"codespan\">pieToggleSelect</code> =&gt; <code class=\"codespan\">toggleSelect</code></li>\n<li><code class=\"codespan\">pieSelect</code> =&gt; <code class=\"codespan\">select</code></li>\n<li><code class=\"codespan\">pieUnSelect</code> =&gt; <code class=\"codespan\">unselect</code></li>\n</ul>\n</li>\n<li>The event type at the left part below are deprecated. Use the right part instead:<ul>\n<li><code class=\"codespan\">pieselectchanged</code> =&gt; <code class=\"codespan\">selectchanged</code></li>\n<li><code class=\"codespan\">pieselected</code> =&gt; <code class=\"codespan\">selected</code></li>\n<li><code class=\"codespan\">pieunselected</code> =&gt; <code class=\"codespan\">unselected</code></li>\n</ul>\n</li>\n<li>option <code class=\"codespan\">series.label.margin</code> is deprecated. Use <code class=\"codespan\">series.label.edgeDistance</code> instead.</li>\n<li>option <code class=\"codespan\">series.clockWise</code> is deprecated. Use <code class=\"codespan\">series.clockwise</code> instead.</li>\n<li>option <code class=\"codespan\">series.hoverOffset</code> is deprecated. Use <code class=\"codespan\">series.emphasis.scaleSize</code> instead.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">map series</code>:<ul>\n<li>The action type at the left part below are deprecated. Use the right part instead:<ul>\n<li><code class=\"codespan\">mapToggleSelect</code> =&gt; <code class=\"codespan\">toggleSelect</code></li>\n<li><code class=\"codespan\">mapSelect</code> =&gt; <code class=\"codespan\">select</code></li>\n<li><code class=\"codespan\">mapUnSelect</code> =&gt; <code class=\"codespan\">unselect</code></li>\n</ul>\n</li>\n<li>The event type at the left part below are deprecated. Use the right part instead:<ul>\n<li><code class=\"codespan\">mapselectchanged</code> =&gt; <code class=\"codespan\">selectchanged</code></li>\n<li><code class=\"codespan\">mapselected</code> =&gt; <code class=\"codespan\">selected</code></li>\n<li><code class=\"codespan\">mapunselected</code> =&gt; <code class=\"codespan\">unselected</code></li>\n</ul>\n</li>\n<li>option <code class=\"codespan\">series.mapType</code> is deprecated. Use <code class=\"codespan\">series.map</code> instead.</li>\n<li>option <code class=\"codespan\">series.mapLocation</code> is deprecated.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">graph series</code>:<ul>\n<li>option <code class=\"codespan\">series.focusNodeAdjacency</code> is deprecated. Use <code class=\"codespan\">series.emphasis: { focus: &#39;adjacency&#39;}</code> instead.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">gauge series</code>:<ul>\n<li>option <code class=\"codespan\">series.clockWise</code> is deprecated. Use <code class=\"codespan\">series.clockwise</code> instead.</li>\n<li>option <code class=\"codespan\">series.hoverOffset</code> is deprecated. Use <code class=\"codespan\">series.emphasis.scaleSize</code> instead.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">dataZoom component</code>:<ul>\n<li>option <code class=\"codespan\">dataZoom.handleIcon</code> need prefix <code class=\"codespan\">path://</code> if using SVGPath.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">radar</code>:<ul>\n<li>option <code class=\"codespan\">radar.name</code> is deprecated. Use <code class=\"codespan\">radar.axisName</code> instead.</li>\n<li>option <code class=\"codespan\">radar.nameGap</code> is deprecated. Use <code class=\"codespan\">radar.axisNameGap</code> instead.</li>\n</ul>\n</li>\n<li>Parse and format:<ul>\n<li><code class=\"codespan\">echarts.format.formatTime</code> is deprecated. Use <code class=\"codespan\">echarts.time.format</code> instead.</li>\n<li><code class=\"codespan\">echarts.number.parseDate</code> is deprecated. Use <code class=\"codespan\">echarts.time.parse</code> instead.</li>\n<li><code class=\"codespan\">echarts.format.getTextRect</code> is deprecated.</li>\n</ul>\n</li>\n</ul>\n"},"Use ECharts with bundler and NPM":{"type":["*"],"description":"<p>If your development environment uses a package management tool like <code class=\"codespan\">npm</code> or <code class=\"codespan\">yarn</code> and builds with a packaging tool like Webpack, this article will describe how to get a minimal bundle of Apache ECharts<sup>TM</sup> via treeshaking.</p>\n<h2 id=\"npm-installation-of-echarts\">NPM installation of ECharts</h2>\n<p>You can install ECharts via npm using the following command</p>\n<pre><code class=\"lang-shell\">npm install echarts --save\n</code></pre>\n<h2 id=\"introduce-echarts\">Introduce ECharts</h2>\n<pre><code class=\"lang-js\">import * as echarts from &#39;echarts&#39;;\n\n// initialize the echarts instance\nvar myChart = echarts.init(document.getElementById(&#39;main&#39;));\n// Draw the chart\nmyChart.setOption({\n    title: {\n        text: &#39;ECharts Getting Started Example&#39;\n    },\n    tooltip: {},\n    xAxis: {\n        data: [&#39;shirt&#39;, &#39;cardigan&#39;, &#39;chiffon&#39;, &#39;pants&#39;, &#39;heels&#39;, &#39;socks&#39;]\n    },\n    yAxis: {},\n    series: [{\n        name: &#39;sales&#39;,\n        type: &#39;bar&#39;,\n        data: [5, 20, 36, 10, 10, 20]\n    }]\n});\n</code></pre>\n<h2 id=\"importing-required-charts-and-components-to-have-minimal-bundle-\">Importing required charts and components to have minimal bundle.</h2>\n<p>The above code will import all the charts and components in ECharts, but if you don&#39;t want to bring in all the components, you can use the tree-shakeable interface provided by ECharts to bundle the required components and get a minimal bundle.</p>\n<pre><code class=\"lang-js\">// Import the echarts core module, which provides the necessary interfaces for using echarts.\nimport * as echarts from &#39;echarts/core&#39;;\n// Import bar charts, all with Chart suffix\nimport {\n    BarChart\n} from &#39;echarts/charts&#39;;\n// import the tooltip, title, and rectangular coordinate system components, all suffixed with Component\nimport {\n    TitleComponent,\n    TooltipComponent,\n    GridComponent\n} from &#39;echarts/components&#39;;\n// Import the Canvas renderer, note that introducing the CanvasRenderer or SVGRenderer is a required step\nimport {\n    CanvasRenderer\n} from &#39;echarts/renderers&#39;;\n\n// Register the required components\necharts.use(\n    [TitleComponent, TooltipComponent, GridComponent, BarChart, CanvasRenderer]\n);\n\n// The next step is the same as before, initialize the chart and set the configuration items\nvar myChart = echarts.init(document.getElementById(&#39;main&#39;));\nmyChart.setOption({\n    ...\n});\n</code></pre>\n<blockquote>\n<p>Note that in order to keep the size of the package to a minimum, ECharts does not provide any renderer in tree-shakeable interface, so you need to choose to import <code class=\"codespan\">CanvasRenderer</code> or <code class=\"codespan\">SVGRenderer</code> as the renderer. The advantage of this is that if you only need to use the svg rendering mode, the bundle will not include the <code class=\"codespan\">CanvasRenderer</code> module, which is not needed.</p>\n</blockquote>\n<p>The &quot;Full Code&quot; tab on our sample editor page provides a very convenient way to generate a tree-shakable code. It will generate tree-shakable code based on the current option dynamically. You can use it directly in your project.</p>\n<h2 id=\"minimal-option-type-in-typescript\">Minimal Option Type in TypeScript</h2>\n<p>For developers who are using TypeScript to develop ECharts, we provide a type interface to combine the minimal <code class=\"codespan\">EChartsOption</code> type. This stricter type can effectively help you check for missing components or charts.</p>\n<pre><code class=\"lang-ts\">import * as echarts from &#39;echarts/core&#39;;\nimport {\n    BarChart,\n    // The series types are defined with the SeriesOption suffix\n    BarSeriesOption,\n    LineChart,\n    LineSeriesOption\n} from &#39;echarts/charts&#39;;\nimport {\n    TitleComponent,\n    // The component types are defined with the suffix ComponentOption\n    TitleComponentOption,\n    GridComponent,\n    GridComponentOption\n} from &#39;echarts/components&#39;;\nimport {\n    CanvasRenderer\n} from &#39;echarts/renderers&#39;;\n\n// Combine an Option type with only required components and charts via ComposeOption\ntype ECOption = echarts.ComposeOption&lt;\n  BarSeriesOption | LineSeriesOption | TitleComponentOption | GridComponentOption\n&gt;;\n\n// Register the required components\necharts.use(\n    [TitleComponent, TooltipComponent, GridComponent, BarChart, CanvasRenderer]\n);\n\nvar option: ECOption = {\n    ...\n}\n</code></pre>\n"},"ECharts Basic Concepts Overview":{"type":["*"],"description":"<p>This chapter describes some of the common concepts and terms of Apache ECharts<sup>TM</sup>.</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 instance), we can create a <code class=\"codespan\">echarts instance</code> based on that element. Each <code class=\"codespan\">echarts instance</code> takes its DOM element exclusively.</p>\n<p><br></p>\n<p><img width=\"500\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/multiple-ec-instance.jpg\"></p>\n<h2 id=\"series\">Series</h2>\n<p><a href=\"option.html#series\" target=\"_blank\">series</a> is a very common term. In echarts, <a href=\"option.html#series\" target=\"_blank\">series</a> represents a series of value and the diagram generated from them. So the concept <a href=\"option.html#series\" target=\"_blank\">series</a> includes these key points: a series of value, the type of the diagram (<code class=\"codespan\">series.type</code>) and other parameters specified for the mapping from the values to a diagram.</p>\n<p>In echarts, the <code class=\"codespan\">series.type</code> and the &quot;diagram type&quot; are the same concept. <code class=\"codespan\">series.type</code> includes: <a href=\"option.html#series-line\" target=\"_blank\">line</a> (line plot), <a href=\"option.html#series-bar\" target=\"_blank\">bar</a> (bar chart), <a href=\"option.html#series-pie\" target=\"_blank\">pie</a> (pie chart), <a href=\"option.html#series-scatter\" target=\"_blank\">scatter</a> (scatter plot), <a href=\"option.html#series-graph\" target=\"_blank\">graph</a> (graph plot), <a href=\"option.html#series-tree\" target=\"_blank\">tree</a> (tree plot), etc.</p>\n<p>In the example below, there are three <a href=\"option.html#series\" target=\"_blank\">series</a> (<a href=\"option.html#series-pie\" target=\"_blank\">pie</a>, <a href=\"option.html#series-line\" target=\"_blank\">line</a>, <a href=\"option.html#series-bar\" target=\"_blank\">bar</a>) declared in the <code class=\"codespan\">option</code> on the right, where <a href=\"option.html#series.data\" target=\"_blank\">series.data</a> are declared in each series:</p>\n<p><br></p>\n<p><img width=\"700\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/series-all-a.jpg\"></p>\n<p><br></p>\n<p>Similarly, the following example shows another style of <code class=\"codespan\">option</code>, where each series retrieves data from <a href=\"option.html#dataset\" target=\"_blank\">dataset</a>:</p>\n<p><br></p>\n<p><img width=\"600\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/series-all-b.jpg\"></p>\n<h2 id=\"component\">Component</h2>\n<p>Over series, the entities in echarts are abstracted using the term &quot;component&quot;. For example, echarts includes these components: <a href=\"option.html#xAxis\" target=\"_blank\">xAxis</a> (the x axis of Cartesian coordinate system), <a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a> (the y axis of Cartesian coordinate system), <a href=\"option.html#grid\" target=\"_blank\">grid</a> (the baseboard of Cartesian coordinate system), <a href=\"option.html#angleAxis\" target=\"_blank\">angleAxis</a> (the angle axis of polar coordinate system), <a href=\"option.html#radiusAxis\" target=\"_blank\">radiusAxis</a> (the radius axis of polar coordinate system), <a href=\"option.html#polar\" target=\"_blank\">polar</a> (the baseboard of polar coordinate system), <a href=\"option.html#geo\" target=\"_blank\">geo</a> (GEO coordinate system), <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a> (the component for changing the displayed range of data), <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a> (the component for specifying the visual mapping), <a href=\"option.html#tooltip\" target=\"_blank\">tooltip</a> (the tooltip component), <a href=\"option.html#toolbox\" target=\"_blank\">toolbox</a> (the toolbox component), <a href=\"option.html#series\" target=\"_blank\">series</a>, etc.</p>\n<p>Notice that <a href=\"option.html#series\" target=\"_blank\">series</a> is a kind of component, a component for rendering diagram.</p>\n<p>Check the example below. Components (including series) are declared in <code class=\"codespan\">option</code> on the right, and the are finally rendered in the echarts instance.</p>\n<p><br></p>\n<p><img width=\"800\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/components.jpg\"></p>\n<p><br></p>\n<p>Notice: although <a href=\"option.html#series\" target=\"_blank\">series</a> is a kind of component, sometimes we can see phrases like &quot;series and components&quot;. The term &quot;component&quot; in this context actually means &quot;components except series&quot;.</p>\n<h2 id=\"define-charts-using-option\">Define charts using option</h2>\n<p>We have met the term <code class=\"codespan\">option</code> above. Users should use <code class=\"codespan\">option</code> to describe all of their requirements and input it to echarts. The requirements includes: &quot;what does the data like&quot;, &quot;what the diagram we need&quot;, &quot;what components we need&quot;, &quot;what the user interactions we need&quot;, etc. In short, <code class=\"codespan\">option</code> defines: <code class=\"codespan\">data</code>, <code class=\"codespan\">visual mapping</code>, <code class=\"codespan\">interaction</code>.</p>\n<pre><code class=\"lang-js\">// Create an echarts instance.\nvar dom = document.getElementById(&#39;dom-id&#39;);\nvar chart = echarts.init(dom);\n\n// Use option to describe `data`, `visual mapping`, `interaction`, ...\n// `option` is a big JavaScript object.\nvar option = {\n    // Each property represents a kind of components.\n    legend: {...},\n    grid: {...},\n    tooltip: {...},\n    toolbox: {...},\n    dataZoom: {...},\n    visualMap: {...},\n    // If there are more than one components in one kind, we use an array.\n    // For example, there are three x axes here.\n    xAxis: [\n        // Each item represents an instance of component.\n        // `type` is used to indicate the sub-type of the component.\n        {type: &#39;category&#39;, ...},\n        {type: &#39;category&#39;, ...},\n        {type: &#39;value&#39;, ...}\n    ],\n    yAxis: [{...}, {...}],\n    // There are multiple series, using an array.\n    series: [\n        // `type` is also used to indicate the sub-type\n        // (i.e., diagram type) of each series.\n        {type: &#39;line&#39;, data: [[&#39;AA&#39;, 332], [&#39;CC&#39;, 124], [&#39;FF&#39;, 412], ... ]},\n        {type: &#39;line&#39;, data: [2231, 1234, 552, ... ]},\n        {type: &#39;line&#39;, data: [[4, 51], [8, 12], ... ]}\n    }]\n};\n\n// Call `setOption` and input the `option`. And then the\n// echarts instance processes data and renders charts.\nchart.setOption(option);\n</code></pre>\n<p>Data is put in <a href=\"option.html#series.data\" target=\"_blank\">series.data</a> in the above example. And we give another example showing another way, where each series retrieves data from <a href=\"option.html#dataset\" target=\"_blank\">dataset</a>:</p>\n<pre><code class=\"lang-js\">var option = {\n    dataset: {\n        source: [\n            [121, &#39;XX&#39;, 442, 43.11],\n            [663, &#39;ZZ&#39;, 311, 91.14],\n            [913, &#39;ZZ&#39;, 312, 92.12],\n            ...\n        ]\n    },\n    xAxis: {},\n    yAxis: {},\n    series: [\n        // Each series retrieves data from `dataset`. The values in `encode`\n        // are the indices of the dimensions (i.e., column) of `dataset.source`.\n        {type: &#39;bar&#39;, encode: {x: 1, y: 0}},\n        {type: &#39;bar&#39;, encode: {x: 1, y: 2}},\n        {type: &#39;scatter&#39;, encode: {x: 1, y: 3}},\n        ...\n    ]\n};\n</code></pre>\n<h2 id=\"position-a-component\">Position a component</h2>\n<p>These approaches are used to Position a component.</p>\n<p><br></p>\n<p><strong>[Absolute positioning like CSS]</strong></p>\n<p><br></p>\n<p>Most components and series can be absolutely positioned according to <code class=\"codespan\">top</code> / <code class=\"codespan\">right</code> / <code class=\"codespan\">down</code> / <code class=\"codespan\">left</code> / <code class=\"codespan\">width</code> / <code class=\"codespan\">height</code>. This approach is like the absolute positioning in CSS. The absolute positioning is based on the container DOM element of the echarts.</p>\n<p>The value of each attribute can be:</p>\n<ul>\n<li>Absolute value (like <code class=\"codespan\">bottom: 54</code>, means: the distance from the boundary of the echarts container to bottom boundary of the component is <code class=\"codespan\">54</code> pixel).</li>\n<li>Or the percentage based on the width/height of the echarts container (like <code class=\"codespan\">right: &#39;20%&#39;</code>, means: the distance from the boundary of the echarts container to the right boundary of this component is <code class=\"codespan\">20%</code> of the width of the echarts container).</li>\n</ul>\n<p>Check the example below, where the <a href=\"option.html#grid\" target=\"_blank\">grid</a> component (that is the baseboard of a Cartesian coordinate system) are configured with <code class=\"codespan\">left</code>、<code class=\"codespan\">right</code>、<code class=\"codespan\">height</code>、<code class=\"codespan\">bottom</code>.</p>\n<p><br></p>\n<p><img width=\"800\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/locate.jpg\"></p>\n<p><br></p>\n<p>Note that <code class=\"codespan\">left</code> <code class=\"codespan\">right</code> <code class=\"codespan\">width</code> are one group of attributes for horizontal layout, while <code class=\"codespan\">top</code> <code class=\"codespan\">bottom</code> <code class=\"codespan\">height</code> are another group of attributes for vertical layout. The two groups have nothing to do with each other. In each group, it is enough to set only one or at most two attributes. For example, when <code class=\"codespan\">left</code> and <code class=\"codespan\">right</code> have been specified, <code class=\"codespan\">width</code> can be automatically calculated by them.</p>\n<p><br></p>\n<p><strong>[Center-radius positioning]</strong></p>\n<p><br></p>\n<p>A few circular components or series need to be positioned by &quot;center&quot; and &quot;radius&quot;. For example, <a href=\"option.html#series-pie\" target=\"_blank\">pie</a> (pie chart)、<a href=\"option.html#series-sunburst\" target=\"_blank\">sunburst</a> (sunburst chart)、<a href=\"option.html#polar\" target=\"_blank\">polar</a> (polar coordinate system).</p>\n<p>As the name implies, it position the component according to <a href=\"option.html#series-pie.center\" target=\"_blank\">center</a> and <a href=\"option.html#series-pie.radius\" target=\"_blank\">radius</a>.</p>\n<p><br></p>\n<p><strong>[Other positioning]</strong></p>\n<p><br></p>\n<p>A few other components may has their own specific positioning approach. Check their docs before using them.</p>\n<h2 id=\"coordinate-system\">Coordinate system</h2>\n<p>Many series, like <a href=\"option.html#series-line\" target=\"_blank\">line</a>, <a href=\"option.html#series-bar\" target=\"_blank\">bar</a>, <a href=\"option.html#series-scatter\" target=\"_blank\">scatter</a>, <a href=\"option.html#series-heatmap\" target=\"_blank\">heatmap</a>, etc., need to work on a coordinate system. Coordinate system is used to layout each graphic elements and display some ticks and labels. For example, echarts at least provides these coordinate systems: <a href=\"option.html#grid\" target=\"_blank\">Cartesian coordinate system</a>, <a href=\"option.html#polar\" target=\"_blank\">polar coordinate system</a>, <a href=\"option.html#geo\" target=\"_blank\">GEO coordinate system</a>, <a href=\"option.html#singleAxis\" target=\"_blank\">single axis coordinate system</a>, <a href=\"option.html#calendar\" target=\"_blank\">calendar coordinate system</a>, etc. Some other series like <a href=\"option.html#series-pie\" target=\"_blank\">pie</a>, <a href=\"option.html#series-tree\" target=\"_blank\">tree</a>, work independently without any coordinate systems. And still some other series like <a href=\"option.html#series-graph\" target=\"_blank\">graph</a> are available either independently or on some coordinate system, depending on user settings.</p>\n<p>A coordinate system may consist of several components. For example, Cartesian coordinate system consists of <a href=\"option.html#xAxis\" target=\"_blank\">xAxis</a>, <a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a> and <a href=\"option.html#grid\" target=\"_blank\">grid</a> (the baseboard). <a href=\"option.html#xAxis\" target=\"_blank\">xAxis</a> and <a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a> are referenced and assembled by <code class=\"codespan\">grid</code> and work together cooperatively.</p>\n<p>The following example demonstrates the most simple way to use a Cartesian coordinate system, where only <a href=\"option.html#xAxis\" target=\"_blank\">xAxis</a>, <a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a> and a <a href=\"option.html#series-scatter\" target=\"_blank\">scatter series</a> are declared, and <code class=\"codespan\">echarts</code> create and a <code class=\"codespan\">grid</code> implicitly to link them.</p>\n<p><br></p>\n<p><img width=\"450\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/coord-sys-0.jpg\"></p>\n<p><br></p>\n<p>And the following example demonstrates a more complicated case, where two <a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a> share one <a href=\"option.html#xAxis\" target=\"_blank\">xAxis</a>. And the two <code class=\"codespan\">series</code> are also share the <a href=\"option.html#xAxis\" target=\"_blank\">xAxis</a>, but use different <a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a> respectively. The property <a href=\"option.html#series-line.yAxisIndex\" target=\"_blank\">yAxisIndex</a> is used to specify which <a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a> is used.</p>\n<p><br></p>\n<p><img width=\"600\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/coord-sys-1.jpg\"></p>\n<p><br></p>\n<p>The following echarts instance contain more than one <a href=\"option.html#grid\" target=\"_blank\">grid</a>. Each <a href=\"option.html#grid\" target=\"_blank\">grid</a> has its own <a href=\"option.html#xAxis\" target=\"_blank\">xAxis</a> and <a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a>. The properties <a href=\"option.html#series-line.xAxisIndex\" target=\"_blank\">xAxisIndex</a>, <a href=\"option.html#series-line.yAxisIndex\" target=\"_blank\">yAxisIndex</a> and <a href=\"option.html#yAxis.gridIndex\" target=\"_blank\">gridIndex</a> are used to specify the reference relationships.</p>\n<p><br></p>\n<p><img width=\"600\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/coord-sys-2.jpg\"></p>\n<p><br></p>\n<p>Moreover, a type of series is usually available on various coordinate systems. For example, a <a href=\"option.html#series-scatter\" target=\"_blank\">scatter series</a> can work on <a href=\"option.html#grid\" target=\"_blank\">Cartesian coordinate system</a>, <a href=\"option.html#polar\" target=\"_blank\">polar coordinate system</a>, <a href=\"option.html#geo\" target=\"_blank\">GEO coordinate system</a> or other coordinate systems. Similarly, a coordinate system can serve different type of series. As the examples shown above, a <a href=\"option.html#grid\" target=\"_blank\">Cartesian coordinate system</a> serves several <a href=\"option.html#series-line\" target=\"_blank\">line series</a> and <a href=\"option.html#series-bar\" target=\"_blank\">bar series</a>.</p>\n"},"Customized Chart Styles":{"type":["*"],"description":"<p>Apache ECharts<sup>TM</sup> provides a rich amount of configurable items, which can be set in global, series, and data three different levels. Next, let&#39;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/en/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 Nightingale Rose Chart</h2>\n<p><a href=\"#Get%20Started%20with%20ECharts%20in%205%20minutes\">Getting started tutorial</a> introduced how to make a simple bar chart. This time, we are going to make a pie chart. Pie charts use arc length of fans to represent ratio of a certain series in total share. It&#39;s data format is simpler than bar chart, because it only contains one dimension without category. Besides, since it&#39;s not in rectangular system, it doesn&#39;t need <code class=\"codespan\">xAxis</code>、<code class=\"codespan\">yAxis</code> either.</p>\n<pre><code class=\"lang-js\">myChart.setOption({\n    series : [\n        {\n            name: &#39;Reference Page&#39;,\n            type: &#39;pie&#39;,\n            radius: &#39;55%&#39;,\n            data:[\n                {value:400, name:&#39;Searching Engine&#39;},\n                {value:335, name:&#39;Direct&#39;},\n                {value:310, name:&#39;Email&#39;},\n                {value:274, name:&#39;Alliance Advertisement&#39;},\n                {value:235, name:&#39;Video Advertisement&#39;}\n            ]\n        }\n    ]\n})\n</code></pre>\n<p>With the above code, we can create a simple pie chart:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/tutorial-styling-step0&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<p>Here, the value of <code class=\"codespan\">data</code> is not a single value, as that of the example in get started. Instead, it&#39;s an object containing <code class=\"codespan\">name</code> and <code class=\"codespan\">value</code>. Data in ECharts can always be a single value, or a configurable object with name, style and label. You may refer to <a href=\"option.html#series-pie.data\" target=\"_blank\">data</a> for more information.</p>\n<p><a href=\"option.html#series-pie\" target=\"_blank\">Pie charts</a> of EChart can be made into Nightingale rose charts with <a href=\"option.html#series-pie.roseType\" target=\"_blank\">roseType</a> field.</p>\n<pre><code class=\"lang-js\">roseType: &#39;angle&#39;\n</code></pre>\n<p>Nightingale rose charts use radius to represent data value.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/tutorial-styling-step1&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<h2 id=\"configuring-shadow\">Configuring Shadow</h2>\n<p>Commonly used styles of ECharts, like shadow, opacity, color, border-color, border-width, and etc., are set by <a href=\"#series-pie.itemStyle\">itemStyle</a> in series.</p>\n<pre><code class=\"lang-js\">itemStyle: {\n    // shadow size\n    shadowBlur: 200,\n    // horizontal offset of shadow\n    shadowOffsetX: 0,\n    // vertical offset of shadow\n    shadowOffsetY: 0,\n    // shadow color\n    shadowColor: &#39;rgba(0, 0, 0, 0.5)&#39;\n}\n</code></pre>\n<p>The effect after added shadow is:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/tutorial-styling-step2&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<p>Each <code class=\"codespan\">itemStyle</code> has <code class=\"codespan\">emphasis</code> as the highlighted style when mouse hovered. The last example shows the effect of adding shadow by default. But in most situations, we may probably need to add shadow to emphasis when mouse is hovered.</p>\n<pre><code class=\"lang-js\">itemStyle: {\n    emphasis: {\n        shadowBlur: 200,\n        shadowColor: &#39;rgba(0, 0, 0, 0.5)&#39;\n    }\n}\n</code></pre>\n<h2 id=\"dark-background-and-light-text\">Dark Background and Light Text</h2>\n<p>Now, we need to change the whole theme as that shown in the example at the beginning of this tutorial. This can be achieved by changing background color and text color.</p>\n<p>Background is a global configurable object, so we can set it directly with <a href=\"option.html#backgroundColor\" target=\"_blank\">backgroundColor</a> of option.</p>\n<pre><code class=\"lang-js\">setOption({\n    backgroundColor: &#39;#2c343c&#39;\n})\n</code></pre>\n<p>Text style can also be set globally in <a href=\"option.html#textStyle\" target=\"_blank\">textStyle</a>.</p>\n<pre><code class=\"lang-js\">setOption({\n    textStyle: {\n        color: &#39;rgba(255, 255, 255, 0.3)&#39;\n    }\n})\n</code></pre>\n<p>On the other hand, we can also set them in <a href=\"option.html#series-pie.label.textStyle\" target=\"_blank\">label.textStyle</a> of each series.</p>\n<pre><code class=\"lang-js\">label: {\n    textStyle: {\n        color: &#39;rgba(255, 255, 255, 0.3)&#39;\n    }\n}\n</code></pre>\n<p>We also need to set line color of pie chart to be lighter.</p>\n<pre><code class=\"lang-js\">labelLine: {\n    lineStyle: {\n        color: &#39;rgba(255, 255, 255, 0.3)&#39;\n    }\n}\n</code></pre>\n<p>Thus, we can get the following effect.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/tutorial-styling-step3&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<p>Similar to <code class=\"codespan\">itemStyle</code>, <code class=\"codespan\">label</code> and <code class=\"codespan\">labelLine</code> also have <code class=\"codespan\">emphasis</code> children.</p>\n<h2 id=\"setting-fan-colors\">Setting Fan Colors</h2>\n<p>Fan colors can be set in <code class=\"codespan\">itemStyle</code>:</p>\n<pre><code class=\"lang-js\">itemStyle: {\n    // 设置扇形的颜色\n    color: &#39;#c23531&#39;,\n    shadowBlur: 200,\n    shadowColor: &#39;rgba(0, 0, 0, 0.5)&#39;\n}\n</code></pre>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/tutorial-styling-step4&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<p>This is quite similar to our expect effect, except that fan colors should be made darker within shadow area, so as to make a sense of layering and space with blocked light.</p>\n<p>Each fan&#39;s color can be set under <code class=\"codespan\">data</code>:</p>\n<pre><code class=\"lang-js\">data: [{\n    value:400,\n    name:&#39;搜索引擎&#39;,\n    itemStyle: {\n        color: &#39;#c23531&#39;\n    }\n}, ...]\n</code></pre>\n<p>But since we only need the variation of color in this example, there&#39;s a simpler way to map data value to lightness through <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a>.</p>\n<pre><code class=\"lang-js\">visualMap: {\n    // hide visualMap component; use lightness mapping only\n    show: false,\n    // mapping with min value at 80\n    min: 80,\n    // mapping with max value at 600\n    max: 600,\n    inRange: {\n        // mapping lightness from 0 to 1\n        colorLightness: [0, 1]\n    }\n}\n</code></pre>\n<p>The final effect is:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/tutorial-styling-step5&edit=1&reset=1\" width=\"500\" height=\"400\" ></iframe>\n\n\n\n\n\n"},"Overview of Style Customization":{"type":["*"],"description":"<p>This article provides an overview of the different approaches about Apache ECharts<sup>TM</sup> style customization. For example, how to config the color, size, shadow of the graphic elements and labels.</p>\n<blockquote>\n<p>The term &quot;style&quot; 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 might be overlapped, but they are suitable for different scenarios.</p>\n<ul>\n<li>Theme</li>\n<li>Pallette</li>\n<li>Customize style explicitly (itemStyle, lineStyle, areaStyle, label, ...)</li>\n<li>Visual encoding (visualMap component)</li>\n</ul>\n<p>Other article about styling can be check in <a href=\"#Customized%20Chart%20Styles\">Customized Chart Styles</a> and <a href=\"#Visual%20Map%20of%20Data\">Visual Map of Data</a>.</p>\n<p><br></p>\n<hr>\n<p><br></p>\n<p><strong>Theme</strong></p>\n<p>Setting a theme is the simplest way to change the color style. For example, in <a href=\"https://echarts.apache.org/examples/en/index.html\" target=\"_blank\">Examples page</a>, &quot;Theme&quot; can be selected, and view the result directly.</p>\n<p>Since ECharts4, besides the original default theme, ECharts provide another two built-in themes, named &#39;<code class=\"codespan\">&#39;light&#39;</code> and <code class=\"codespan\">&#39;dark&#39;</code>. They can be used as follows:</p>\n<pre><code class=\"lang-js\">var chart = echarts.init(dom, &#39;light&#39;);\n</code></pre>\n<p>or</p>\n<pre><code class=\"lang-js\">var chart = echarts.init(dom, &#39;dark&#39;);\n</code></pre>\n<p>Other themes are not included in ECharts package by default, and need to load them ourselves if we want to use them. Themes can be visited and downloaded in <a href=\"https://echarts.apache.org/en/theme-builder.html\" target=\"_blank\">Theme Builder</a>. Theme can also be created or edited in it. The downloaded theme can be used as follows:</p>\n<p>If a theme is downloaded as a JSON file, we should register it by ourselves, for example:</p>\n<pre><code class=\"lang-js\">var xhr = new XMLHttpRequest();\n// Assume the theme name is &quot;vintage&quot;.\nxhr.open(&#39;GET&#39;, &#39;xxx/xxx/vintage.json&#39;, true);\nxhr.onload = function () {\n    var themeJSON = this.response;\n    echarts.registerTheme(&#39;vintage&#39;, JSON.parse(themeJSON))\n    var chart = echarts.init(dom, &#39;vintage&#39;);\n    // ...\n});\nxhr.send();\n</code></pre>\n<p>If a them is downloaded as a JS file, it will auto register itself:</p>\n<pre><code class=\"lang-js\">// Import the `vintage.js` file in HTML, then:\nvar chart = echarts.init(dom, &#39;vintage&#39;);\n// ...\n</code></pre>\n<p><br></p>\n<hr>\n<p><br></p>\n<p><strong>Palette</strong></p>\n<p>Pallettes can be given in option. They provide a group of colors, which will be auto picked by series and data. We can give a global palette, or exclusive pallette for certain series.</p>\n<pre><code class=\"lang-js\">option = {\n    // Global palette:\n    color: [&#39;#c23531&#39;,&#39;#2f4554&#39;, &#39;#61a0a8&#39;, &#39;#d48265&#39;, &#39;#91c7ae&#39;,&#39;#749f83&#39;,  &#39;#ca8622&#39;, &#39;#bda29a&#39;,&#39;#6e7074&#39;, &#39;#546570&#39;, &#39;#c4ccd3&#39;],\n\n    series: [{\n        type: &#39;bar&#39;,\n        // A palette only work for the series:\n        color: [&#39;#dd6b66&#39;,&#39;#759aa0&#39;,&#39;#e69d87&#39;,&#39;#8dc1a9&#39;,&#39;#ea7e53&#39;,&#39;#eedd78&#39;,&#39;#73a373&#39;,&#39;#73b9bc&#39;,&#39;#7289ab&#39;, &#39;#91ca8c&#39;,&#39;#f49f42&#39;],\n        ...\n    }, {\n        type: &#39;pie&#39;,\n        // A palette only work for the series:\n        color: [&#39;#37A2DA&#39;, &#39;#32C5E9&#39;, &#39;#67E0E3&#39;, &#39;#9FE6B8&#39;, &#39;#FFDB5C&#39;,&#39;#ff9f7f&#39;, &#39;#fb7293&#39;, &#39;#E062AE&#39;, &#39;#E690D1&#39;, &#39;#e7bcf3&#39;, &#39;#9d96f5&#39;, &#39;#8378EA&#39;, &#39;#96BFFF&#39;],\n        ...\n    }]\n}\n</code></pre>\n<p><br></p>\n<hr>\n<p><br></p>\n<p><strong>Customize style explicitly (itemStyle, lineStyle, areaStyle, label, ...)</strong></p>\n<p>It is a common way to set style explicitly. Throughout ECharts <a href=\"option.html\" target=\"_blank\">option</a>, style related options can be set in various place, including <a href=\"option.html#series.itemStyle\" target=\"_blank\">itemStyle</a>, <a href=\"option.html#series-line.lineStyle\" target=\"_blank\">lineStyle</a>, <a href=\"option.html#series-line.areaStyle\" target=\"_blank\">areaStyle</a>, <a href=\"option.html#series.label\" target=\"_blank\">label</a>, etc.</p>\n<p>Generally speaking, all of the built-in components and series follow the naming convention like <code class=\"codespan\">itemStyle</code>, <code class=\"codespan\">lineStyle</code>, <code class=\"codespan\">areaStyle</code>, <code class=\"codespan\">label</code> etc., although they may occur in different place according to different series or components.</p>\n<p>There is another article for style setting, <a href=\"#Customized%20Chart%20Styles\">Customized Chart Styles</a>.</p>\n<p><br></p>\n<hr>\n<p><br></p>\n<p><strong>Style of emphasis state</strong></p>\n<p>When mouse hovering a graphic elements, usually the emphasis style will be displayed. By default, the emphasis style is auto generated by the normal style. However they can be specified by <a href=\"option.html#series-scatter.emphasis\" target=\"_blank\">emphasis</a> property. The options in <a href=\"option.html#series-scatter.emphasis\" target=\"_blank\">emphasis</a> is the same as the ones for normal state, for example:</p>\n<pre><code class=\"lang-js\">option = {\n    series: {\n        type: &#39;scatter&#39;,\n\n        // Styles for normal state.\n        itemStyle: {\n            // Color of the point.\n            color: &#39;red&#39;\n        },\n        label: {\n            show: true,\n            // Text of labels.\n            formatter: &#39;This is a normal label.&#39;\n        },\n\n        // Styles for emphasis state.\n        emphasis: {\n            itemStyle: {\n                // Color in emphasis state.\n                color: &#39;blue&#39;\n            },\n            label: {\n                show: true,\n                // Text in emphasis.\n                formatter: &#39;This is a emphasis label.&#39;\n            }\n        }\n    }\n}\n</code></pre>\n<p>Notice: Before ECharts4, the emphasis style should be written like this:</p>\n<pre><code class=\"lang-js\">option = {\n    series: {\n        type: &#39;scatter&#39;,\n\n        itemStyle: {\n            // Styles for normal state.\n            normal: {\n                color: &#39;red&#39;\n            },\n            // Styles for emphasis state.\n            emphasis: {\n                color: &#39;blue&#39;\n            }\n        },\n\n        label: {\n            // Styles for normal state.\n            normal: {\n                show: true,\n                formatter: &#39;This is a normal label.&#39;\n            },\n            // Styles for emphasis state.\n            emphasis: {\n                show: true,\n                formatter: &#39;This is a emphasis label.&#39;\n            }\n        }\n    }\n}\n</code></pre>\n<p>The option format is still <strong>compatible</strong>, but not recommended. In fact, in most cases, users only set normal style, and use the default emphasis style. So since ECharts4, we support to write style without the &quot;normal&quot; term, which makes the option more simple and neat.</p>\n<p><br></p>\n<hr>\n<p><br></p>\n<p><strong>Visual encoding (visualMap component)</strong></p>\n<p><a href=\"option.html#visualMap\" target=\"_blank\">visualMap component</a> supports config the rule that mapping value to visual channel (color, size, ...). More details can be check in <a href=\"#Visual%20Map%20of%20Data\">Visual Map of Data</a>.</p>\n"},"Loading and Updating of Asynchronous Data":{"type":["*"],"description":"<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 Apache ECharts<sup>TM</sup> is very easy. After initialization, you can pass in data and configuration item through <code class=\"codespan\">setOption</code> after data obtained through  jQuery and other tools at any time.</p>\n<pre><code class=\"lang-js\">var myChart = echarts.init(document.getElementById(&#39;main&#39;));\n\n$.get(&#39;data.json&#39;).done(function (data) {\n    myChart.setOption({\n        title: {\n            text: &#39;asynchronous data loading example&#39;\n        },\n        tooltip: {},\n        legend: {\n            data:[&#39;Sales&#39;]\n        },\n        xAxis: {\n            data: data.categories\n        },\n        yAxis: {},\n        series: [{\n            name: &#39;Sales&#39;,\n            type: &#39;bar&#39;,\n            data: data.data\n        }]\n    });\n});\n</code></pre>\n<p>Or, you may set other styles, displaying an empty rectangular axis, and then fill in data when ready.</p>\n<pre><code class=\"lang-js\">var myChart = echarts.init(document.getElementById(&#39;main&#39;));\n// show title. legend and empty axis\nmyChart.setOption({\n    title: {\n        text: &#39;asynchronous data loading example&#39;\n    },\n    tooltip: {},\n    legend: {\n        data:[&#39;Sales&#39;]\n    },\n    xAxis: {\n        data: []\n    },\n    yAxis: {},\n    series: [{\n        name: &#39;Sales&#39;,\n        type: &#39;bar&#39;,\n        data: []\n    }]\n});\n\n// Asynchronous data loading\n$.get(&#39;data.json&#39;).done(function (data) {\n    // fill in data\n    myChart.setOption({\n        xAxis: {\n            data: data.categories\n        },\n        series: [{\n            // find series by name\n            name: &#39;Sales&#39;,\n            data: data.data\n        }]\n    });\n});\n</code></pre>\n<p>For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/tutorial-async&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<p>In ECharts, updating data need to find the corresponding series through <code class=\"codespan\">name</code>. In the above example, updating can be performed correctly according to series order if <code class=\"codespan\">name</code> is not defined. But in most cases, it is recommended to update data with series <code class=\"codespan\">name</code> information.</p>\n<h2 id=\"loading-animation\">Loading Animation</h2>\n<p>If data loading time is too long, an empty axis on the canvas may confuse users. In this case, a loading animation is needed to tell the user that it&#39;s still loading.</p>\n<p>ECharts provides a simple loading animation by default. You only need <a href=\"api.html#echartsInstance.showLoading\" target=\"_blank\">showLoading</a> to show, and then use <a href=\"api.html#echartsInstance.hideLoading\" target=\"_blank\">hideLoading</a> to hide loading animation after data loading.</p>\n<pre><code class=\"lang-js\">myChart.showLoading();\n$.get(&#39;data.json&#39;).done(function (data) {\n    myChart.hideLoading();\n    myChart.setOption(...);\n});\n</code></pre>\n<p>Effects are as followed:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/tutorial-loading&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<h2 id=\"dynamic-data-updating\">Dynamic Data Updating</h2>\n<p>ECharts is driven by data. Change of data changes the presentation of chart, therefore, implementing dynamic data updating is extremely easy.</p>\n<p>All data updating are through <a href=\"#api.html#echartsInstance.setOption\">setOption</a>. You only need to get data as you wish, fill in data to <a href=\"#api.html#echartsInstance.setOption\">setOption</a> without considering the changes brought by data, ECharts will find the difference between two group of data and present the difference through proper animation.</p>\n<blockquote>\n<p>In ECharts 3, addData in ECharts 2 is removed.If a single data needs to be added, you can first data.push(value) and then setOption.</p>\n</blockquote>\n<p>See details in the following example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/tutorial-dynamic-data&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n\n"},"Dataset":{"type":["*"],"description":"<p><code class=\"codespan\">dataset</code> component is published since Apache ECharts<sup>TM</sup> 4. <code class=\"codespan\">dataset</code> brings convenience in data management separated with styles and enables data reuse by different series. More importantly, it 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: {\n        type: &#39;category&#39;,\n        data: [&#39;Matcha Latte&#39;, &#39;Milk Tea&#39;, &#39;Cheese Cocoa&#39;, &#39;Walnut Brownie&#39;]\n    },\n    yAxis: {},\n    series: [\n        {\n            type: &#39;bar&#39;,\n            name: &#39;2015&#39;,\n            data: [89.3, 92.1, 94.4, 85.4]\n        },\n        {\n            type: &#39;bar&#39;,\n            name: &#39;2016&#39;,\n            data: [95.8, 89.4, 91.2, 76.9]\n        },\n        {\n            type: &#39;bar&#39;,\n            name: &#39;2017&#39;,\n            data: [97.7, 83.1, 92.5, 78.1]\n        }\n    ]\n}\n</code></pre>\n<p>This approach is easy to be understand and is flexible when some series needs special data definitions. But the shortcomings are also obvious: some data extra works are usually needed to split the original data to each series, and it not supports sharing data in different series, moreover, it is not good for encode.</p>\n<p>ECharts4 starts to provide <code class=\"codespan\">dataset</code> component, which brings benefits below:</p>\n<ul>\n<li>Benefit from <code class=\"codespan\">dataset</code>, we can follow the common methodology of data visualization: based on data, specify the mapping (via the option <a href=\"option.html#series.encode\" target=\"_blank\">encode</a>) from data to visual.</li>\n<li>Data can be managed and configured separately from other configurations.</li>\n<li>Data can be reused by different series and components.</li>\n<li>Support more common data format (like 2d-array, object-array), to avoid data transform works for users.</li>\n</ul>\n<h2 id=\"get-started\">Get started</h2>\n<p>This is a simplest example of <code class=\"codespan\">dataset</code>:</p>\n<pre><code class=\"lang-js\">option = {\n    legend: {},\n    tooltip: {},\n    dataset: {\n        // Provide data.\n        source: [\n            [&#39;product&#39;, &#39;2015&#39;, &#39;2016&#39;, &#39;2017&#39;],\n            [&#39;Matcha Latte&#39;, 43.3, 85.8, 93.7],\n            [&#39;Milk Tea&#39;, 83.1, 73.4, 55.1],\n            [&#39;Cheese Cocoa&#39;, 86.4, 65.2, 82.5],\n            [&#39;Walnut Brownie&#39;, 72.4, 53.9, 39.1]\n        ]\n    },\n    // Declare X axis, which is a category axis, mapping\n    // to the first column by default.\n    xAxis: {type: &#39;category&#39;},\n    // Declare Y axis, which is a value axis.\n    yAxis: {},\n    // Declare several series, each of them mapped to a\n    // column of the dataset by default.\n    series: [\n        {type: &#39;bar&#39;},\n        {type: &#39;bar&#39;},\n        {type: &#39;bar&#39;}\n    ]\n}\n</code></pre>\n<p>This is the result:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=dataset-simple0&edit=1&reset=1\" width=\"500\" height=\"300\" ></iframe>\n\n\n<p>Or the common format object-array is also supported:</p>\n<pre><code class=\"lang-js\">option = {\n    legend: {},\n    tooltip: {},\n    dataset: {\n        // Here the declared `dimensions` is mainly for providing the order of\n        // the dimensions, which enables ECharts to apply the default mapping\n        // from dimensions to axes.\n        // Alternatively, we can declare `series.encode` to specify the mapping,\n        // which will be introduced later.\n        dimensions: [&#39;product&#39;, &#39;2015&#39;, &#39;2016&#39;, &#39;2017&#39;],\n        source: [\n            {product: &#39;Matcha Latte&#39;, &#39;2015&#39;: 43.3, &#39;2016&#39;: 85.8, &#39;2017&#39;: 93.7},\n            {product: &#39;Milk Tea&#39;, &#39;2015&#39;: 83.1, &#39;2016&#39;: 73.4, &#39;2017&#39;: 55.1},\n            {product: &#39;Cheese Cocoa&#39;, &#39;2015&#39;: 86.4, &#39;2016&#39;: 65.2, &#39;2017&#39;: 82.5},\n            {product: &#39;Walnut Brownie&#39;, &#39;2015&#39;: 72.4, &#39;2016&#39;: 53.9, &#39;2017&#39;: 39.1}\n        ]\n    },\n    xAxis: {type: &#39;category&#39;},\n    yAxis: {},\n    series: [\n        {type: &#39;bar&#39;},\n        {type: &#39;bar&#39;},\n        {type: &#39;bar&#39;}\n    ]\n};\n</code></pre>\n<h2 id=\"mapping-from-data-to-graphic\">Mapping from data to graphic</h2>\n<p>In this tutorial, we make charts following this methodology: base on data, config the rule to map data to graphic, namely, encode the data to graphic.</p>\n<p>Generally, this mapping can be performed:</p>\n<ul>\n<li>Configure whether columns or rows of a dataset will mapped to series, namely, the series layout on the columns or rows of a dataset. This can be specified by <a href=\"option.html#series.seriesLayoutBy\" target=\"_blank\">series.seriesLayoutBy</a>. <code class=\"codespan\">&#39;column&#39;</code> is the default value.</li>\n<li>Configure the mapping rule from dimensions (a dimension means a column/row) to axes in coordinate system, tooltip, labels, color, symbol size, etc. This can be specified by <a href=\"option.html#series.encode\" target=\"_blank\">series.encode</a> and <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a> (if visual encoding is required). The example above does not give a mapping rule, so ECharts make default mapping by common sense: because x axis is a category axis, the first column is mapped to the x axis, and each series use each subsequent column in order.</li>\n</ul>\n<p>Let&#39;s illustrate them in detail below.</p>\n<h2 id=\"mapping-by-column-or-row\">Mapping by column or row</h2>\n<p>Giving dataset, users can configure whether columns or rows of a dataset will be mapped to series, namely, the series layout on the columns or rows of a dataset. This can be specified by <a href=\"option.html#series.seriesLayoutBy\" target=\"_blank\">series.seriesLayoutBy</a>. The optional values are:</p>\n<ul>\n<li>&#39;column&#39;: series are positioned on each columns of the dataset. Default value.</li>\n<li>&#39;row&#39;: series are positioned on each row of the dataset.</li>\n</ul>\n<p>See the example below:</p>\n<pre><code class=\"lang-js\">option = {\n    legend: {},\n    tooltip: {},\n    dataset: {\n        source: [\n            [&#39;product&#39;, &#39;2012&#39;, &#39;2013&#39;, &#39;2014&#39;, &#39;2015&#39;],\n            [&#39;Matcha Latte&#39;, 41.1, 30.4, 65.1, 53.3],\n            [&#39;Milk Tea&#39;, 86.5, 92.1, 85.7, 83.1],\n            [&#39;Cheese Cocoa&#39;, 24.1, 67.2, 79.5, 86.4]\n        ]\n    },\n    xAxis: [\n        {type: &#39;category&#39;, gridIndex: 0},\n        {type: &#39;category&#39;, gridIndex: 1}\n    ],\n    yAxis: [\n        {gridIndex: 0},\n        {gridIndex: 1}\n    ],\n    grid: [\n        {bottom: &#39;55%&#39;},\n        {top: &#39;55%&#39;}\n    ],\n    series: [\n        // These series is in the first cartesian (grid), and each\n        // is mapped to a row.\n        {type: &#39;bar&#39;, seriesLayoutBy: &#39;row&#39;},\n        {type: &#39;bar&#39;, seriesLayoutBy: &#39;row&#39;},\n        {type: &#39;bar&#39;, seriesLayoutBy: &#39;row&#39;},\n        // These series is in the second cartesian (grid), and each\n        // is mapped to a column.\n        {type: &#39;bar&#39;, xAxisIndex: 1, yAxisIndex: 1},\n        {type: &#39;bar&#39;, xAxisIndex: 1, yAxisIndex: 1},\n        {type: &#39;bar&#39;, xAxisIndex: 1, yAxisIndex: 1},\n        {type: &#39;bar&#39;, xAxisIndex: 1, yAxisIndex: 1}\n    ]\n}\n</code></pre>\n<p>This is the result:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=dataset-series-layout-by&edit=1&reset=1\" width=\"800\" height=\"600\" ></iframe>\n\n\n\n<h2 id=\"dimension\">Dimension</h2>\n<p>Before introducing <code class=\"codespan\">encode</code>, we should clarify the concept of <code class=\"codespan\">dimension</code>.</p>\n<p>Most of common charts describe data in the format of &quot;two-dimensions table&quot; (note that the meaning of the word &quot;dimension&quot; in &quot;two-dimension table&quot; is not the same as the dimensions in ECharts. \bIn order not to be confusing, we use &quot;2d-table&quot;, &quot;2d-array&quot; below). In the examples above, we use 2d-array to carry the 2d-table. When we set <code class=\"codespan\">seriesLayoutBy</code> as <code class=\"codespan\">&#39;column&#39;</code>, namely, mapping columns to series, each column is called a dimension, and each row is a data item. When we set <code class=\"codespan\">seriesLayoutBy</code> as <code class=\"codespan\">&#39;row&#39;</code>, namely, mapping rows to series, each row is called a dimension, and each column is a data item.</p>\n<p>Dimension can have its name to displayed on charts. Dimension name can be defined on the first row/column. Take the code above as an example, <code class=\"codespan\">&#39;score&#39;</code>、<code class=\"codespan\">&#39;amount&#39;</code>、<code class=\"codespan\">&#39;product&#39;</code> are dimension names, and data start from the second row. By default ECharts auto detect whether the first row/column of <code class=\"codespan\">dataset.source</code> is dimension name or data. Use can also set <code class=\"codespan\">dataset.sourceHeader</code> as <code class=\"codespan\">true</code> to mandatorily specify the first row/column is dimension name, or set as <code class=\"codespan\">false</code> to indicate the data start from the first row/column.</p>\n<p>The definitions of the dimensions can also be provided separately in <code class=\"codespan\">dataset.dimensions</code> or <code class=\"codespan\">series.dimensions</code>, where not only dimension name, but also dimension type can be specified:</p>\n<pre><code class=\"lang-js\">var option1 = {\n    dataset: {\n        dimensions: [\n            // Each item can be object or string.\n            {name: &#39;score&#39;},\n            // A string indicates the dimension name.\n            &#39;amount&#39;,\n            // Dimension type can be specified.\n            {name: &#39;product&#39;, type: &#39;ordinal&#39;}\n        ],\n        source: [...]\n    },\n    ...\n};\n\nvar option2 = {\n    dataset: {\n        source: [...]\n    },\n    series: {\n        type: &#39;line&#39;,\n        // Dimensions declared in series will be adapted with higher priority.\n        dimensions: [\n            null, // Set as null means we dont want to set dimension name.\n            &#39;amount&#39;,\n            {name: &#39;product&#39;, type: &#39;ordinal&#39;}\n        ]\n    },\n    ...\n};\n</code></pre>\n<p>Generally, we do not need to set dimensions types, because it can be auto detected based on data by ECharts. But in some cases, for example, the data is empty, the detection might not be accurate, where dimension type can be set manually.</p>\n<p>The optional values of dimension types can be:</p>\n<ul>\n<li><code class=\"codespan\">&#39;number&#39;</code>: Normal data, default value.</li>\n<li><code class=\"codespan\">&#39;ordinal&#39;</code>: Represents string data like category data or text data. ECharts will auto detect them by default. They can be set manually if the detection fail.</li>\n<li><code class=\"codespan\">&#39;time&#39;</code>: Represents time data, where it is supported that parse time string to timestamp. For example, if users need to parse &#39;2017-05-10&#39; to timestamp, it should be set as <code class=\"codespan\">time</code> type. If the dimension is used on a time axis (<a href=\"option.html#xAxis.type\" target=\"_blank\">axis.type</a> is <code class=\"codespan\">&#39;time&#39;</code>), it will be auto set to <code class=\"codespan\">time</code> type. The supported time string is listed in <a href=\"option.html#series.data\" target=\"_blank\">data</a>.</li>\n<li><code class=\"codespan\">&#39;float&#39;</code>: If set as <code class=\"codespan\">&#39;float&#39;</code>, it will be stored in <code class=\"codespan\">TypedArray</code>, which is good for performance optimization.</li>\n<li><code class=\"codespan\">&#39;int&#39;</code>: If set as <code class=\"codespan\">&#39;int&#39;</code>, it will be stored in <code class=\"codespan\">TypedArray</code>, which is good for performance optimization.</li>\n</ul>\n<h2 id=\"mapping-from-data-to-graphic-encode-\">Mapping from data to graphic (encode)</h2>\n<p>Having the concept of dimension clarified, we can use <a href=\"option.html#series.encode\" target=\"_blank\">encode</a> to map data to graphic:</p>\n<pre><code class=\"lang-js\">var option = {\n    dataset: {\n        source: [\n            [&#39;score&#39;, &#39;amount&#39;, &#39;product&#39;],\n            [89.3, 58212, &#39;Matcha Latte&#39;],\n            [57.1, 78254, &#39;Milk Tea&#39;],\n            [74.4, 41032, &#39;Cheese Cocoa&#39;],\n            [50.1, 12755, &#39;Cheese Brownie&#39;],\n            [89.7, 20145, &#39;Matcha Cocoa&#39;],\n            [68.1, 79146, &#39;Tea&#39;],\n            [19.6, 91852, &#39;Orange Juice&#39;],\n            [10.6, 101852, &#39;Lemon Juice&#39;],\n            [32.7, 20112, &#39;Walnut Brownie&#39;]\n        ]\n    },\n    xAxis: {},\n    yAxis: {type: &#39;category&#39;},\n    series: [\n        {\n            type: &#39;bar&#39;,\n            encode: {\n                // Map dimension &quot;amount&quot; to the X axis.\n                x: &#39;amount&#39;,\n                // Map dimension &quot;product&quot; to the Y axis.\n                y: &#39;product&#39;\n            }\n        }\n    ]\n};\n</code></pre>\n<p>This is the result:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/dataset-encode-simple0&edit=1&reset=1\" width=\"500\" height=\"300\" ></iframe>\n\n\n\n<p>The basic structure of <a href=\"option.html#series.encode\" target=\"_blank\">encode</a> is illustrated as follows, where the left part of colon is the name of axis like <code class=\"codespan\">&#39;x&#39;</code>, <code class=\"codespan\">&#39;y&#39;</code>, <code class=\"codespan\">&#39;radius&#39;</code>, <code class=\"codespan\">&#39;angle&#39;</code> or some special reserved names like &quot;tooltip&quot;, &quot;itemName&quot; etc., and the right part of the colon is the dimension names or dimension indices (based on 0). One or more dimensions can be specified. Usually not all of mappings need to be specified, only specify needed ones.</p>\n<p>The properties available in <code class=\"codespan\">encode</code> listed as follows:</p>\n<pre><code class=\"lang-js\">// In any of the series and coordinate systems,\n// these properties are available:\nencode: {\n    // Display dimension &quot;product&quot; and &quot;score&quot; in the tooltip.\n    tooltip: [&#39;product&#39;, &#39;score&#39;]\n    // Set the series name as the concat of the names of dimensions[1] and dimensions[3].\n    // (sometimes the dimension names are too long to type in series.name manually).\n    seriesName: [1, 3],\n    // Using dimensions[2] as the id of each data item. This is useful when dynamically\n    // update data by `chart.setOption()`, where the new and old data item can be\n    // corresponded by id, by which the appropriate animation can be performed when updating.\n    itemId: 2,\n    // Using dimensions[3] as the name of each data item. This is useful in charts like\n    // &#39;pie&#39;, &#39;funnel&#39;, where data item name can be displayed in legend.\n    itemName: 3\n}\n\n// These properties only work in cartesian(grid) coordinate system:\nencode: {\n    // Map dimensions[1], dimensions[5] and dimension &quot;score&quot; to the X axis.\n    x: [1, 5, &#39;score&#39;],\n    // Map dimensions[0] to the Y axis.\n    y: 0\n}\n\n// These properties only work in polar coordinate system:\nencode: {\n    radius: 3,\n    angle: 2,\n    ...\n}\n\n// These properties only work in geo coordinate system:\nencode: {\n    lng: 3,\n    lat: 2\n}\n\n// For some type of series that are not in any coordinate system,\n// like &#39;pie&#39;, &#39;funnel&#39; etc.:\nencode: {\n    value: 3\n}\n</code></pre>\n<p>There is an other example for <code class=\"codespan\">encode</code>:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=dataset-encode1&edit=1&reset=1\" width=\"800\" height=\"600\" ></iframe>\n\n\n\n\n\n<h2 id=\"visual-encoding-color-symbol-etc-\">Visual encoding (color, symbol, etc.)</h2>\n<p>We can use <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a> component to map data to visual channel like color, symbol size, etc.. More info about it can be checked in its <a href=\"option.html#visualMap\" target=\"_blank\">doc</a>.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=dataset-encode0&edit=1&reset=1\" width=\"500\" height=\"400\" ></iframe>\n\n\n\n\n<h2 id=\"default-encoding\">Default encoding</h2>\n<p>For some common cases (line chart, bar chart, scatter plot, candlestick, pie, funnel, etc.), EChart provides default encoding settings, by which chart will be displayed even if no <code class=\"codespan\">encode</code> option is specified. (If <code class=\"codespan\">encode</code> option is specified, default encoding will not be applied.) The rule of default encoding should not be too complicated. Basically it is:</p>\n<ul>\n<li>In coordinate system (like cartesian(grid), polar):<ul>\n<li>If category axis (i.e., axis.type is <code class=\"codespan\">&#39;category&#39;</code>) exists, map the first column/row to the axis, and each series use a following column/row.</li>\n<li>If no category axis exists, and the coordinate system contains two axis (like X Y in cartesian), each series use two columns/rows, one for a axis.</li>\n</ul>\n</li>\n<li>If no coordinate system (like pie chart):<ul>\n<li>Use the first column/row as item name, and the second column/row as item value.</li>\n</ul>\n</li>\n</ul>\n<p>If the default rule does not meet the requirements, configure the <code class=\"codespan\">encode</code> yourself please.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=dataset-default&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n\n<h2 id=\"q-a\">Q &amp; A</h2>\n<p>Q: How to map the third column to X axis, and map the fifth column to Y axis?</p>\n<p>A:</p>\n<pre><code class=\"lang-js\">series: {\n    // Notice that the dimension index is based on 0,\n    // thus the third column is dimensions[2].\n    encode: {x: 2, y: 4},\n    ...\n}\n</code></pre>\n<p>Q: How to map the third row th X axis, and map the fifth row to Y axis?</p>\n<p>A:</p>\n<pre><code class=\"lang-js\">series: {\n    encode: {x: 2, y: 4},\n    seriesLayoutBy: &#39;row&#39;,\n    ...\n}\n</code></pre>\n<p>Q: How to use the values in the second column in label.</p>\n<p>A:\nThe <a href=\"option.html#series.label.formatter\" target=\"_blank\">label.formatter</a> supports refer value in a certain dimension. For example:</p>\n<pre><code class=\"lang-js\">series: {\n    label: {\n        // `&#39;{@score}&#39;` means use the value in the &quot;score&quot; dimension.\n        // `&#39;{@[4]}&#39;` means use the value in dimensions[4].\n        formatter: &#39;aaa{@product}bbb{@score}ccc{@[4]}ddd&#39;\n    }\n}\n</code></pre>\n<p>Q: How to display the second column and the third column in tooltip?</p>\n<p>A:</p>\n<pre><code class=\"lang-js\">series: {\n    encode: {\n        tooltip: [1, 2]\n        ...\n    },\n    ...\n}\n</code></pre>\n<p>Q: If there is no dimension name in dataset.source, how to give dimension name?</p>\n<p>A:</p>\n<pre><code class=\"lang-js\">dataset: {\n    dimensions: [&#39;score&#39;, &#39;amount&#39;],\n    source: [\n        [89.3, 3371],\n        [92.1, 8123],\n        [94.4, 1954],\n        [85.4, 829]\n    ]\n}\n</code></pre>\n<p>Q: How to encode the third column in bubble size in bubble plot?</p>\n<p>A:</p>\n<pre><code class=\"lang-js\">var option = {\n    dataset: {\n        source: [\n            [12, 323, 11.2],\n            [23, 167, 8.3],\n            [81, 284, 12],\n            [91, 413, 4.1],\n            [13, 287, 13.5]\n        ]\n    },\n    // Use visualMap to perform visual encoding.\n    visualMap: {\n        show: false,\n        dimension: 2, // Encode the third column.\n        min: 2, // Min value is required in visualMap component.\n        max: 15, // Max value is required in visualMap component.\n        inRange: {\n            // The range of bubble size, from 5 pixel to 60 pixel.\n            symbolSize: [5, 60]\n        }\n    },\n    xAxis: {},\n    yAxis: {},\n    series: {\n        type: &#39;scatter&#39;\n    }\n};\n</code></pre>\n<p>Q: We have specified <code class=\"codespan\">encode</code>, but why it does not work?</p>\n<p>A: Maybe we can try to check typo, for example, the dimension name is <code class=\"codespan\">&#39;Life Expectancy&#39;</code>, be we typed <code class=\"codespan\">&#39;Life Expectency&#39;</code> in <code class=\"codespan\">encode</code> option.</p>\n<h2 id=\"various-formats-in-dataset\">Various formats in dataset</h2>\n<p>In lots of cases, data is described in 2d-table. For example, some data processing software like MS Excel, Numbers are based on 2d-table. The data can be exported as JSON format and input to <code class=\"codespan\">dataset.source</code>.</p>\n<blockquote>\n<p>Some csv tools can be used to export the table data to JSON, for example, <a href=\"https://github.com/d3/d3-dsv\" target=\"_blank\">dsv</a> or <a href=\"https://github.com/mholt/PapaParse\" target=\"_blank\">PapaParse</a>.</p>\n</blockquote>\n<p>In common used data transfer formats in JavaScript, 2d-array is a good choice to carry table data, which has been illustrated in the examples above.</p>\n<p>Besides, 2d-array, <code class=\"codespan\">dataset</code> also support key-value format as follows, which is also commonly used. But notice, the option <a href=\"option.html#series.seriesLayoutBy\" target=\"_blank\">seriesLayoutBy</a> is not supported in this format.</p>\n<pre><code class=\"lang-js\">dataset: [{\n    // Row based key-value format, namely, object array, is a commonly used format.\n    source: [\n        {product: &#39;Matcha Latte&#39;, count: 823, score: 95.8},\n        {product: &#39;Milk Tea&#39;, count: 235, score: 81.4},\n        {product: &#39;Cheese Cocoa&#39;, count: 1042, score: 91.2},\n        {product: &#39;Walnut Brownie&#39;, count: 988, score: 76.9}\n    ]\n}, {\n    // Column based key-value format is also supported.\n    source: {\n        &#39;product&#39;: [&#39;Matcha Latte&#39;, &#39;Milk Tea&#39;, &#39;Cheese Cocoa&#39;, &#39;Walnut Brownie&#39;],\n        &#39;count&#39;: [823, 235, 1042, 988],\n        &#39;score&#39;: [95.8, 81.4, 91.2, 76.9]\n    }\n}]\n</code></pre>\n<h2 id=\"multiple-datasets-and-references\">Multiple datasets and references</h2>\n<p>Multiple datasets can be defined, and series can refer them by <a href=\"option.html#series.datasetIndex\" target=\"_blank\">series.datasetIndex</a>.</p>\n<pre><code class=\"lang-js\">var option = {\n    dataset: [{\n        source: [...],\n    }, {\n        source: [...]\n    }, {\n        source: [...]\n    }],\n    series: [{\n        // Use the third dataset.\n        datasetIndex: 2\n    }, {\n        // Use the second dataset.\n        datasetIndex: 1\n    }]\n}\n</code></pre>\n<h2 id=\"data-transform\">Data transform</h2>\n<p><code class=\"codespan\">Data transform</code> has been supported since Apache ECharts<sup>TM</sup> 5. In echarts, the term <code class=\"codespan\">data transform</code> means that generate new data from user provided source data and transform functions. This feature is enable users to process data in declarative way, and provides users some common &quot;transform functions&quot; to make that kind of tasks &quot;out-of-the-box&quot;.</p>\n<p>See the details of data transform in this <a href=\"#data-transform\">doc</a>.</p>\n<h2 id=\"echarts3-data-setting-approach-series-data-can-be-used-normally\">ECharts3 data setting approach (series.data) can be used normally</h2>\n<p>The data setting approach before ECharts4 can still be used normally. If a series has declared <a href=\"option.html#series.data\" target=\"_blank\">series.data</a>, it will be used but not <code class=\"codespan\">dataset</code>.</p>\n<pre><code class=\"lang-js\">{\n    xAxis: {\n        type: &#39;category&#39;\n        data: [&#39;Matcha Latte&#39;, &#39;Milk Tea&#39;, &#39;Cheese Cocoa&#39;, &#39;Walnut Brownie&#39;]\n    },\n    yAxis: {},\n    series: [{\n        type: &#39;bar&#39;,\n        name: &#39;2015&#39;,\n        data: [89.3, 92.1, 94.4, 85.4]\n    }, {\n        type: &#39;bar&#39;,\n        name: &#39;2016&#39;,\n        data: [95.8, 89.4, 91.2, 76.9]\n    }, {\n        type: &#39;bar&#39;,\n        name: &#39;2017&#39;,\n        data: [97.7, 83.1, 92.5, 78.1]\n    }]\n}\n</code></pre>\n<p>In fact, setting data via <a href=\"option.html#series.data\" target=\"_blank\">series.data</a> is not deprecated and useful in some cases. For example, for some charts, like <a href=\"option.html#series-treemap\" target=\"_blank\">treemap</a>, <a href=\"option.html#series-graph\" target=\"_blank\">graph</a>, <a href=\"option.html#series-lines\" target=\"_blank\">lines</a>, that do not apply table data, <code class=\"codespan\">dataset</code> is not supported for yet. Moreover, for the case of large data rendering (for example, millions of data), <a href=\"api.html#echartsInstance.appendData\" target=\"_blank\">appendData</a> is probably needed to load data incrementally. <code class=\"codespan\">dataset</code> is not supported in the case.</p>\n<h2 id=\"data-transform\">Data transform</h2>\n<p>See <a href=\"#Data%20Transform\">data transform</a>.</p>\n<h2 id=\"others\">Others</h2>\n<p>Currently, not all types of series support dataset. Series that support dataset includes:</p>\n<p><code class=\"codespan\">line</code>, <code class=\"codespan\">bar</code>, <code class=\"codespan\">pie</code>, <code class=\"codespan\">scatter</code>, <code class=\"codespan\">effectScatter</code>, <code class=\"codespan\">parallel</code>, <code class=\"codespan\">candlestick</code>, <code class=\"codespan\">map</code>, <code class=\"codespan\">funnel</code>, <code class=\"codespan\">custom</code>.</p>\n<p>More types of series will support dataset in our further work.</p>\n<p>Finally, this is an example, multiple series sharing one <code class=\"codespan\">dataset</code> and having interactions:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=dataset-link&edit=1&reset=1\" width=\"800\" height=\"500\" ></iframe>\n\n\n\n\n"},"Data Transform":{"type":["*"],"description":"<p><code class=\"codespan\">Data transform</code> has been supported since Apache ECharts<sup>TM</sup> 5. In echarts, the term <code class=\"codespan\">data transform</code> means that generate new data from user provided source data and transform functions. both This feature is enable users to process data in declarative way, and provides users some common &quot;transform functions&quot; to make that kind of tasks &quot;out-of-the-box&quot;. (For consistency in the context, the noun form of the word we keep using the &quot;transform&quot; rather than &quot;transformation&quot;).</p>\n<p>The abstract formula of data transform is: <code class=\"codespan\">outData = f(inputData)</code>, where the transform function <code class=\"codespan\">f</code> can be like <code class=\"codespan\">filter</code>, <code class=\"codespan\">sort</code>, <code class=\"codespan\">regression</code>, <code class=\"codespan\">boxplot</code>, <code class=\"codespan\">cluster</code>, <code class=\"codespan\">aggregate</code>(todo) ...\nWith the help of those transform methods, users can be implements the features like:</p>\n<ul>\n<li>Partition data into multiple series.</li>\n<li>Make some statistics and visualize the result.</li>\n<li>Adapt some visualization algorithms to data and display the result.</li>\n<li>Sort data.</li>\n<li>Remove or choose some kind of empty or special datums.</li>\n<li>...</li>\n</ul>\n<h2 id=\"get-started-to-data-transform\">Get started to data transform</h2>\n<p>In echarts, data transform is implemented based on the concept of <a href=\"#dataset\">dataset</a>. A <a href=\"option.html#dataset.transform\" target=\"_blank\">dataset.transform</a> can be configured in a dataset instance to indicate that this dataset is to be generated from this <code class=\"codespan\">transform</code>. For example:</p>\n<pre><code class=\"lang-js\">var option = {\n    dataset: [{\n        // This dataset is on `datasetIndex: 0`.\n        source: [\n            [&#39;Product&#39;, &#39;Sales&#39;, &#39;Price&#39;, &#39;Year&#39;],\n            [&#39;Cake&#39;, 123, 32, 2011],\n            [&#39;Cereal&#39;, 231, 14, 2011],\n            [&#39;Tofu&#39;, 235, 5, 2011],\n            [&#39;Dumpling&#39;, 341, 25, 2011],\n            [&#39;Biscuit&#39;, 122, 29, 2011],\n            [&#39;Cake&#39;, 143, 30, 2012],\n            [&#39;Cereal&#39;, 201, 19, 2012],\n            [&#39;Tofu&#39;, 255, 7, 2012],\n            [&#39;Dumpling&#39;, 241, 27, 2012],\n            [&#39;Biscuit&#39;, 102, 34, 2012],\n            [&#39;Cake&#39;, 153, 28, 2013],\n            [&#39;Cereal&#39;, 181, 21, 2013],\n            [&#39;Tofu&#39;, 395, 4, 2013],\n            [&#39;Dumpling&#39;, 281, 31, 2013],\n            [&#39;Biscuit&#39;, 92, 39, 2013],\n            [&#39;Cake&#39;, 223, 29, 2014],\n            [&#39;Cereal&#39;, 211, 17, 2014],\n            [&#39;Tofu&#39;, 345, 3, 2014],\n            [&#39;Dumpling&#39;, 211, 35, 2014],\n            [&#39;Biscuit&#39;, 72, 24, 2014],\n        ],\n        // id: &#39;a&#39;\n    }, {\n        // This dataset is on `datasetIndex: 1`.\n        // A `transform` is configured to indicate that the\n        // final data of this dataset is transformed via this\n        // transform function.\n        transform: {\n            type: &#39;filter&#39;,\n            config: { dimension: &#39;Year&#39;, value: 2011 }\n        },\n        // There can be optional properties `fromDatasetIndex` or `fromDatasetId`\n        // to indicate that where is the input data of the transform from.\n        // For example, `fromDatasetIndex: 0` specify the input data is from\n        // the dataset on `datasetIndex: 0`, or `fromDatasetId: &#39;a&#39;` specify the\n        // input data is from the dataset having `id: &#39;a&#39;`.\n        // [DEFAULT_RULE]\n        // If both `fromDatasetIndex` and `fromDatasetId` are omitted,\n        // `fromDatasetIndex: 0` are used by default.\n    }, {\n        // This dataset is on `datasetIndex: 2`.\n        // Similarly, if neither `fromDatasetIndex` nor `fromDatasetId` is\n        // specified, `fromDatasetIndex: 0` is used by default\n        transform: {\n            // The &quot;filter&quot; transform filters and gets data items only match\n            // the given condition in property `config`.\n            type: &#39;filter&#39;,\n            // Transforms has a property `config`. In this &quot;filter&quot; transform,\n            // the `config` specify the condition that each result data item\n            // should be satisfied. In this case, this transform get all of\n            // the data items that the value on dimension &quot;Year&quot; equals to 2012.\n            config: { dimension: &#39;Year&#39;, value: 2012 }\n        }\n    }, {\n        // This dataset is on `datasetIndex: 3`\n        transform: {\n            type: &#39;filter&#39;,\n            config: { dimension: &#39;Year&#39;, value: 2013 }\n        }\n    }],\n    series: [{\n        type: &#39;pie&#39;, radius: 50, center: [&#39;25%&#39;, &#39;50%&#39;],\n        // In this case, each &quot;pie&quot; series reference to a dataset that has\n        // the result of its &quot;filter&quot; transform.\n        datasetIndex: 1\n    }, {\n        type: &#39;pie&#39;, radius: 50, center: [&#39;50%&#39;, &#39;50%&#39;],\n        datasetIndex: 2\n    }, {\n        type: &#39;pie&#39;, radius: 50, center: [&#39;75%&#39;, &#39;50%&#39;],\n        datasetIndex: 3\n    }]\n};\n</code></pre>\n<p>The case shows how we get three pies, representing the data from 2011, 2012, 2013.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=data-transform-multiple-pie&reset=1&edit=1\" width=\"800\" height=\"300\" ></iframe>\n\n\n\n<p>Let&#39;s summarize the key points of using data transform:</p>\n<ul>\n<li>Generate new data from existing declared data via the declaration of <code class=\"codespan\">transform</code>, <code class=\"codespan\">fromDatasetIndex</code>/<code class=\"codespan\">fromDatasetId</code> in some blank dataset.</li>\n<li>Series references these datasets to show the result.</li>\n</ul>\n<h2 id=\"advanced-usage\">Advanced usage</h2>\n<h4 id=\"piped-transform\">Piped transform</h4>\n<p>There is a syntactic sugar that pipe transforms like:</p>\n<pre><code class=\"lang-js\">option: {\n    dataset: [{\n        source: [ ... ] // The original data\n    }, {\n        // Declare transforms in an array to pipe multiple transforms,\n        // which makes them execute one by one and take the output of\n        // the previous transform as the input of the next transform.\n        transform: [{\n            type: &#39;filter&#39;,\n            config: { dimension: &#39;Product&#39;, value: &#39;Tofu&#39; }\n        }, {\n            type: &#39;sort&#39;,\n            config: { dimension: &#39;Year&#39;, order: &#39;desc&#39; }\n        }]\n    }],\n    series: {\n        type: &#39;pie&#39;,\n        // Display the result of the piped transform.\n        datasetIndex: 1\n    }\n}\n</code></pre>\n<blockquote>\n<p>Note: theoretically any type of transform is able to have multiple input data and multiple output data. But when a transform is piped, it is only able to take one input (except it is the first transform of the pipe) and product one output (except it is the last transform of the pipe).</p>\n</blockquote>\n<h4 id=\"output-multiple-data\">Output multiple data</h4>\n<p>In most cases, transform functions only need to produce one data. But there is indeed scenarios that a transform function needs to produce multiple data, each of whom might be used by different series.</p>\n<p>For example, in the built-in boxplot transform, besides boxplot data produced, the outlier data are also produced, which can be used in a scatter series. See the <a href=\"https://echarts.apache.org/examples/en/editor.html?c=boxplot-light-velocity&amp;edit=1&amp;reset=1\" target=\"_blank\">example</a>.</p>\n<p>We use prop <a href=\"option.html#dataset.fromTransformResult\" target=\"_blank\">dataset.fromTransformResult</a> to satisfy this requirement. For example:</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        // Original source data.\n        source: [...]\n    }, {\n        transform: {\n            type: &#39;boxplot&#39;\n        }\n        // After this &quot;boxplot transform&quot; two result data generated:\n        // result[0]: The boxplot data\n        // result[1]: The outlier data\n        // By default, when series or other dataset reference this dataset,\n        // only result[0] can be visited.\n        // If we need to visit result[1], we have to use another dataset\n        // as follows:\n    }, {\n        // This extra dataset references the dataset above, and retrieves\n        // the result[1] as its own data. Thus series or other dataset can\n        // reference this dataset to get the data from result[1].\n        fromDatasetIndex: 1,\n        fromTransformResult: 1\n    }],\n    xAxis: {\n        type: &#39;category&#39;\n    },\n    yAxis: {\n    },\n    series: [{\n        name: &#39;boxplot&#39;,\n        type: &#39;boxplot&#39;,\n        // Reference the data from result[0].\n        datasetIndex: 1\n    }, {\n        name: &#39;outlier&#39;,\n        type: &#39;scatter&#39;,\n        // Reference the data from result[1].\n        datasetIndex: 2\n    }]\n};\n</code></pre>\n<p>What more, <a href=\"option.html#dataset.fromTransformResult\" target=\"_blank\">dataset.fromTransformResult</a> and <a href=\"option.html#dataset.transform\" target=\"_blank\">dataset.transform</a> can both appear in one dataset, which means that the input of the transform is from retrieved from the upstream result specified by <code class=\"codespan\">fromTransformResult</code>. For example:</p>\n<pre><code class=\"lang-js\">{\n    fromDatasetIndex: 1,\n    fromTransformResult: 1,\n    transform: {\n        type: &#39;sort&#39;,\n        config: { dimension: 2, order: &#39;desc&#39; }\n    }\n}\n</code></pre>\n<h4 id=\"debug-in-develop-environment\">Debug in develop environment</h4>\n<p>When using data transform, we might run into the trouble that the final chart do not display correctly but we do not know where the config is wrong. There is a property <code class=\"codespan\">transform.print</code> might help in such case. (<code class=\"codespan\">transform.print</code> is only available in dev environment).</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        source: [ ... ]\n    }, {\n        transform: {\n            type: &#39;filter&#39;,\n            config: { ... }\n            // The result of this transform will be printed\n            // in dev tool via `console.log`.\n            print: true\n        }\n    }],\n    ...\n}\n</code></pre>\n<h2 id=\"the-transform-filter\">The transform &quot;filter&quot;</h2>\n<p>Transform type &quot;filter&quot; is a built-in transform that provide data filter according to specified conditions. The basic option is like:</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        source: [\n            [&#39;Product&#39;, &#39;Sales&#39;, &#39;Price&#39;, &#39;Year&#39;],\n            [&#39;Cake&#39;, 123, 32, 2011],\n            [&#39;Latte&#39;, 231, 14, 2011],\n            [&#39;Tofu&#39;, 235, 5, 2011],\n            [&#39;Milk Tee&#39;, 341, 25, 2011],\n            [&#39;Porridge&#39;, 122, 29, 2011],\n            [&#39;Cake&#39;, 143, 30, 2012],\n            [&#39;Latte&#39;, 201, 19, 2012],\n            [&#39;Tofu&#39;, 255, 7, 2012],\n            [&#39;Milk Tee&#39;, 241, 27, 2012],\n            [&#39;Porridge&#39;, 102, 34, 2012],\n            [&#39;Cake&#39;, 153, 28, 2013],\n            [&#39;Latte&#39;, 181, 21, 2013],\n            [&#39;Tofu&#39;, 395, 4, 2013],\n            [&#39;Milk Tee&#39;, 281, 31, 2013],\n            [&#39;Porridge&#39;, 92, 39, 2013],\n            [&#39;Cake&#39;, 223, 29, 2014],\n            [&#39;Latte&#39;, 211, 17, 2014],\n            [&#39;Tofu&#39;, 345, 3, 2014],\n            [&#39;Milk Tee&#39;, 211, 35, 2014],\n            [&#39;Porridge&#39;, 72, 24, 2014]\n        ]\n    }, {\n        transform: {\n            type: &#39;filter&#39;,\n            config: { dimension: &#39;Year&#39;, &#39;=&#39;: 2011 }\n            // The config is the &quot;condition&quot; of this filter.\n            // This transform traverse the source data and\n            // and retrieve all the items that the &quot;Year&quot;\n            // is `2011`.\n        }\n    }],\n    series: {\n        type: &#39;pie&#39;,\n        datasetIndex: 1\n    }\n};\n</code></pre>\n<p><br>\n<br>\nThis is another example of filter transform:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=data-transform-filter&reset=1&edit=1\" width=\"600\" height=\"350\" ></iframe>\n\n\n\n<p><strong>About dimension:</strong></p>\n<p>The <code class=\"codespan\">config.dimension</code> can be:</p>\n<ul>\n<li>Dimension name declared in dataset, like <code class=\"codespan\">config: { dimension: &#39;Year&#39;, &#39;=&#39;: 2011 }</code>. Dimension name declaration is not mandatory.</li>\n<li>Dimension index (start from 0), like <code class=\"codespan\">config: { dimension: 3, &#39;=&#39;: 2011 }</code>.</li>\n</ul>\n<p><strong>About relational operator:</strong></p>\n<p>The relational operator can be:\n<code class=\"codespan\">&gt;</code>(<code class=\"codespan\">gt</code>), <code class=\"codespan\">&gt;=</code>(<code class=\"codespan\">gte</code>), <code class=\"codespan\">&lt;</code>(<code class=\"codespan\">lt</code>), <code class=\"codespan\">&lt;=</code>(<code class=\"codespan\">lte</code>), <code class=\"codespan\">=</code>(<code class=\"codespan\">eq</code>), <code class=\"codespan\">!=</code>(<code class=\"codespan\">ne</code>, <code class=\"codespan\">&lt;&gt;</code>), <code class=\"codespan\">reg</code>. (The name in the parentheses are aliases). They follows the common semantics.\nBesides the common number comparison, there is some extra features:</p>\n<ul>\n<li>Multiple operators are able to appear in one {} item like <code class=\"codespan\">{ dimension: &#39;Price&#39;, &#39;&gt;=&#39;: 20, &#39;&lt;&#39;: 30 }</code>, which means logical &quot;and&quot; (Price &gt;= 20 and Price &lt; 30).</li>\n<li>The data value can be &quot;numeric string&quot;. Numeric string is a string that can be converted to number. Like &#39; 123 &#39;. White spaces and line breaks will be auto trimmed in the conversion.</li>\n<li>If we need to compare &quot;JS <code class=\"codespan\">Date</code> instance&quot; or date string (like &#39;2012-05-12&#39;), we need to specify <code class=\"codespan\">parser: &#39;time&#39;</code> manually, like <code class=\"codespan\">config: { dimension: 3, lt: &#39;2012-05-12&#39;, parser: &#39;time&#39; }</code>.</li>\n<li>Pure string comparison is supported but can only be used in <code class=\"codespan\">=</code>, <code class=\"codespan\">!=</code>. <code class=\"codespan\">&gt;</code>, <code class=\"codespan\">&gt;=</code>, <code class=\"codespan\">&lt;</code>, <code class=\"codespan\">&lt;=</code> do not support pure string comparison (the &quot;right value&quot; of the four operators can not be a &quot;string&quot;).</li>\n<li>The operator <code class=\"codespan\">reg</code> can be used to make regular expression test. Like using <code class=\"codespan\">{ dimension: &#39;Name&#39;, reg: /\\s+Müller\\s*$/ }</code> to select all data items that the &quot;Name&quot; dimension contains family name Müller.</li>\n</ul>\n<p><strong>About logical relationship:</strong></p>\n<p>Sometimes we also need to express logical relationship ( <code class=\"codespan\">and</code> / <code class=\"codespan\">or</code> / <code class=\"codespan\">not</code> ):</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        source: [...]\n    }, {\n        transform: {\n            type: &#39;filter&#39;,\n            config: {\n                // Use operator &quot;and&quot;.\n                // Similarly, we can also use &quot;or&quot;, &quot;not&quot; in the same place.\n                // But &quot;not&quot; should be followed with a {...} rather than `[...]`.\n                and: [\n                    { dimension: &#39;Year&#39;, &#39;=&#39;: 2011 },\n                    { dimension: &#39;Price&#39;, &#39;&gt;=&#39;: 20, &#39;&lt;&#39;: 30 }\n                ]\n            }\n            // The condition is &quot;Year&quot; is 2011 and &quot;Price&quot; is greater\n            // or equal to 20 but less than 30.\n        }\n    }],\n    series: {\n        type: &#39;pie&#39;,\n        datasetIndex: 1\n    }\n};\n</code></pre>\n<p><code class=\"codespan\">and</code>/<code class=\"codespan\">or</code>/<code class=\"codespan\">not</code> can be nested like:</p>\n<pre><code class=\"lang-js\">transform: {\n    type: &#39;filter&#39;,\n    config: {\n        or: [{\n            and: [{\n                dimension: &#39;Price&#39;, &#39;&gt;=&#39;: 10, &#39;&lt;&#39;: 20\n            }, {\n                dimension: &#39;Sales&#39;, &#39;&lt;&#39;: 100\n            }, {\n                not: { dimension: &#39;Product&#39;, &#39;=&#39;: &#39;Tofu&#39; }\n            }]\n        }, {\n            and: [{\n                dimension: &#39;Price&#39;, &#39;&gt;=&#39;: 10, &#39;&lt;&#39;: 20\n            }, {\n                dimension: &#39;Sales&#39;, &#39;&lt;&#39;: 100\n            }, {\n                not: { dimension: &#39;Product&#39;, &#39;=&#39;: &#39;Cake&#39; }\n            }]\n        }]\n    }\n}\n</code></pre>\n<p><strong>About parser:</strong></p>\n<p>Some &quot;parser&quot; can be specified when make value comparison. At present only supported:</p>\n<ul>\n<li><code class=\"codespan\">parser: &#39;time&#39;</code>: Parse the value to date time before comparing. The parser rule is the same as <code class=\"codespan\">echarts.time.parse</code>, where JS <code class=\"codespan\">Date</code> instance, timestamp number (in millisecond) and time string (like <code class=\"codespan\">&#39;2012-05-12 03:11:22&#39;</code>) are supported to be parse to timestamp number, while other value will be parsed to <code class=\"codespan\">NaN</code>.</li>\n<li><code class=\"codespan\">parser: &#39;trim&#39;</code>: Trim the string before making comparison. For non-string, return the original value.</li>\n<li><code class=\"codespan\">parser: &#39;number&#39;</code>: Force to convert the value to number before making comparison. If not possible to be converted to a meaningful number, converted to <code class=\"codespan\">NaN</code>. In most cases it is not necessary, because by default the value will be auto converted to number if possible before making comparison. But the default conversion is strict while this parser provide a loose strategy. If we meet the case that number string with unit suffix (like <code class=\"codespan\">&#39;33%&#39;</code>, <code class=\"codespan\">12px</code>), we should use <code class=\"codespan\">parser: &#39;number&#39;</code> to convert them to number before making comparison.</li>\n</ul>\n<p>This is an example to show the <code class=\"codespan\">parser: &#39;time&#39;</code>:</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        source: [\n            [&#39;Product&#39;, &#39;Sales&#39;, &#39;Price&#39;, &#39;Date&#39;],\n            [&#39;Milk Tee&#39;, 311, 21, &#39;2012-05-12&#39;],\n            [&#39;Cake&#39;, 135, 28, &#39;2012-05-22&#39;],\n            [&#39;Latte&#39;, 262, 36, &#39;2012-06-02&#39;],\n            [&#39;Milk Tee&#39;, 359, 21, &#39;2012-06-22&#39;],\n            [&#39;Cake&#39;, 121, 28, &#39;2012-07-02&#39;],\n            [&#39;Latte&#39;, 271, 36, &#39;2012-06-22&#39;],\n            ...\n        ]\n    }, {\n        transform: {\n            type: &#39;filter&#39;,\n            config: {\n                { dimension: &#39;Date&#39;, &#39;&gt;=&#39;: &#39;2012-05&#39;, &#39;&lt;&#39;: &#39;2012-06&#39;, parser: &#39;time&#39; }\n            }\n        }\n    }]\n}\n</code></pre>\n<p><strong>Formally definition:</strong></p>\n<p>Finally, we give the formally definition of the filter transform config here:</p>\n<pre><code class=\"lang-ts\">type FilterTransform = {\n    type: &#39;filter&#39;;\n    config: ConditionalExpressionOption;\n};\ntype ConditionalExpressionOption =\n    true | false | RelationalExpressionOption | LogicalExpressionOption;\ntype RelationalExpressionOption = {\n    dimension: DimensionName | DimensionIndex;\n    parser?: &#39;time&#39; | &#39;trim&#39; | &#39;number&#39;;\n    lt?: DataValue; // less than\n    lte?: DataValue; // less than or equal\n    gt?: DataValue; // greater than\n    gte?: DataValue; // greater than or equal\n    eq?: DataValue; // equal\n    ne?: DataValue; // not equal\n    &#39;&lt;&#39;?: DataValue; // lt\n    &#39;&lt;=&#39;?: DataValue; // lte\n    &#39;&gt;&#39;?: DataValue; // gt\n    &#39;&gt;=&#39;?: DataValue; // gte\n    &#39;=&#39;?: DataValue; // eq\n    &#39;!=&#39;?: DataValue; // ne\n    &#39;&lt;&gt;&#39;?: DataValue; // ne (SQL style)\n    reg?: RegExp | string; // RegExp\n};\ntype LogicalExpressionOption = {\n    and?: ConditionalExpressionOption[];\n    or?: ConditionalExpressionOption[];\n    not?: ConditionalExpressionOption;\n};\ntype DataValue = string | number | Date;\ntype DimensionName = string;\ntype DimensionIndex = number;\n</code></pre>\n<h2 id=\"the-transform-sort\">The transform &quot;sort&quot;</h2>\n<p>Another built-in transform is &quot;sort&quot;.</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        dimensions: [&#39;name&#39;, &#39;age&#39;, &#39;profession&#39;, &#39;score&#39;, &#39;date&#39;],\n        source: [\n            [&#39; Hannah Krause &#39;, 41, &#39;Engineer&#39;, 314, &#39;2011-02-12&#39;],\n            [&#39;Zhao Qian &#39;, 20, &#39;Teacher&#39;, 351, &#39;2011-03-01&#39;],\n            [&#39; Jasmin Krause &#39;, 52, &#39;Musician&#39;, 287, &#39;2011-02-14&#39;],\n            [&#39;Li Lei&#39;, 37, &#39;Teacher&#39;, 219, &#39;2011-02-18&#39;],\n            [&#39; Karle Neumann &#39;, 25, &#39;Engineer&#39;, 253, &#39;2011-04-02&#39;],\n            [&#39; Adrian Groß&#39;, 19, &#39;Teacher&#39;, null, &#39;2011-01-16&#39;],\n            [&#39;Mia Neumann&#39;, 71, &#39;Engineer&#39;, 165, &#39;2011-03-19&#39;],\n            [&#39; Böhm Fuchs&#39;, 36, &#39;Musician&#39;, 318, &#39;2011-02-24&#39;],\n            [&#39;Han Meimei &#39;, 67, &#39;Engineer&#39;, 366, &#39;2011-03-12&#39;],\n        ]\n    }, {\n        transform: {\n            type: &#39;sort&#39;,\n            // Sort by score.\n            config: { dimension: &#39;score&#39;, order: &#39;asc&#39; }\n        }\n    }],\n    series: {\n        type: &#39;bar&#39;,\n        datasetIndex: 1\n    },\n    ...\n};\n</code></pre>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=data-transform-sort-bar&reset=1&edit=1\" width=\"600\" height=\"350\" ></iframe>\n\n\n\n\n<p>Some extra features about &quot;sort transform&quot;:</p>\n<ul>\n<li>Order by multiple dimensions is supported. See examples below.</li>\n<li>The sort rule:<ul>\n<li>By default &quot;numeric&quot; (that is, number and numeric-string like <code class=\"codespan\">&#39; 123 &#39;</code>) are able to sorted by numeric order.</li>\n<li>Otherwise &quot;non-numeric-string&quot; are also able to be ordered among themselves. This might help to the case like grouping data items with the same tag, especially when multiple dimensions participated in the sort (See example below).</li>\n<li>When &quot;numeric&quot; is compared with &quot;non-numeric-string&quot;, or either of them is compared with other types of value, they are not comparable. So we call the latter one as &quot;incomparable&quot; and treat it as &quot;min value&quot; or &quot;max value&quot; according to the prop <code class=\"codespan\">incomparable: &#39;min&#39; | &#39;max&#39;</code>. This feature usually helps to decide whether to put the empty values (like <code class=\"codespan\">null</code>, <code class=\"codespan\">undefined</code>, <code class=\"codespan\">NaN</code>, <code class=\"codespan\">&#39;&#39;</code>, <code class=\"codespan\">&#39;-&#39;</code>) or other illegal values to the head or tail.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">filter: &#39;time&#39; | &#39;trim&#39; | &#39;number&#39;</code> can be used, the same as &quot;filter transform&quot;.<ul>\n<li>If intending to sort time values (JS <code class=\"codespan\">Date</code> instance or time string like <code class=\"codespan\">&#39;2012-03-12 11:13:54&#39;</code>), <code class=\"codespan\">parser: &#39;time&#39;</code> should be specified. Like <code class=\"codespan\">config: { dimension: &#39;date&#39;, order: &#39;desc&#39;, parser: &#39;time&#39; }</code></li>\n<li>If intending to sort values with unit suffix (like <code class=\"codespan\">&#39;33%&#39;</code>, <code class=\"codespan\">&#39;16px&#39;</code>), need to use <code class=\"codespan\">parser: &#39;number&#39;</code>.</li>\n</ul>\n</li>\n</ul>\n<p>See an example of multiple order:</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        dimensions: [&#39;name&#39;, &#39;age&#39;, &#39;profession&#39;, &#39;score&#39;, &#39;date&#39;],\n        source: [\n            [&#39; Hannah Krause &#39;, 41, &#39;Engineer&#39;, 314, &#39;2011-02-12&#39;],\n            [&#39;Zhao Qian &#39;, 20, &#39;Teacher&#39;, 351, &#39;2011-03-01&#39;],\n            [&#39; Jasmin Krause &#39;, 52, &#39;Musician&#39;, 287, &#39;2011-02-14&#39;],\n            [&#39;Li Lei&#39;, 37, &#39;Teacher&#39;, 219, &#39;2011-02-18&#39;],\n            [&#39; Karle Neumann &#39;, 25, &#39;Engineer&#39;, 253, &#39;2011-04-02&#39;],\n            [&#39; Adrian Groß&#39;, 19, &#39;Teacher&#39;, null, &#39;2011-01-16&#39;],\n            [&#39;Mia Neumann&#39;, 71, &#39;Engineer&#39;, 165, &#39;2011-03-19&#39;],\n            [&#39; Böhm Fuchs&#39;, 36, &#39;Musician&#39;, 318, &#39;2011-02-24&#39;],\n            [&#39;Han Meimei &#39;, 67, &#39;Engineer&#39;, 366, &#39;2011-03-12&#39;],\n        ]\n    }, {\n        transform: {\n            type: &#39;sort&#39;,\n            config: [\n                // Sort by the two dimensions.\n                { dimension: &#39;profession&#39;, order: &#39;desc&#39; },\n                { dimension: &#39;score&#39;, order: &#39;desc&#39; }\n            ]\n        }\n    }],\n    series: {\n        type: &#39;bar&#39;,\n        datasetIndex: 1\n    },\n    ...\n};\n</code></pre>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/data-transform-multiple-sort-bar&reset=1&edit=1\" width=\"600\" height=\"350\" ></iframe>\n\n\n\n<p>Finally, we give the formally definition of the sort transform config here:</p>\n<pre><code class=\"lang-ts\">type SortTransform = {\n    type: &#39;filter&#39;;\n    config: OrderExpression | OrderExpression[];\n};\ntype OrderExpression = {\n    dimension: DimensionName | DimensionIndex;\n    order: &#39;asc&#39; | &#39;desc&#39;;\n    incomparable?: &#39;min&#39; | &#39;max&#39;;\n    parser?: &#39;time&#39; | &#39;trim&#39; | &#39;number&#39;;\n};\ntype DimensionName = string;\ntype DimensionIndex = number;\n</code></pre>\n<h2 id=\"use-external-transforms\">Use external transforms</h2>\n<p>Besides built-in transforms (like &#39;filter&#39;, &#39;sort&#39;), we can also use external transforms to provide more powerful functionalities. Here we use a third-party library <a href=\"https://github.com/ecomfe/echarts-stat\" target=\"_blank\">ecStat</a> as an example:</p>\n<p>This case show how to make a regression line via ecStat:</p>\n<pre><code class=\"lang-js\">// Register the external transform at first.\necharts.registerTransform(ecStatTransform(ecStat).regression);\n</code></pre>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        source: rawData\n    }, {\n        transform: {\n            // Reference the registered external transform.\n            // Note that external transform has a namespace (like &#39;ecStat:xxx&#39;\n            // has namespace &#39;ecStat&#39;).\n            // built-in transform (like &#39;filter&#39;, &#39;sort&#39;) does not have a namespace.\n            type: &#39;ecStat:regression&#39;,\n            config: {\n                // Parameters needed by the external transform.\n                method: &#39;exponential&#39;\n            }\n        }\n    }],\n    xAxis: { type: &#39;category&#39; },\n    yAxis: {},\n    series: [{\n        name: &#39;scatter&#39;,\n        type: &#39;scatter&#39;,\n        datasetIndex: 0\n    }, {\n        name: &#39;regression&#39;,\n        type: &#39;line&#39;,\n        symbol: &#39;none&#39;,\n        datasetIndex: 1\n    }]\n};\n</code></pre>\n<p>Examples with echarts-stat:</p>\n<ul>\n<li><a href=\"https://echarts.apache.org/examples/en/editor.html?c=bar-histogram&amp;edit=1&amp;reset=1\" target=\"_blank\">Bar histogram</a></li>\n<li><a href=\"https://echarts.apache.org/examples/en/editor.html?c=scatter-clustering&amp;edit=1&amp;reset=1\" target=\"_blank\">Scatter clustering</a></li>\n<li><a href=\"https://echarts.apache.org/examples/en/editor.html?c=scatter-linear-regression&amp;edit=1&amp;reset=1\" target=\"_blank\">Scatter linear regression</a></li>\n<li><a href=\"https://echarts.apache.org/examples/en/editor.html?c=scatter-exponential-regression&amp;edit=1&amp;reset=1\" target=\"_blank\">Scatter exponential regression</a></li>\n<li><a href=\"https://echarts.apache.org/examples/en/editor.html?c=scatter-logarithmic-regression&amp;edit=1&amp;reset=1\" target=\"_blank\">Scatter logarithmic regression</a></li>\n<li><a href=\"https://echarts.apache.org/examples/en/editor.html?c=scatter-polynomial-regression&amp;edit=1&amp;reset=1\" target=\"_blank\">Scatter polynomial regression</a></li>\n</ul>\n"},"Add interaction to the chart component":{"type":["*"],"description":"<p>Apache ECharts<sup>TM</sup> 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\">datazoom component</code> <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a>、<code class=\"codespan\">dataline component</code> <a href=\"option.html#timeline\" target=\"_blank\">timeline</a></p>\n<p>Following is an example of <code class=\"codespan\">datazoom component</code> <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a> as an introduction of how to add this kind of component.</p>\n<h2 id=\"introduction-of-data-zoom-component-datazoom-\">Introduction of data zoom component (dataZoom)</h2>\n<p>Data overview by default, and detail by requirement is a basic interaction need of data visualization. <code class=\"codespan\">dataZoom</code> component can implement this function in rectangular coordinate (<a href=\"option.html#grid\" target=\"_blank\">grid</a>) and polar coordinate (<a href=\"option.html#polar\" target=\"_blank\">polar</a>.</p>\n<p><strong>For example: </strong></p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/scatter-dataZoom-all&edit=1&reset=1\" width=\"600\" height=\"400\" ></iframe>\n\n\n<p><br></p>\n<ul>\n<li><code class=\"codespan\">dataZoom</code> component operates <em>data window zoom</em> and <em>data window translation</em> on <code class=\"codespan\">axis</code>.</li>\n</ul>\n<blockquote>\n<p>Use <a href=\"option.html#dataZoom.xAxisIndex\" target=\"_blank\">dataZoom.xAxisIndex</a>, <a href=\"option.html#dataZoom.yAxisIndex\" target=\"_blank\">dataZoom.yAxisIndex</a> to specify which axis <code class=\"codespan\">dataZoom</code> controls.</p>\n</blockquote>\n<ul>\n<li><p>Multiple <code class=\"codespan\">dataZoom</code> components can exist at the same time to control function together. Components controling the same axis will be connected automatically. The example below explains in detail.</p>\n</li>\n<li><p>Operation principle of <code class=\"codespan\">dataZoom</code> achieves <em>data window zooming</em> through <em>data filtering</em>.</p>\n<p>  Different settings of data filtering modes lead to different data window zooming effects, please see: <a href=\"option.html#dataZoom.filterMode\" target=\"_blank\">dataZoom.filterMode</a>.</p>\n</li>\n<li><p>Setting of <code class=\"codespan\">dataZoom</code> data window range supports two formats currently:</p>\n<ul>\n<li><p>Percentage: see <a href=\"option.html#dataZoom.start\" target=\"_blank\">dataZoom.start</a> and <a href=\"option.html#dataZoom.end\" target=\"_blank\">dataZoom.end</a>.</p>\n</li>\n<li><p>Absolute value: see <a href=\"option.html#dataZoom.startValue\" target=\"_blank\">dataZoom.startValue</a> and <a href=\"option.html#dataZoom.endValue\" target=\"_blank\">dataZoom.endValue</a>.</p>\n</li>\n</ul>\n</li>\n</ul>\n<p><strong>dataZoom component supports several child components: </strong></p>\n<ul>\n<li><p><a href=\"option.html#dataZoom-inside\" target=\"_blank\">Inside data zoom component (dataZoomInside)</a>: inside coordinates.</p>\n</li>\n<li><p><a href=\"option.html#dataZoom-slider\" target=\"_blank\">Slider data zoom component (dataZoomSlider)</a>: has seperate slide option.</p>\n</li>\n<li><p><a href=\"option.html#toolbox.feature.dataZoom\" target=\"_blank\">Select data zoom component (dataZoomSelect)</a>: full-screen box for zoom data area. Entrance and configuration item are both in <code class=\"codespan\">toolbox</code>.</p>\n</li>\n</ul>\n<h2 id=\"adding-datazoom-component\">Adding dataZoom component</h2>\n<p>First, only add dataZoom component to x-axis. Following examples shows the code.</p>\n<pre><code class=\"lang-javascript\">\noption = {\n    xAxis: {\n        type: &#39;value&#39;\n    },\n    yAxis: {\n        type: &#39;value&#39;\n    },\n    dataZoom: [\n        {   // This dataZoom component controls x-axis by dafault\n            type: &#39;slider&#39;, // this dataZoom component is dataZoom component of slider\n            start: 10,      // the left is located at 10%\n            end: 60         // the right is located at 60%\n        }\n    ],\n    series: [\n        {\n            type: &#39;scatter&#39;, // this is scatter chart\n            itemStyle: {\n                opacity: 0.8\n            },\n            symbolSize: function (val) {\n                return val[2] * 40;\n            },\n            data: [[&quot;14.616&quot;,&quot;7.241&quot;,&quot;0.896&quot;],[&quot;3.958&quot;,&quot;5.701&quot;,&quot;0.955&quot;],[&quot;2.768&quot;,&quot;8.971&quot;,&quot;0.669&quot;],[&quot;9.051&quot;,&quot;9.710&quot;,&quot;0.171&quot;],[&quot;14.046&quot;,&quot;4.182&quot;,&quot;0.536&quot;],[&quot;12.295&quot;,&quot;1.429&quot;,&quot;0.962&quot;],[&quot;4.417&quot;,&quot;8.167&quot;,&quot;0.113&quot;],[&quot;0.492&quot;,&quot;4.771&quot;,&quot;0.785&quot;],[&quot;7.632&quot;,&quot;2.605&quot;,&quot;0.645&quot;],[&quot;14.242&quot;,&quot;5.042&quot;,&quot;0.368&quot;]]\n        }\n    ]\n}\n</code></pre>\n<p>which will show the following result:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/scatter-tutorial-dataZoom-1&edit=1&reset=1\" width=\"600\" height=\"300\" ></iframe>\n\n\n<p><br></p>\n<p>The chart above can only change window by dragging dataZoom component. If you want to drag in coordinate, or use mouse wheel (or slides with two fingers on mobile) to zoom, then another inside dataZoom component needs to be added. You can just add in the <code class=\"codespan\">option.dataZoom</code> above:</p>\n<pre><code class=\"lang-javascript\">option = {\n    ...,\n    dataZoom: [\n        {   // this dataZoom component controls x-axis by dafault\n            type: &#39;slider&#39;, // this dataZoom component is dataZoom component of slider\n            start: 10,      // the left is located at 10%\n            end: 60         // the right is located at 60%\n        },\n        {   // This dataZoom component controls x-axis by dafault\n            type: &#39;inside&#39;, // this dataZoom component is dataZoom component of inside\n            start: 10,      // the left is located at 10%\n            end: 60         // the right is located at 60%\n        }\n    ],\n    ...\n}\n</code></pre>\n<p>Following results can be seen (you can now slide or use mouse wheel to zoom in coordinate) :</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/scatter-tutorial-dataZoom-2&edit=1&reset=1\" width=\"600\" height=\"300\" ></iframe>\n\n\n\n<p><br></p>\n<p>If you want to enable zooming on y-axis, then you need to add dataZoom componet on y-axis:</p>\n<pre><code class=\"lang-javascript\">option = {\n    ...,\n    dataZoom: [\n        {\n            type: &#39;slider&#39;,\n            xAxisIndex: 0,\n            start: 10,\n            end: 60\n        },\n        {\n            type: &#39;inside&#39;,\n            xAxisIndex: 0,\n            start: 10,\n            end: 60\n        },\n        {\n            type: &#39;slider&#39;,\n            yAxisIndex: 0,\n            start: 30,\n            end: 80\n        },\n        {\n            type: &#39;inside&#39;,\n            yAxisIndex: 0,\n            start: 30,\n            end: 80\n        }\n    ],\n    ...\n}\n</code></pre>\n<p>Following result can be seen:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/scatter-tutorial-dataZoom-3&edit=1&reset=1\" width=\"600\" height=\"300\" ></iframe>\n\n\n\n\n\n\n\n\n"},"Responsive Mobile-End":{"type":["*"],"description":"<p>Apache ECharts<sup>TM</sup> 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, especially on small screens on mobile-end.</p>\n<p>Besides, sometimes one chart may need to be displayed on both PC and mobile-end, which involves the ability of ECharts inner components to be responsive with different container sizes.</p>\n<p>To solve this problem, ECharts improved component location algorithm, and implemented responsive ability similar to <a href=\"https://www.w3.org/TR/css3-mediaqueries/\" target=\"_blank\">CSS Media Query</a>.</p>\n<h2 id=\"location-and-layout-of-echarts-components\">Location and layout of ECharts components</h2>\n<p>Most <em>component</em> and <em>series</em> follow two locating methods:</p>\n<p><br>\n<strong>left/right/top/bottom/width/height locating method:</strong></p>\n<p>Each of those six parameters can be <em>absolute value</em> or <em>percentage</em> or <em>location description</em>.</p>\n<ul>\n<li><p>Absolute value</p>\n<p>  in browser pixels (px); in form of <code class=\"codespan\">number</code> (no unit); e.g.: <code class=\"codespan\">{left: 23, height: 400}</code>.</p>\n</li>\n<li><p>Percentage</p>\n<p>  to the width and height of DOM container; in form of <code class=\"codespan\">string</code>; e.g.: <code class=\"codespan\">{right: &#39;30%&#39;, bottom: &#39;40%&#39;}</code>.</p>\n</li>\n<li><p>Location Description</p>\n<ul>\n<li>can be set to <code class=\"codespan\">left: &#39;center&#39;</code>, for horizontally centering.</li>\n<li>can be set to <code class=\"codespan\">top: &#39;middle&#39;</code>, for vertically centering.</li>\n</ul>\n</li>\n</ul>\n<p>The concept of these six parameters is similar to that in CSS:</p>\n<ul>\n<li>left: distance to left border of DOM container.</li>\n<li>right: distance to right border of DOM container.</li>\n<li>top: distance to top border of DOM container.</li>\n<li>bottom: distance to bottom border of DOM container.</li>\n<li>width: width.</li>\n<li>height: height.</li>\n</ul>\n<p>Two out of the three horizontal parameters, <code class=\"codespan\">left</code>, <code class=\"codespan\">right</code>, <code class=\"codespan\">width</code>, are enough to determine the component location. For example, <code class=\"codespan\">left</code> and <code class=\"codespan\">right</code>, or <code class=\"codespan\">right</code> and <code class=\"codespan\">width</code> can both determine component location and size.\nThe same goes for vertical paramters <code class=\"codespan\">top</code>, <code class=\"codespan\">bottom</code> and <code class=\"codespan\">height</code>.</p>\n<p><br>\n<strong>Locating method of <code class=\"codespan\">center</code> / <code class=\"codespan\">radius</code>: </strong></p>\n<ul>\n<li><p><code class=\"codespan\">center</code></p>\n<p>  an array in form of <code class=\"codespan\">[x, y]</code>, in which <code class=\"codespan\">x</code> and <code class=\"codespan\">y</code> can either be <em>absolute value</em> or <em>percentage</em>, as described above.</p>\n</li>\n<li><p><code class=\"codespan\">radius</code></p>\n<p>  an array in form of <code class=\"codespan\">[innerRadius, outerRadius]</code>, in which <code class=\"codespan\">innerRadius</code> and <code class=\"codespan\">outerRadius</code> can either be <em>absolute value</em> or <em>percentage</em>, as described above.</p>\n<p>  Percentage location turns out to be very useful for responsive positioning.</p>\n</li>\n</ul>\n<p><br>\n<strong>Horizontal and vertical</strong></p>\n<p>Most of ECharts&#39;s long and narrow components (such as <code class=\"codespan\">legend</code>,<code class=\"codespan\">visualMap</code>,<code class=\"codespan\">dataZoom</code>,<code class=\"codespan\">timeline</code> and so on), provide option to set them to be horizontal or vertical. For example, long and narrow screen of mobile-end, vertical layout may be a more suitable choice, while horizontal may more suit for PC&#39;s wide screen.</p>\n<p>Setting of horizontal or vertical layout is usually with component or series&#39;s <code class=\"codespan\">orient</code> or <code class=\"codespan\">layout</code> option, which can be set to <code class=\"codespan\">&#39;horizontal&#39;</code> or <code class=\"codespan\">&#39;vertical&#39;</code>.</p>\n<p><br>\n<strong>Compatibility with ECharts2: </strong></p>\n<p>Naming of <code class=\"codespan\">x/x2/y/y2</code> in ECharts2 is still compatible, as well as the newly added <code class=\"codespan\">left/right/top/bottom</code>. But <code class=\"codespan\">left/right/top/bottom</code> is recommended.</p>\n<p>To be compatible with ECharts2, there may be settings that seems to be odd, e.g.: <code class=\"codespan\">left: &#39;right&#39;</code>, <code class=\"codespan\">left: &#39;left&#39;</code>, <code class=\"codespan\">top: &#39;bottom&#39;</code>, <code class=\"codespan\">top: &#39;top&#39;</code>, which are equal to: <code class=\"codespan\">right: 0</code>, <code class=\"codespan\">left: 0</code>, <code class=\"codespan\">bottom: 0</code>, <code class=\"codespan\">top: 0</code>, in a more normal expression.</p>\n<h2 id=\"media-query\">Media Query</h2>\n<p><a href=\"https://www.w3.org/TR/css3-mediaqueries/#media1\" target=\"_blank\">Media Query</a> provides the ability to be responsive with container size.</p>\n<p>As shown in the following example, you may drag <strong>the circle in bottom-right corner</strong> to see the legend and series change layout position and method with container size.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/pie-media&edit=1&reset=1\" width=\"750\" height=\"600\" ></iframe>\n\n\n<p>The following format should be followed if you need to set Media Query in option:</p>\n<pre><code class=\"lang-javascript\">option = {\n    // here defines baseOption\n    title: {...},\n    legend: {...},\n    series: [{...}, {...}, ...],\n    ...,\n    media: [ // each rule of media query is defined here\n        {\n            query: {...},   // write rule here\n            option: {       // write options accordingly\n                legend: {...},\n                ...\n            }\n        },\n        {\n            query: {...},   // the second rule\n            option: {       // the second option\n                legend: {...},\n                ...\n            }\n        },\n        {                   // default with no rules,\n            option: {       // when all rules fail, use this option\n                legend: {...},\n                ...\n            }\n        }\n    ]\n};\n</code></pre>\n<p>In the above example, <code class=\"codespan\">baseOption</code> and every option in <code class=\"codespan\">media</code> are all <em>simple options</em>, which are regular options containing components and series. <code class=\"codespan\">baseOption</code> is always be used, while options of every will be merged with <code class=\"codespan\">chart.mergeOption()</code> when given <code class=\"codespan\">query</code> condition is satisfied with.</p>\n<p><strong>query: </strong></p>\n<p>A <code class=\"codespan\">query</code> is in the following format:</p>\n<pre><code class=\"lang-javascript\">{\n    minWidth: 200,\n    maxHeight: 300,\n    minAspectRatio: 1.3\n}\n</code></pre>\n<p>Currently there are three supported attributes:<code class=\"codespan\">width</code>, <code class=\"codespan\">height</code>, <code class=\"codespan\">aspectRatio</code> (height / width), each of which can add <code class=\"codespan\">min</code> or <code class=\"codespan\">max</code> as prefix. E.g., <code class=\"codespan\">minWidth: 200</code> stands for when width is greater than or equal to 200px. When two attributes are written together, it means <em>and</em> in Bool logic. For example, <code class=\"codespan\">{minWidth: 200, maxHeight: 300}</code> stands for when width is greater than or equal to 200px and height is smaller than or equal to 300px.</p>\n<p><strong>option: </strong></p>\n<p>Since option in <code class=\"codespan\">media</code> is <em>simple option</em>, technically speaking, you can write every option configuration item. But usually we only write those related to layout. Take part of the above query option as example:</p>\n<pre><code class=\"lang-javascript\">media: [\n    ...,\n    {\n        query: {\n            maxAspectRatio: 1           // when length-to-width ratio is less than 1\n        },\n        option: {\n            legend: {                   // legend is placed in middle-bottom\n                right: &#39;center&#39;,\n                bottom: 0,\n                orient: &#39;horizontal&#39;    // horizontal layout of legend\n            },\n            series: [                   // left and right layout of two pie charts\n                {\n                    radius: [20, &#39;50%&#39;],\n                    center: [&#39;50%&#39;, &#39;30%&#39;]\n                },\n                {\n                    radius: [30, &#39;50%&#39;],\n                    center: [&#39;50%&#39;, &#39;70%&#39;]\n                }\n            ]\n        }\n    },\n    {\n        query: {\n            maxWidth: 500               // when container width is smaller than 500\n        },\n        option: {\n            legend: {\n                right: 10,              // legend is placed in middle-right\n                top: &#39;15%&#39;,\n                orient: &#39;vertical&#39;      // vertical layout\n            },\n            series: [                   // top and bottom layout of two pie charts\n                {\n                    radius: [20, &#39;50%&#39;],\n                    center: [&#39;50%&#39;, &#39;30%&#39;]\n                },\n                {\n                    radius: [30, &#39;50%&#39;],\n                    center: [&#39;50%&#39;, &#39;75%&#39;]\n                }\n            ]\n        }\n    },\n    ...\n]\n</code></pre>\n<p><strong>Priority when multiple queries are satisfied: </strong></p>\n<p>Attention: When multiple <code class=\"codespan\">query</code> are satisfied at the same time, all of them will be merged with <code class=\"codespan\">mergeOption</code> and those are defined later will be merged later, thus provides them with higher priority.</p>\n<p><strong>Query by default: </strong></p>\n<p>If an item in <code class=\"codespan\">media</code> has no not <code class=\"codespan\">query</code>, then it means <em>default value</em>, which will be used when all other rules fail.</p>\n<p><strong>Pay attention when container size changes:</strong></p>\n<p>In many cases, container DOM node doesn&#39;t need to change size with user dragging. Instead, it may set to several sizes on varied ends.</p>\n<p>But if the container DOM node needs to change size with dragging, you need to pay attention to this: if certain configuration item appears in one <code class=\"codespan\">query option</code>, then it should also appeared in other <code class=\"codespan\">query option</code>, or it will not be able to return to the original state. (<code class=\"codespan\">left/right/top/bottom/width/height</code> are not restricted to this rule.)</p>\n<p><strong><code class=\"codespan\">media</code> in <em>composite option</em> does not support merge</strong></p>\n<p>When <code class=\"codespan\">chart.setOption(rawOption)</code> for the second, third, fourth, fifth, and etc. times, if <code class=\"codespan\">rawOption</code> is <code class=\"codespan\">composite option</code> (which means it contains <code class=\"codespan\">media</code> list), then, the new <code class=\"codespan\">rawOption.media</code> list will not merge with the old <code class=\"codespan\">media</code>. instead, it will simply replace the option. Of course, <code class=\"codespan\">baseOption</code> will still merge with the old option normally.</p>\n<p><br>\nFinally, let&#39;s see an example combining with timeline:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/bar-media-timeline&edit=1&reset=1\" width=\"750\" height=\"700\" ></iframe>\n\n\n\n\n\n"},"Visual Map of Data":{"type":["*"],"description":"<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 Apache ECharts<sup>TM</sup> 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</code>, and <code class=\"codespan\">treemap</code> have their own built-in mapping.</p>\n<p>Besides, ECharts provides <a href=\"option.html#visualMap\" target=\"_blank\">visualMap component</a> for general visual mapping. Visual elements allowed in <code class=\"codespan\">visualMap</code> component are:<br>\n<code class=\"codespan\">symbol</code>, <code class=\"codespan\">symbolSize</code><br>\n<code class=\"codespan\">color</code>, <code class=\"codespan\">opacity</code>, <code class=\"codespan\">colorAlpha</code>, <br>\n<code class=\"codespan\">colorLightness</code>, <code class=\"codespan\">colorSaturation</code>, <code class=\"codespan\">colorHue</code></p>\n<p>Next, we are going to introduce how to use <code class=\"codespan\">visualMap</code> component.</p>\n<h2 id=\"data-and-dimension\">Data and Dimension</h2>\n<p>Data are usually stored in <a href=\"option.html#series.data\" target=\"_blank\">series.data</a> in ECharts. Depending on chart types, like list, tree, graph, and so on, the form of data may vary somehow. But they have one common feature, that they are a collection of <code class=\"codespan\">dataItem</code>s. Every data item contains data value, and other information if needed. Every data value can be a single value (one dimension) or an array (multiple dimensions).</p>\n<p>For example, <a href=\"option.html#series.data\" target=\"_blank\">series.data</a> is the most common form, which is a <code class=\"codespan\">list</code>, a common array:</p>\n<pre><code class=\"lang-javascript\">series: {\n    data: [\n        {       // every item here is a dataItem\n            value: 2323, // this is data value\n            itemStyle: {...}\n        },\n        1212,   // it can also be a value of dataItem, which is a more common case\n        2323,   // every data value here is one dimension\n        4343,\n        3434\n    ]\n}\n</code></pre>\n<pre><code class=\"lang-javascript\">series: {\n    data: [\n        {                        // every item here is a dataItem\n            value: [3434, 129,  &#39;San Marino&#39;], // this is data value\n            itemStyle: {...}\n        },\n        [1212, 5454, &#39;Vatican&#39;],   // it can also be a value of dataItem, which is a more common case\n        [2323, 3223, &#39;Nauru&#39;],     // every data value here is three dimension\n        [4343, 23,   &#39;Tuvalu&#39;]    // If is scatter chart, usually map the first dimension to x axis,\n                                 // the second dimension to y axis,\n                                 // and the third dimension to symbolSize\n    ]\n}\n</code></pre>\n<p>Usually the first one or two dimensions are used for mapping. For example, map the first dimension to x axis, and the second dimension to y axis. If you want to represent more dimensions, <code class=\"codespan\">visualMap</code> is what you need. Most likely, <a href=\"option.html#series-scatter\" target=\"_blank\">scatter charts</a> use radius to represent the third dimension.</p>\n<h2 id=\"visualmap-component\">visualMap Component</h2>\n<p>visualMap component defines the mapping from <em>which dimension of data</em> to <em>what visual elements</em>.</p>\n<p>The following two types of visualMap components are supported, identified with <a href=\"option.html#visualMap.type\" target=\"_blank\">visualMap.type</a>.</p>\n<p>Its structure is defined as:</p>\n<pre><code class=\"lang-javascript\">option = {\n    visualMap: [ // can define multiple visualMap components at the same time\n        { // the first visualMap component\n            type: &#39;continuous&#39;, // defined as continuous visualMap\n            ...\n        },\n        { // the second visualMap component\n            type: &#39;piecewise&#39;, // defined as discrete visualMap\n            ...\n        }\n    ],\n    ...\n};\n</code></pre>\n<p><a href=\"option.html#visualMap-continuous\" target=\"_blank\">visualMapContinuous</a>:</p>\n<p><a href=\"option.html#visualMap-piecewise\" target=\"_blank\">visualMapPiecewise</a>:</p>\n<p>Piecewise visual map component(visualMapPiecewise)has three types:</p>\n<ul>\n<li>Equal division of continuous data: divide equally based on <a href=\"option.html#visualMap-piecewise.splitNumber\" target=\"_blank\">visualMap-piecewise.splitNumber</a>;</li>\n<li>User-defined division of continuous data: divide with range in <a href=\"option.html#visualMap-piecewise.pieces\" target=\"_blank\">visualMap-piecewise.pieces</a>;</li>\n<li>Discrete data (data in category type): divide with <a href=\"option.html#visualMap-piecewise.categories\" target=\"_blank\">visualMap-piecewise.categories</a>.</li>\n</ul>\n<p><br>\n<strong>Configuration of visualMap mapping method</strong></p>\n<p>As we have introduced above, <code class=\"codespan\">visualMap</code> maps a certain dimension to a certain visual element, we can configure which dimension of the data (see in <a href=\"#visualMap.dimension\">visualMap.dimension</a>) to be mapped to which visual elements (see in <a href=\"option.html#visualMap.inRange\" target=\"_blank\">visualMap.inRange</a> and <a href=\"option.html#visualMap.outOfRange\" target=\"_blank\">visualMap.outOfRange</a>).</p>\n<p>Example A:</p>\n<pre><code class=\"lang-javascript\">option = {\n    visualMap: [\n        {\n            type: &#39;piecewise&#39;,\n            min: 0,\n            max: 5000,\n            dimension: 3,       // the fourth dimension of series.data, or value[3], is mapped\n            seriesIndex: 4,     // map with the fourth series\n            inRange: {          // visual configuration items in selected range\n                color: [&#39;blue&#39;, &#39;#121122&#39;, &#39;red&#39;], // defines color list of mapping\n                                                   // The largest value will be mapped to &#39;red&#39;,\n                                                   // and others will be interpolated\n                symbolSize: [30, 100]              // the smallest value will be mapped to size of 30,\n                                                   // the largest to 100,\n                                                   // and others will be interpolated\n            },\n            outOfRange: {       // visual configuration items out of selected range\n                symbolSize: [30, 100]\n            }\n        },\n        ...\n    ]\n};\n</code></pre>\n<p>Example B:</p>\n<pre><code class=\"lang-javascript\">option = {\n    visualMap: [\n        {\n            ...,\n            inRange: {          // visual configuration items in selected range\n                colorLightness: [0.2, 1], // map to lightness, which will process lightness based on original color\n                                          // original color may be selected from global color palette,\n                                          // which is not concerned by visualMap component\n                symbolSize: [30, 100]\n            },\n            ...\n        },\n        ...\n    ]\n};\n</code></pre>\n<p>For more information, please refer to <a href=\"option.html#visualMap.inRange\" target=\"_blank\">visualMap.inRange</a> and <a href=\"option.html#visualMap.outOfRange\" target=\"_blank\">visualMap.outOfRange</a>.</p>\n"},"Events and Actions in ECharts":{"type":["*"],"description":"<p>User interactions trigger corresponding events in Apache ECharts<sup>TM</sup>. 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 3 are the same as DOM event names, in lowercases. Below is an example of binding clicking operation.</p>\n<pre><code class=\"lang-js\">myChart.on(&#39;click&#39;, function (params) {\n    // printing data name in console\n    console.log(params.name);\n});\n</code></pre>\n<p>Event in ECharts can be divided in two kinds. One is mouse event, which is triggered when mouse clicks on certain component, the other is triggered with interaction components, such as triggering <a href=\"api.html#events.legendselectchanged\" target=\"_blank\">&#39;legendselectchanged&#39;</a> event when toggling legend (Notice here, that <code class=\"codespan\">&#39;legendselected&#39;</code> event will not be triggered when toggling legend), triggering <a href=\"api.html#events.legendselectchanged\" target=\"_blank\">&#39;datazoom&#39;</a> event when data zooming in some area.</p>\n<h2 id=\"mouse-events-handling\">Mouse Events Handling</h2>\n<p>ECharts support regular mouse events, which includes <code class=\"codespan\">&#39;click&#39;</code>, <code class=\"codespan\">&#39;dblclick&#39;</code>, <code class=\"codespan\">&#39;mousedown&#39;</code>, <code class=\"codespan\">&#39;mousemove&#39;</code>, <code class=\"codespan\">&#39;mouseup&#39;</code>, <code class=\"codespan\">&#39;mouseover&#39;</code>, <code class=\"codespan\">&#39;mouseout&#39;</code>, <code class=\"codespan\">&#39;globalout&#39;</code>, <code class=\"codespan\">&#39;contextmenu&#39;</code>. Next let&#39;s see an example of opening Baidu search page when clicks a bar chart.</p>\n<pre><code class=\"lang-js\">// initialize ECharts instance based on prepared dom\nvar myChart = echarts.init(document.getElementById(&#39;main&#39;));\n\n// data and configuration item of specific chart\nvar option = {\n    xAxis: {\n        data: [&quot;shirt&quot;,&quot;cardign&quot;,&quot;chiffon shirt&quot;,&quot;pants&quot;,&quot;heels&quot;,&quot;socks&quot;]\n    },\n    yAxis: {},\n    series: [{\n        name: &#39;sales&#39;,\n        type: &#39;bar&#39;,\n        data: [5, 20, 36, 10, 10, 20]\n    }]\n};\n// use specified configuration item and data to show chart\nmyChart.setOption(option);\n// handle click event and redirect to corresponding Baidu search page\nmyChart.on(&#39;click&#39;, function (params) {\n    window.open(&#39;https://www.baidu.com/s?wd=&#39; + encodeURIComponent(params.name));\n});\n</code></pre>\n<p>All types of mouse events have a common parameter called <code class=\"codespan\">params</code>, which is an object that contains data information of the clicked chart, whose format is as followed:</p>\n<pre><code class=\"lang-js\">{\n    // component name of clicked component\n    // e.g., &#39;series&#39;, &#39;markLine&#39;, &#39;markPoint&#39;, &#39;timeLine&#39;\n    componentType: string,\n    // series type (useful when componentType is &#39;series&#39;)\n    // e.g., &#39;line&#39;, &#39;bar&#39;, &#39;pie&#39;\n    seriesType: string,\n    // series index in option.series (useful when componentType is &#39;series&#39;)\n    seriesIndex: number,\n    // series name (useful when componentType is &#39;series&#39;)\n    seriesName: string,\n    // data name, or category name\n    name: string,\n    // data index in input data array\n    dataIndex: number,\n    // raw input data item\n    data: Object,\n    // Some series, such as sankey or graph, maintains both nodeData and edgeData,\n    // in which case, dataType is set to be &#39;node&#39; or &#39;edge&#39; to identify.\n    // On the other hand, most other series have only one type of data,\n    // where dataType is not needed.\n    dataType: string,\n    // input data value\n    value: number|Array\n    // color of component (useful when componentType is &#39;series&#39;)\n    color: string\n}\n</code></pre>\n<p>How to know where the mouse clicked:</p>\n<pre><code class=\"lang-js\">myChart.on(&#39;click&#39;, function (params) {\n    if (params.componentType === &#39;markPoint&#39;) {\n        // clicked on markPoint\n        if (params.seriesIndex === 5) {\n            // clicked on a markPoint which belongs to a series indexed with 5\n        }\n    }\n    else if (params.componentType === &#39;series&#39;) {\n        if (params.seriesType === &#39;graph&#39;) {\n            if (params.dataType === &#39;edge&#39;) {\n                // clicked on an edge of the graph\n            }\n            else {\n                // clicked on a node of the graph\n            }\n        }\n    }\n});\n</code></pre>\n<p>Use <code class=\"codespan\">query</code> to call handler only on the graphic elements of the specified components:</p>\n<pre><code class=\"lang-js\">chart.on(eventName, query, handler);\n</code></pre>\n<p><code class=\"codespan\">query</code> can be <code class=\"codespan\">string</code> or <code class=\"codespan\">Object</code>.</p>\n<p>If <code class=\"codespan\">string</code>, the formatter can be &#39;mainType&#39; or &#39;mainType.subType&#39;. For example:</p>\n<pre><code class=\"lang-js\">chart.on(&#39;click&#39;, &#39;series&#39;, function () {...});\nchart.on(&#39;click&#39;, &#39;series.line&#39;, function () {...});\nchart.on(&#39;click&#39;, &#39;dataZoom&#39;, function () {...});\nchart.on(&#39;click&#39;, &#39;xAxis.category&#39;, function () {...});\n</code></pre>\n<p>If <code class=\"codespan\">Object</code>, one or more properties below can be included, and any of them is optional.</p>\n<pre><code class=\"lang-js\">{\n    &lt;mainType&gt;Index: number // component index\n    &lt;mainType&gt;Name: string // component name\n    &lt;mainType&gt;Id: string // component id\n    dataIndex: number // data item index\n    name: string // data item name\n    dataType: string // data item type, e.g.,\n                     // &#39;node&#39; and &#39;edge&#39; in graph.\n    element: string // element name in custom series\n}\n</code></pre>\n<p>For example:</p>\n<pre><code class=\"lang-js\">chart.setOption({\n    // ...\n    series: [{\n        name: &#39;uuu&#39;\n        // ...\n    }]\n});\nchart.on(&#39;mouseover&#39;, {seriesName: &#39;uuu&#39;}, function () {\n    // When the graphic elements in the series with name &#39;uuu&#39; mouse overed, this method called.\n});\n</code></pre>\n<p>For example:</p>\n<pre><code class=\"lang-js\">chart.setOption({\n    // ...\n    series: [{\n        // ...\n    }, {\n        // ...\n        data: [\n            {name: &#39;xx&#39;, value: 121},\n            {name: &#39;yy&#39;, value: 33}\n        ]\n    }]\n});\nchart.on(&#39;mouseover&#39;, {seriesIndex: 1, name: &#39;xx&#39;}, function () {\n    // When the graphic elements of the data item with name &#39;xx&#39; in the series with index 1 mouse overed, this method called.\n});\n</code></pre>\n<p>For example:</p>\n<pre><code class=\"lang-js\">chart.setOption({\n    // ...\n    series: [{\n        type: &#39;graph&#39;,\n        nodes: [{name: &#39;a&#39;, value: 10}, {name: &#39;b&#39;, value: 20}],\n        edges: [{source: 0, target: 1}]\n    }]\n});\nchart.on(&#39;click&#39;, {dataType: &#39;node&#39;}, function () {\n    // When the nodes of the graph clicked, this method is called.\n});\nchart.on(&#39;click&#39;, {dataType: &#39;edge&#39;}, function () {\n    // When the edges of the graph clicked, this method is called.\n});\n</code></pre>\n<p>For example:</p>\n<pre><code class=\"lang-js\">chart.setOption({\n    // ...\n    series: {\n        // ...\n        type: &#39;custom&#39;,\n        renderItem: function (params, api) {\n            return {\n                type: &#39;group&#39;,\n                children: [{\n                    type: &#39;circle&#39;,\n                    name: &#39;my_el&#39;,\n                    // ...\n                }, {\n                    // ...\n                }]\n            }\n        },\n        data: [[12, 33]]\n    }\n})\nchart.on(&#39;click&#39;, {element: &#39;my_el&#39;}, function () {\n    // When the element with name &#39;my_el&#39; clicked, this method called.\n});\n</code></pre>\n<p>You may update chart or show customized layer with information got from your own data warehouse, indexed from data name or series name of an object received from a callback function. Sample code is shown as followed:</p>\n<pre><code class=\"lang-js\">myChart.on(&#39;click&#39;, function (parmas) {\n    $.get(&#39;detail?q=&#39; + params.name, function (detail) {\n        myChart.setOption({\n            series: [{\n                name: &#39;pie&#39;,\n                // present data distribution  of a single bar through pie chart\n                data: [detail.data]\n            }]\n        });\n    });\n});\n</code></pre>\n<h2 id=\"interaction-events-with-components\">Interaction Events with Components</h2>\n<p>Basically all component interactions in ECharts trigger corresponding events. Frequently used events and corresponding parameters are listed in <a href=\"api.html#events\" target=\"_blank\">events</a>.</p>\n<p>Below is example that listens to a legend toggling:</p>\n<pre><code class=\"lang-js\">// legend toggling triggers legendselectchanged event only\nmyChart.on(&#39;legendselectchanged&#39;, function (params) {\n    // obtain selecting status of clicked legend\n    var isSelected = params.selected[params.name];\n    // print in console\n    console.log((isSelected ? &#39;select&#39; : &#39;unselect&#39;) + &#39;legend&#39; + params.name);\n    // print all legend status\n    console.log(params.selected);\n});\n</code></pre>\n<h2 id=\"triggering-component-actions-through-code-in-echarts\">Triggering Component Actions through Code in ECharts</h2>\n<p>Actions like <code class=\"codespan\">&#39;legendselectchanged&#39;</code> mentioned above will be triggered by component interaction. Besides that, sometimes we need to trigger certain actions in our program, such as showing tooltip, or selecting legend.</p>\n<p>ECharts 2.x triggers actions through <code class=\"codespan\">myChart.component.tooltip.showTip</code>, whose entrance is deep and involves organization of inner components. On the other hand, ECharts 3 triggers actions through <code class=\"codespan\">myChart.dispatchAction({ type: &#39;&#39; })</code>, which manages all actions in a uniformed way, and may record user&#39;s event path when need.</p>\n<p>Frequently used actions and the parameters are listed in <a href=\"api.html#action\" target=\"_blank\">action</a>.</p>\n<p>Below displays how to highlight each sector of pie chart in turn through <code class=\"codespan\">dispatchAction</code>.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/pie-highlight&edit=1&reset=1\" width=\"600\" height=\"400\" ></iframe>\n\n\n\n<h2 id=\"listen-to-events-from-the-blank\">Listen to events from the blank</h2>\n<p>Sometimes developers need to listen to the events that are triggered from the blank of the canvas. For example, need to reset the chart when users click on the blank.</p>\n<p>Before we talk about this feature, we need to clarify two kinds of events: <code class=\"codespan\">zrender events</code> and <code class=\"codespan\">echarts events</code>.</p>\n<pre><code class=\"lang-js\">myChart.getZr().on(&#39;click&#39;, function (event) {\n    // This listener is listening to a `zrender event`.\n});\nmyChart.on(&#39;click&#39;, function (event) {\n    // This listener is listening to a `echarts event`.\n});\n</code></pre>\n<p><code class=\"codespan\">zrender events</code> are different from <code class=\"codespan\">echarts events</code>. The former one are triggered when mouse/pointer is at everywhere, while the latter one can only be triggered when mouse/pointer is at the graphic elements. In fact, <code class=\"codespan\">echarts events</code> are implemented based on <code class=\"codespan\">zrender events</code>, that is, when a <code class=\"codespan\">zrender events</code> is triggered at a graphic element, <code class=\"codespan\">echarts</code> will trigger a <code class=\"codespan\">echarts event</code>.</p>\n<p>Having <code class=\"codespan\">zrender events</code>, we can implement &quot;listen to events from the blank&quot; as follows:</p>\n<pre><code class=\"lang-js\">myChart.getZr().on(&#39;click&#39;, function (event) {\n    // No &quot;target&quot; means that mouse/pointer is not on\n    // any of the graphic elements, which is &quot;blank&quot;.\n    if (!event.target) {\n        // Click on blank. Do something.\n    }\n});\n</code></pre>\n"},"Bar Race":{"type":["*"],"description":"<p>Bar race is a chart that shows changes in the ranking of data over time and it is supported by default sinde ECharts 5.</p>\n<blockquote>\n<p>Bar race charts usually use horizontal bars. If you want to use vertical bars, just take the X axis and Y axis in this tutorial to the opposite.</p>\n</blockquote>\n<ol>\n<li>Set <code class=\"codespan\">yAxis.realtimeSort</code> to be <code class=\"codespan\">true</code> to enable bar race</li>\n<li>Set <code class=\"codespan\">yAxis.inverse</code> to be <code class=\"codespan\">true</code> to display longer bars at top</li>\n<li><code class=\"codespan\">yAxis.animationDuration</code> is suggested to be set to be <code class=\"codespan\">300</code> for bar reordering animation for the first time</li>\n<li><code class=\"codespan\">yAxis.animationDurationUpdate</code> is suggested to be set to be <code class=\"codespan\">300</code> for bar reordering animation for later times</li>\n<li>Set <code class=\"codespan\">yAxis.max</code> to be <em>n - 1</em> where <em>n</em> is the number of bars to be displayed; otherwise, all bars are displayed</li>\n<li><code class=\"codespan\">xAxis.max</code> is suggested to be set to be <code class=\"codespan\">&#39;dataMax&#39;</code> so that the maximum of data is used as X maximum.</li>\n<li>If realtime label changing is required, set <code class=\"codespan\">series.label.valueAnimation</code> to be <code class=\"codespan\">true</code></li>\n<li>Set <code class=\"codespan\">animationDuration</code> to be <code class=\"codespan\">0</code> so that the first animation doesn&#39;t start from 0; if you wish otherwise, set it to be the same value as <code class=\"codespan\">animationDurationUpdate</code></li>\n<li><code class=\"codespan\">animationDurationUpdate</code> is suggested to be set to be <code class=\"codespan\">3000</code> for animation update duration, which should be the same as the frequency of calling <code class=\"codespan\">setOption</code></li>\n<li>Call <code class=\"codespan\">setOption</code> to update data to be of next time with <code class=\"codespan\">setInterval</code> at the frequency of <code class=\"codespan\">animationDurationUpdate</code></li>\n</ol>\n<p>A full example is:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=bar-race&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n<p>As you see, there are many options to be set to enable bar race effect. We are going to provide a tool that doesn&#39;t require any coding to help you make bar race charts more easily.</p>\n"},"An Example: Implement Dragging":{"type":["*"],"description":"<p>This is a tiny example, introducing how to implement dragging of graphic elements in Apache ECharts<sup>TM</sup>. 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/en/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. Although it is simple example, but we can do more based on that, like edit charts viually. So let&#39;s get started from this simple example.</p>\n<h2 id=\"-part-1-implement-basic-dragging\">[ Part 1 ] Implement basic dragging</h2>\n<p>First of all, we create a basic <a href=\"option.html#series-line\" target=\"_blank\">line chart (line series)</a>:</p>\n<pre><code class=\"lang-js\">var symbolSize = 20;\nvar data = [[15, 0], [-50, 10], [-56.5, 20], [-46.5, 30], [-22.1, 40]];\n\nmyChart.setOption({\n    xAxis: {\n        min: -100,\n        max: 80,\n        type: &#39;value&#39;,\n        axisLine: {onZero: false}\n    },\n    yAxis: {\n        min: -30,\n        max: 60,\n        type: &#39;value&#39;,\n        axisLine: {onZero: false}\n    },\n    series: [\n        {\n            id: &#39;a&#39;,\n            type: &#39;line&#39;,\n            smooth: true,\n            // Set a big symbolSize for dragging convenience.\n            symbolSize: symbolSize,\n            data: data\n        }\n    ]\n});\n</code></pre>\n<p>Since the symbols in line is not draggable, we make them draggable by using <a href=\"option.html#graphic\" target=\"_blank\">graphic component</a> to add draggable circular elements to symbols respectively.</p>\n<pre><code class=\"lang-js\">myChart.setOption({\n    // Declare a graphic component, which contains some graphic elements\n    // with the type of &#39;circle&#39;.\n    // Here we have used the method `echarts.util.map`, which has the same\n    // behavior as Array.prototype.map, and is compatible with ES5-.\n    graphic: echarts.util.map(data, function (dataItem, dataIndex) {\n        return {\n            // &#39;circle&#39; means this graphic element is a shape of circle.\n            type: &#39;circle&#39;,\n\n            shape: {\n                // The radius of the circle.\n                r: symbolSize / 2\n            },\n            // Transform is used to located the circle. position:\n            // [x, y] means translate the circle to the position [x, y].\n            // The API `convertToPixel` is used to get the position of\n            // the circle, which will introduced later.\n            position: myChart.convertToPixel(&#39;grid&#39;, dataItem),\n\n            // Make the circle invisible (but mouse event works as normal).\n            invisible: true,\n            // Make the circle draggable.\n            draggable: true,\n            // Give a big z value, which makes the circle cover the symbol\n            // in line series.\n            z: 100,\n            // This is the event handler of dragging, which will be triggered\n            // repeatly while dragging. See more details below.\n            // A util method `echarts.util.curry` is used here to generate a\n            // new function the same as `onPointDragging`, except that the\n            // first parameter is fixed to be the `dataIndex` here.\n            ondrag: echarts.util.curry(onPointDragging, dataIndex)\n        };\n    })\n});\n</code></pre>\n<p>In the code above, API <a href=\"api.html#echartsInstance.convertToPixel\" target=\"_blank\">convertToPixel</a> is used to convert data to its &quot;pixel coodinate&quot;, based on which each graphic elements can be rendered on canvas. The term &quot;pixel coodinate&quot; means the coordinate is in canvas pixel, whose origin is the top-left of the canvas. In the sentence <code class=\"codespan\">myChart.convertToPixel(&#39;grid&#39;, dataItem)</code>, the first parameter <code class=\"codespan\">&#39;grid&#39;</code> indicates that <code class=\"codespan\">dataItem</code> should be converted in the first <a href=\"option.html#grid\" target=\"_blank\">grid component (cartesian)</a>.</p>\n<p><strong>Notice:</strong> <code class=\"codespan\">convertToPixel</code> should not be called before the first time that <code class=\"codespan\">setOption</code> called. Namely, it can only be used after coordinate systems (grid/polar/...) initialized.</p>\n<p>Now points have been made draggable. Then we will bind event listeners on dragging to those points.</p>\n<pre><code class=\"lang-js\">// This function will be called repeatly while dragging.\n// The mission of this function is to update `series.data` based on\n// the new points updated by dragging, and to re-render the line\n// series based on the new data, by which the graphic elements of the\n// line series can be synchronized with dragging.\nfunction onPointDragging(dataIndex) {\n    // Here the `data` is declared in the code block in the beginning\n    // of this article. The `this` refers to the dragged circle.\n    // `this.position` is the current position of the circle.\n    data[dataIndex] = myChart.convertFromPixel(&#39;grid&#39;, this.position);\n    // Re-render the chart based on the updated `data`.\n    myChart.setOption({\n        series: [{\n            id: &#39;a&#39;,\n            data: data\n        }]\n    });\n}\n</code></pre>\n<p>In the code above, API <a href=\"api.html#echartsInstance.convertFromPixel\" target=\"_blank\">convertFromPixel</a> is used, which is the reversed process of <a href=\"api.html#echartsInstance.convertToPixel\" target=\"_blank\">convertToPixel</a>. <code class=\"codespan\">myChart.convertFromPixel(&#39;grid&#39;, this.position)</code> converts a pixel coordinate to data item in <a href=\"option.html#grid\" target=\"_blank\">grid (cartesian)</a>.</p>\n<p>Finally, add those code to make graphic elements responsive to change of canvas size.</p>\n<pre><code class=\"lang-js\">window.addEventListener(&#39;resize&#39;, function () {\n    // Re-calculate the position of each circle and update chart using `setOption`.\n    myChart.setOption({\n        graphic: echarts.util.map(data, function (item, dataIndex) {\n            return {\n                position: myChart.convertToPixel(&#39;grid&#39;, item)\n            };\n        })\n    });\n});\n\n</code></pre>\n<h2 id=\"-part-2-add-tooltip-component\">[ Part 2 ] Add tooltip component</h2>\n<p>Now basic functionality have been implemented by parte 1. If we need the data can be displayed realtime when dragging, we can use <a href=\"option.html#tooltip\" target=\"_blank\">tooltip component</a> to do that. Nevertheless, tooltip component has its default &quot;show/hide rule&quot;, which is not applicable in this case. So we need to customize the &quot;show/hide rule&quot; for our case.</p>\n<p>Add these snippets to the code block above:</p>\n<pre><code class=\"lang-js\">myChart.setOption({\n    ...,\n    tooltip: {\n        // Means disable default &quot;show/hide rule&quot;.\n        triggerOn: &#39;none&#39;,\n        formatter: function (params) {\n            return &#39;X: &#39; + params.data[0].toFixed(2) + &#39;&lt;br&gt;Y: &#39; + params.data[1].toFixed(2);\n        }\n    }\n});\n</code></pre>\n<pre><code class=\"lang-js\">myChart.setOption({\n    graphic: echarts.util.map(data, function (item, dataIndex) {\n        return {\n            type: &#39;circle&#39;,\n            ...,\n            // Customize &quot;show/hide rule&quot;, show when mouse over, hide when mouse out.\n            onmousemove: echarts.util.curry(showTooltip, dataIndex),\n            onmouseout: echarts.util.curry(hideTooltip, dataIndex),\n        };\n    })\n});\n\nfunction showTooltip(dataIndex) {\n    myChart.dispatchAction({\n        type: &#39;showTip&#39;,\n        seriesIndex: 0,\n        dataIndex: dataIndex\n    });\n}\n\nfunction hideTooltip(dataIndex) {\n    myChart.dispatchAction({\n        type: &#39;hideTip&#39;\n    });\n}\n</code></pre>\n<p>The API <a href=\"api.html#echartsInstance.dispatchAction\" target=\"_blank\">dispatchAction</a> is used to show/hide tooltip content, where actions <a href=\"api.html#action.tooltip.showTip\" target=\"_blank\">showTip</a> and <a href=\"api.html#action.tooltip.hideTip\" target=\"_blank\">hideTip</a> is dispatched.</p>\n<h2 id=\"-part-3-full-code\">[ Part 3 ] Full code</h2>\n<p>Full code is shown as follow:</p>\n<pre><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n    &lt;meta charset=&quot;utf-8&quot;&gt;\n    &lt;script src=&quot;dist/echarts.min.js&quot;&gt;&lt;/script&gt;\n&lt;/head&gt;\n&lt;body&gt;\n    &lt;div id=&quot;main&quot; style=&quot;width: 600px;height:400px;&quot;&gt;&lt;/div&gt;\n    &lt;script type=&quot;text/javascript&quot;&gt;\n\n    var symbolSize = 20;\n    var data = [[15, 0], [-50, 10], [-56.5, 20], [-46.5, 30], [-22.1, 40]];\n\n    var myChart = echarts.init(document.getElementById(&#39;main&#39;));\n\n    myChart.setOption({\n        tooltip: {\n            triggerOn: &#39;none&#39;,\n            formatter: function (params) {\n                return &#39;X: &#39; + params.data[0].toFixed(2) + &#39;&lt;br&gt;Y: &#39; + params.data[1].toFixed(2);\n            }\n        },\n        xAxis: {\n            min: -100,\n            max: 80,\n            type: &#39;value&#39;,\n            axisLine: {onZero: false}\n        },\n        yAxis: {\n            min: -30,\n            max: 60,\n            type: &#39;value&#39;,\n            axisLine: {onZero: false}\n        },\n        series: [\n            {\n                id: &#39;a&#39;,\n                type: &#39;line&#39;,\n                smooth: true,\n                symbolSize: symbolSize,\n                data: data\n            }\n        ],\n    });\n\n    myChart.setOption({\n        graphic: echarts.util.map(data, function (item, dataIndex) {\n            return {\n                type: &#39;circle&#39;,\n                position: myChart.convertToPixel(&#39;grid&#39;, item),\n                shape: {\n                    r: symbolSize / 2\n                },\n                invisible: true,\n                draggable: true,\n                ondrag: echarts.util.curry(onPointDragging, dataIndex),\n                onmousemove: echarts.util.curry(showTooltip, dataIndex),\n                onmouseout: echarts.util.curry(hideTooltip, dataIndex),\n                z: 100\n            };\n        })\n    });\n\n    window.addEventListener(&#39;resize&#39;, function () {\n        myChart.setOption({\n            graphic: echarts.util.map(data, function (item, dataIndex) {\n                return {\n                    position: myChart.convertToPixel(&#39;grid&#39;, item)\n                };\n            })\n        });\n    });\n\n    function showTooltip(dataIndex) {\n        myChart.dispatchAction({\n            type: &#39;showTip&#39;,\n            seriesIndex: 0,\n            dataIndex: dataIndex\n        });\n    }\n\n    function hideTooltip(dataIndex) {\n        myChart.dispatchAction({\n            type: &#39;hideTip&#39;\n        });\n    }\n\n    function onPointDragging(dataIndex, dx, dy) {\n        data[dataIndex] = myChart.convertFromPixel(&#39;grid&#39;, this.position);\n        myChart.setOption({\n            series: [{\n                id: &#39;a&#39;,\n                data: data\n            }]\n        });\n    }\n\n&lt;/script&gt;\n&lt;/body&gt;\n&lt;/html&gt;\n</code></pre><p><br></p>\n<p>With knowledge introduced above, more feature can be implemented. For example, <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom component</a> can be added to cooperate with the cartesian, or we can make a plotting board on coordinate systems. Use your imagination ~</p>\n"},"Custom Series":{"type":["*"],"description":"<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 does Apache ECharts<sup>TM</sup> supports <code class=\"codespan\">custom series</code>?</p>\n<p>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 necessary to provide an approach to make new types of chart for developers. This approach should be as simple as possible, which had better not to bothered developers with some details of implementation, such as creating and deleting graphic elements, transition animation, tooltip supporting, working with <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a> or <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a>. Having considered the factors above, a solution <a href=\"option.html#series-custom\" target=\"_blank\">custom series</a> is published.</p>\n<p><strong>For example, a &quot;x-range&quot; chart is made by custom sereis:</strong></p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=custom-profile&reset=1&edit=1\" width=\"800\" height=\"500\" ></iframe>\n\n\n<p><strong><a href=\"https://echarts.apache.org/examples/en/index.html#chart-type-custom\" target=\"_blank\">More samples of custom series</a></strong></p>\n<p>Let&#39;s begin the tutorial.</p>\n<h2 id=\"-i-the-method-renderitem\">(I) The method <code class=\"codespan\">renderItem</code></h2>\n<p>The snippet of graphic elements rendering should be written in <code class=\"codespan\">renderItem</code> method my developers. For example:</p>\n<pre><code class=\"lang-js\">var option = {\n    ...,\n    series: [{\n        type: &#39;custom&#39;,\n        renderItem: function (params, api) {\n            // ...\n        },\n        data: data\n    }]\n}\n</code></pre>\n<p>In the rendering phase of echarts workflow, <a href=\"option.html#series-custom.renderItem\" target=\"_blank\">renderItem</a> is called respectively for each <code class=\"codespan\">dataItem</code> in <a href=\"option.html#series-custom.data\" target=\"_blank\">series.data</a>. <code class=\"codespan\">renderItem</code> is responsible for build a group of definitions of graphic elements, including graphic type, size, location, style, etc. echarts will then build graphic elements according to those definitions. For example:</p>\n<pre><code class=\"lang-js\">var option = {\n    ...,\n    series: [{\n        type: &#39;custom&#39;,\n        renderItem: function (params, api) {\n            // This method will be called for each dataItem repectively.\n            // Notice: it does not ensure that called according to the order\n            // of `dataItem`.\n\n            // Some processes, such as coordinate conversion.\n            // `api.value(0)` is used to retrieve the value on the first\n            // dimension in the current `dataItem`.\n            var categoryIndex = api.value(0);\n            // `api.coord(...)` is used to convert data values to pixel values,\n            // will are necessary for graphic elements rendering.\n            var startPoint = api.coord([api.value(1), categoryIndex]);\n            var endPoint = api.coord([api.value(2), categoryIndex]);\n            // `api.size(...)` is used to calculate the pixel size corresponding to\n            // the a value range that the length is 1 on Y axis.\n            var height = api.size([0, 1])[1] * 0.6;\n\n            // The property `shape` incicates the location and size of thsi\n            // element.\n            // `echarts.graphic.clipRectByRect` is used for clipping the\n            // rectangular when it overflow the bounding box of the current\n            // coordinate system (cartesian).\n            // If the rect is totally clipped, returns undefined.\n            var rectShape = echarts.graphic.clipRectByRect({\n                // position and location of the rectangular.\n                x: startPoint[0],\n                y: startPoint[1] - height / 2,\n                width: endPoint[0] - startPoint[0],\n                height: height\n            }, {\n                // Bounding box of the current cooridinate system (cartesian).\n                x: params.coordSys.x,\n                y: params.coordSys.y,\n                width: params.coordSys.width,\n                height: params.coordSys.height\n            })\n\n            // Returns definitions for the current `dataItem`.\n            return rectShape &amp;&amp; {\n                // &#39;rect&#39; indicates that the graphic element is rectangular.\n                // Can also be &#39;circle&#39;, &#39;sector&#39;, &#39;polygon&#39;, ...\n                type: &#39;rect&#39;,\n                shape: rectShape,\n                // `api.style(...)` is used to obtain style settings, which\n                // includes itemStyle settings in optino and the result of\n                // visual mapping.\n                style: api.style()\n            };\n        },\n        data: [\n            [12, 44, 55, 60], // The first dataItem.\n            [53, 31, 21, 56], // The second dataItem.\n            [71, 33, 10, 20], // The third dataItem.\n            ...\n        ]\n    }]\n}\n</code></pre>\n<p><a href=\"option.html#series-custom.renderItem\" target=\"_blank\">renderItem</a> provides two parameters:</p>\n<ul>\n<li><a href=\"option.html#series-custom.renderItem.arguments.params\" target=\"_blank\">params</a>:provides info about the current series (such as <code class=\"codespan\">seriesIndex</code>、<code class=\"codespan\">dataIndex</code>, etc.) and data (such as <code class=\"codespan\">dataIndex</code>, <code class=\"codespan\">dataIndexInside</code>, etc.) and coordinate system (such as location and size of bounding box of the current coordinate system)</li>\n<li><a href=\"option.html#series-custom.renderItem.arguments.api\" target=\"_blank\">api</a> provides some methods to developers (such as <code class=\"codespan\">api.value()</code>, <code class=\"codespan\">api.coord()</code>).</li>\n</ul>\n<p><a href=\"option.html#series-custom.renderItem\" target=\"_blank\">renderItem</a> method should return definitions of graphic elements for the current <code class=\"codespan\">dataItem</code>. See <a href=\"option.html#series-custom.renderItem.return\" target=\"_blank\">renderItem.return</a>.</p>\n<p>Generally, the main process of <a href=\"option.html#series-custom.renderItem\" target=\"_blank\">renderItem</a> is that retrieve value from data and convert them to graphic elements on the current coordinate system. Two methods in <a href=\"option.html#series-custom.renderItem.arguments.api\" target=\"_blank\">renderItem.arguments.api</a> are always used in this procedure:</p>\n<ul>\n<li><a href=\"option.html#series-custom.renderItem.arguments.api.value\" target=\"_blank\">api.value(...)</a> is used to retrieve value from data. For example, <code class=\"codespan\">api.value(0)</code> retrieve the value of the first dimension in the current data item.</li>\n<li><a href=\"option.html#series-custom.renderItem.arguments.api.coord\" target=\"_blank\">api.coord(...)</a> is used to convert data to coordinate. For example, <code class=\"codespan\">var point = api.coord([api.value(0), api.value(1)])</code> converet the data to the point on the current coordinate system.</li>\n</ul>\n<p>Sometimes <a href=\"option.html#series-custom.renderItem.arguments.api.size\" target=\"_blank\">api.size(...)</a> method is needed, which calculates the size on the coordinate system by a given data range.</p>\n<p>Moreover, <a href=\"option.html#series-custom.renderItem.arguments.api.style\" target=\"_blank\">api.style(...)</a> method can be used to set style. It provides not only the style settings specified in <a href=\"option.html#series-custom.itemStyle\" target=\"_blank\">series.itemStyle</a>, but also the result of visual mapping. This method can also be called like <code class=\"codespan\">api.style({fill: &#39;green&#39;, stroke: &#39;yellow&#39;})</code> to override those style settings.</p>\n<p>Having <code class=\"codespan\">renderItem</code> provided, 90% of the work of creating custom series has been accomplished. The rest of this work is to refine and polish them.</p>\n<h2 id=\"-ii-make-the-extent-of-axes-fit-the-data\">(II) Make the extent of axes fit the data</h2>\n<p>There is axes in some coordinate systems, such as <a href=\"option.html#grid\" target=\"_blank\">cartesian2d (grid)</a>and <a href=\"option.html#polar\" target=\"_blank\">polar</a>. The extent of an axis should fit the data automatically, otherwise the graphic elements would be overflow the bounding box of the coordinate system. So, for example, in <a href=\"option.html#grid\" target=\"_blank\">cartesian2d (grid)</a>, developers should specify that which dimensions correspond to <code class=\"codespan\">x</code> axis and which to <code class=\"codespan\">y</code> axis use the property <a href=\"option.html#series-custom.encode\" target=\"_blank\">encode</a>:</p>\n<pre><code class=\"lang-js\">option = {\n    series: [{\n        type: &#39;custom&#39;,\n        renderItem: function () {\n            ...\n        },\n        encode: {\n            // `dim1` and `dim2` correspond to `x` axis.\n            x: [1, 2],\n            // `dim0` corresponds to `y` axis.\n            y: 0\n        },\n        data: [\n            // dim0  dim1  dim2  dim3\n            [   12,   44,   55,   60   ], // The first dataItem.\n            [   53,   31,   21,   56   ], // The second dataItem.\n            [   71,   33,   10,   20   ], // The third dataItem.\n            ...\n        ]\n    }]\n};\n</code></pre>\n<h2 id=\"-iii-set-tooltip-content\">(III) Set tooltip content</h2>\n<p>Of course <a href=\"option.html#tooltip.formatter\" target=\"_blank\">tooltip.formatter</a> can be used to define the content in tooltip. But it is easier to do that by setting <a href=\"option.html#series-custom.encode\" target=\"_blank\">encode</a> and <a href=\"option.html#series-custom.dimensions\" target=\"_blank\">dimensions</a>:</p>\n<pre><code class=\"lang-js\">option = {\n    series: [{\n        type: &#39;custom&#39;,\n        renderItem: function () {\n            ...\n        },\n        encode: {\n            x: [1, 2],\n            y: 0,\n            // `dim2` and `dim3` will displayed in tooltip.\n            tooltip: [2, 3]\n        },\n        // `dim2` is named as &quot;Age&quot; and `dim3` is named as &quot;Satisfaction&quot;.\n        dimensions: [null, null, &#39;Age&#39;, &#39;Satisfaction&#39;],\n        data: [\n            // dim0  dim1  dim2  dim3\n            [   12,   44,   55,   60   ],\n            [   53,   31,   21,   56   ],\n            [   71,   33,   10,   20   ],\n            ...\n        ]\n    }]\n};\n</code></pre>\n<p><br>\n<br>\n<br></p>\n<hr>\n<p>Several other issues about <code class=\"codespan\">custom series</code> are introduced below.</p>\n<h2 id=\"-iv-shape-clipping-when-overflow-the-coordinates-area\">(IV) Shape clipping when overflow the coordinates area</h2>\n<p>When use <code class=\"codespan\">custom series</code> with <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a>, <a href=\"option.html#dataZoom.filterMode\" target=\"_blank\">dataZoom.filterMode</a> usually be set as <code class=\"codespan\">&#39;weakFilter&#39;</code>, which prevent <code class=\"codespan\">dataItem</code> from being filtered when only part of its dimensions are out of the current data window. For example:</p>\n<pre><code class=\"lang-js\">option = {\n    dataZoom: {\n        xAxisIndex: 0,\n        filterMode: &#39;weakFilter&#39;\n    },\n    series: [{\n        type: &#39;custom&#39;,\n        renderItem: function () {\n            ...\n        },\n        encode: {\n            x: [1, 2],\n            y: 0\n        },\n        data: [\n            // dim0  dim1  dim2  dim3\n            [   12,   44,   55,   60   ], // The first dataItem.\n            [   53,   31,   21,   56   ], // The second dataItem.\n            [   71,   33,   10,   20   ], // The third dataItem.\n            ...\n        ]\n    }]\n};\n</code></pre>\n<p>In the example above, <code class=\"codespan\">dim</code> and <code class=\"codespan\">dim2</code> corresponds to <code class=\"codespan\">x</code> axis, and the <code class=\"codespan\">dataZoom</code> component constrols the data window of <code class=\"codespan\">x</code> axis. If part of a <code class=\"codespan\">dataItem</code> is overflow the extent of <code class=\"codespan\">x</code> axis (the value on <code class=\"codespan\">dim1</code> is overflow and the value on <code class=\"codespan\">dim2</code> is not) while zooming, the <code class=\"codespan\">dataItem</code> will not be filtered if <code class=\"codespan\">dataZoom.filterMode = &#39;weakFilter&#39;</code> set. Thus the <code class=\"codespan\">dataItem</code> can be still rendered (usually be partially rendered by using <code class=\"codespan\">echarts.graphic.clipRectByRect</code> to clip the exceeding part).\nSee the example mentioned above <a href=\"https://echarts.apache.org/examples/en/editor.html?c=custom-profile\" target=\"_blank\">Profile</a>.</p>\n<h2 id=\"-v-about-dataindex\">(V) About dataIndex</h2>\n<p>Developers had better notice that in <a href=\"option.html#series-custom.renderItem.arguments.params\" target=\"_blank\">renderItem.arguments.params</a> <code class=\"codespan\">dataIndexInside</code> and <code class=\"codespan\">dataIndex</code> is different:</p>\n<ul>\n<li><code class=\"codespan\">dataIndex</code> is the index of a <code class=\"codespan\">dataItem</code> in the original data.</li>\n<li><code class=\"codespan\">dataIndexInside</code> is the index of a <code class=\"codespan\">dataItem</code> in the current data window (see <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a>.</li>\n</ul>\n<p><a href=\"option.html#series-custom.renderItem.arguments.api\" target=\"_blank\">renderItem.arguments.api</a> uses <code class=\"codespan\">dataIndexInside</code> as the input parameter but not <code class=\"codespan\">dataIndex</code>, because conversion from <code class=\"codespan\">dataIndex</code> to <code class=\"codespan\">dataIndexInside</code> is time-consuming.</p>\n<h2 id=\"-vi-event-listener\">(VI) Event listener</h2>\n<pre><code class=\"lang-js\">chart.setOption({\n    // ...\n    series: {\n        type: &#39;custom&#39;,\n        renderItem: function () {\n            // ...\n            return {\n                type: &#39;group&#39;,\n                children: [{\n                    type: &#39;circle&#39;\n                    // ...\n                }, {\n                    type: &#39;circle&#39;,\n                    name: &#39;aaa&#39;,\n                    // User specified info, available\n                    // in event handler.\n                    info: 12345,\n                    // ...\n                }]\n            };\n        }\n    }\n});\nchart.on(&#39;click&#39;, {element: &#39;aaa&#39;}, function (params) {\n    // When the element with name &#39;aaa&#39; clicked,\n    // this method called.\n    console.log(params.info);\n});\n</code></pre>\n<h2 id=\"-vii-custom-vector-shapes\">(VII) Custom vector shapes</h2>\n<p><a href=\"http://www.w3.org/TR/SVG/paths.html#PathData\" target=\"_blank\">SVG PathData</a> is supported, which enables to use shapes that are created in vector tool. See <a href=\"option.html#series-custom.renderItem.return_path\" target=\"_blank\">path</a>, and examples: <a href=\"https://echarts.apache.org/examples/en/editor.html?c=custom-calendar-icon\" target=\"_blank\">icons</a>, <a href=\"https://echarts.apache.org/examples/en/editor.html?c=custom-gantt-flight\" target=\"_blank\">shapes</a>.</p>\n<p><br></p>\n<p><strong><a href=\"https://echarts.apache.org/examples/en/index.html#chart-type-custom\" target=\"_blank\">More examples about custom series</a></strong></p>\n"},"Rich Text":{"type":["*"],"description":"<p>Rich text can be used in Apache ECharts<sup>TM</sup> labels of series, axis or other components. For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=pie-rich-text&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=treemap-obama&edit=1&reset=1\" width=\"800\" height=\"550\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=bar-rich-text&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<p><br></p>\n<p>More examples:\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=map-labels&amp;edit=1&amp;reset=1\" target=\"_blank\">Map Labels</a>,\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=pie-nest&amp;edit=1&amp;reset=1\" target=\"_blank\">Pie Labels</a>,\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=gauge-car&amp;edit=1&amp;reset=1\" target=\"_blank\">Gauge</a>.</p>\n<p><br></p>\n<p>Before v3.7, the style options was only able to applied to the whole label text block, and only color and font can be configured, which restricted the expressability of text descriptions.</p>\n<p>Since v3.7, rich text has been supported:</p>\n<ul>\n<li>Box styles (background, border, shadow, etc.), rotation, position of a text block can be specified.</li>\n<li>Styles (color, font, width/height, background, shadow, etc.) and alignment can be customzied on fragments of text.</li>\n<li>Image can be used in text as icon or background.</li>\n<li>Combine these configurations, some special effects can be made, such as simple table, horizontal rule (hr).</li>\n</ul>\n<p>At the beginning, the meanings of two terms that will be used below should be clarified:</p>\n<ul>\n<li>Text Block: The whole block of label text.</li>\n<li>Text fragment: Some piece of text in a text block.</li>\n</ul>\n<p>For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/text-block-fragment&edit=1&reset=1\" width=\"340\" height=\"240\" ></iframe>\n\n\n\n<h2 id=\"options-about-text\">Options about Text</h2>\n<p>echarts provides plenty of text options, including:</p>\n<ul>\n<li>Basic font style: <code class=\"codespan\">fontStyle</code>, <code class=\"codespan\">fontWeight</code>, <code class=\"codespan\">fontSize</code>, <code class=\"codespan\">fontFamily</code>.</li>\n<li>Fill of text: <code class=\"codespan\">color</code>.</li>\n<li>Stroke of text: <code class=\"codespan\">textBorderColor</code>, <code class=\"codespan\">textBorderWidth</code>.</li>\n<li>Shadow of text: <code class=\"codespan\">textShadowColor</code>, <code class=\"codespan\">textShadowBlur</code>, <code class=\"codespan\">textShadowOffsetX</code>, <code class=\"codespan\">textShadowOffsetY</code>.</li>\n<li>Box size of text block or text fragment: <code class=\"codespan\">lineHeight</code>, <code class=\"codespan\">width</code>, <code class=\"codespan\">height</code>, <code class=\"codespan\">padding</code>.</li>\n<li>Alignment of text block or text fragment: <code class=\"codespan\">align</code>, <code class=\"codespan\">verticalAlign</code>.</li>\n<li>Border, background (color or image) of text block or text fragment: <code class=\"codespan\">backgroundColor</code>, <code class=\"codespan\">borderColor</code>, <code class=\"codespan\">borderWidth</code>, <code class=\"codespan\">borderRadius</code>.</li>\n<li>Shadow of text block or text fragment: <code class=\"codespan\">shadowColor</code>, <code class=\"codespan\">shadowBlur</code>, <code class=\"codespan\">shadowOffsetX</code>, <code class=\"codespan\">shadowOffsetY</code>.</li>\n<li>Position and rotation of text block: <code class=\"codespan\">position</code>, <code class=\"codespan\">distance</code>, <code class=\"codespan\">rotate</code>.</li>\n</ul>\n<p>User can defined styles for text fragment in <code class=\"codespan\">rich</code> property. For example, <a href=\"option.html#series-bar.label.rich\" target=\"_blank\">series-bar.label.rich</a></p>\n<p>For example:</p>\n<pre><code class=\"lang-js\">label: {\n    // Styles defined in &#39;rich&#39; can be applied to some fragments\n    // of text by adding some markers to those fragment, like\n    // `{styleName|text content text content}`.\n    // `&#39;\\n&#39;` is the newline character.\n    formatter: [\n        &#39;{a|Style &quot;a&quot; is applied to this fragment}&#39;\n        &#39;{b|Style &quot;b&quot; is applied to this fragment}This fragment use default style{x|use style &quot;x&quot;}&#39;\n    ].join(&#39;\\n&#39;),\n\n    // Styles for the whole text block are defined here:\n    color: &#39;#333&#39;,\n    fontSize: 5,\n    fontFamily: &#39;Arial&#39;,\n    borderWidth: 3,\n    backgroundColor: &#39;#984455&#39;,\n    padding: [3, 10, 10, 5],\n    lineHeight: 20,\n\n    // Styles for text fragments are defined here:\n    rich: {\n        a: {\n            color: &#39;red&#39;,\n            lineHeight: 10\n        },\n        b: {\n            backgroundColor: {\n                image: &#39;xxx/xxx.jpg&#39;\n            },\n            height: 40\n        },\n        x: {\n            fontSize: 18,\n            fontFamily: &#39;Microsoft YaHei&#39;,\n            borderColor: &#39;#449933&#39;,\n            borderRadius: 4\n        },\n        ...\n    }\n}\n</code></pre>\n<blockquote>\n<p>Notice: <code class=\"codespan\">width</code> 和 <code class=\"codespan\">height</code> only work when <code class=\"codespan\">rich</code> specified.</p>\n</blockquote>\n<h2 id=\"basic-styles-of-text-text-block-and-text-fragment\">Basic Styles of Text, Text Block and Text Fragment</h2>\n<p>Basic font style can be set to text: <code class=\"codespan\">fontStyle</code>, <code class=\"codespan\">fontWeight</code>, <code class=\"codespan\">fontSize</code>, <code class=\"codespan\">fontFamily</code>.</p>\n<p>Fill color and stroke color can be set to text: <code class=\"codespan\">color</code>, <code class=\"codespan\">textBorderColor</code>, <code class=\"codespan\">textBorderWidth</code>.</p>\n<p>Border style and background style can be set to text block: <code class=\"codespan\">borderColor</code>, <code class=\"codespan\">borderWidth</code>, <code class=\"codespan\">backgroundColor</code>, <code class=\"codespan\">padding</code>.</p>\n<p>Border style and background style can be set to text fragment too: <code class=\"codespan\">borderColor</code>, <code class=\"codespan\">borderWidth</code>, <code class=\"codespan\">backgroundColor</code>, <code class=\"codespan\">padding</code>.</p>\n<p>For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/text-options&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n\n<h2 id=\"label-position\">Label Position</h2>\n<p><code class=\"codespan\">label</code> option can be use in charts like <code class=\"codespan\">bar</code>, <code class=\"codespan\">line</code>, <code class=\"codespan\">scatter</code>, etc. The position of a label, can be specified by <a href=\"option.html#series-scatter.label.position\" target=\"_blank\">label.position</a>、<a href=\"option.html#series-scatter.label.distance\" target=\"_blank\">label.distance</a>.</p>\n<p>For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/label-position&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<blockquote>\n<p>Notice, there are different optional values of <code class=\"codespan\">position</code> by different chart types. And <code class=\"codespan\">distance</code> is not supported in every chart. More detailed info can be checked in <a href=\"option.html\" target=\"_blank\">option doc</a>.</p>\n</blockquote>\n<h2 id=\"label-rotation\">Label Rotation</h2>\n<p>Sometimes label is needed to be rotated. For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=bar-label-rotation&edit=1&reset=1\" width=\"900\" height=\"500\" ></iframe>\n\n\n<p><a href=\"option.html#series-bar.label.align\" target=\"_blank\">align</a> and<a href=\"option.html#series-bar.label.verticalAlign\" target=\"_blank\">verticalAlign</a> can be used to adjust location of label in this scenario.</p>\n<p>Notice, <code class=\"codespan\">align</code> and <code class=\"codespan\">verticalAlign</code> are applied firstly, then rotate.</p>\n<h2 id=\"layout-and-alignment-of-text-fragment\">Layout and Alignment of Text fragment</h2>\n<p>To understand the layout rule, every text fragment can be imagined as a <code class=\"codespan\">inline-block</code> dom element in CSS.</p>\n<p><code class=\"codespan\">content box size</code> of a text fragment is determined by its font size by default. It can also be specified directly by <code class=\"codespan\">width</code> and <code class=\"codespan\">height</code>, although they are rarely set. <code class=\"codespan\">border box size</code> of a text fragment is calculated by adding the <code class=\"codespan\">border box size</code> and <code class=\"codespan\">padding</code>.</p>\n<p>Only <code class=\"codespan\">&#39;\\n&#39;</code> is the newline character, which breaks a line.</p>\n<p>Multiple text fragment exist in a single line. The height of a line is determined by the biggest <code class=\"codespan\">lineHeight</code> of text fragments. <code class=\"codespan\">lineHeight</code> of a text fragment can be specified in <code class=\"codespan\">rich</code>, or in the parent level of <code class=\"codespan\">rich</code>, otherwise using <code class=\"codespan\">box size</code> of the text fragment.</p>\n<p>Having <code class=\"codespan\">lineHeight</code> determined, the vertical position of text fragments can be determined by <code class=\"codespan\">verticalAlign</code> (there is a little different from the rule in CSS):</p>\n<ul>\n<li><code class=\"codespan\">&#39;bottom&#39;</code>: The bottom edge of the text fragment sticks to the bottom edge of the line.</li>\n<li><code class=\"codespan\">&#39;top&#39;</code>: The top edge of the text fragment sticks to the top edge of the line.</li>\n<li><code class=\"codespan\">&#39;middle&#39;</code>: In the middle of the line.</li>\n</ul>\n<p>The width of a text block can be specified by <code class=\"codespan\">width</code>, otherwise, by the longest line. Having the width determined, text fragment can be placed in each line, where the horizontal position of text fragments can be determined by its <code class=\"codespan\">align</code>.</p>\n<ul>\n<li>Firstly, place text fragments whose <code class=\"codespan\">align</code> is <code class=\"codespan\">&#39;left&#39;</code> from left to right continuously.</li>\n<li>Secondly, place text fragments whose <code class=\"codespan\">align</code> is <code class=\"codespan\">&#39;right&#39;</code> from right to left continuously.</li>\n<li>Finally, the text fragments remained will be sticked and placed in the center of the rest of space.</li>\n</ul>\n<p>The position of text in a text fragment:</p>\n<ul>\n<li>If <code class=\"codespan\">align</code> is <code class=\"codespan\">&#39;center&#39;</code>, text aligns at the center of the text fragment box.</li>\n<li>If <code class=\"codespan\">align</code> is <code class=\"codespan\">&#39;left&#39;</code>, text aligns at the left of the text fragment box.</li>\n<li>If <code class=\"codespan\">align</code> is <code class=\"codespan\">&#39;right&#39;</code>, text aligns at the right of the text fragment box.</li>\n</ul>\n<p>For example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/text-fragment-align&edit=1&reset=1\" width=\"800\" height=\"220\" ></iframe>\n\n\n\n\n<h2 id=\"effects-icon-horizontal-rule-title-block-simple-table\">Effects: Icon, Horizontal Rule, Title Block, Simple Table</h2>\n<p>See example:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/title-block&edit=1&reset=1\" width=\"600\" height=\"400\" ></iframe>\n\n\n<p>Icon is implemented by using image in <code class=\"codespan\">backgroundColor</code>.</p>\n<pre><code class=\"lang-js\">rich: {\n    Sunny: {\n        backgroundColor: {\n            image: &#39;./data/asset/img/weather/sunny_128.png&#39;\n        },\n        // Can only height specified, but leave width auto obtained\n        // from the image, where the aspect ratio kept.\n        height: 30\n    }\n}\n</code></pre>\n<p>Horizontal rule (like HTML &lt;hr&gt; tag) can be implemented by border:</p>\n<pre><code class=\"lang-js\">rich: {\n    hr: {\n        borderColor: &#39;#777&#39;,\n        // width is set as &#39;100%&#39; to fullfill the text block.\n        // Notice, the percentage is based on the content box, without\n        // padding. Although it is a little different from CSS rule,\n        // it is convinent in most cases.\n        width: &#39;100%&#39;,\n        borderWidth: 0.5,\n        height: 0\n    }\n}\n</code></pre>\n<p>Title block can be implemented by <code class=\"codespan\">backgroundColor</code>:</p>\n<pre><code class=\"lang-js\">// Title is at left.\nformatter: &#39;{titleBg|Left Title}&#39;,\nrich: {\n    titleBg: {\n        backgroundColor: &#39;#000&#39;,\n        height: 30,\n        borderRadius: [5, 5, 0, 0],\n        padding: [0, 10, 0, 10],\n        width: &#39;100%&#39;,\n        color: &#39;#eee&#39;\n    }\n}\n\n// Title is in the center of the line.\n// This implementation is a little tricky, but is works\n// without more complicated layout mechanism involved.\nformatter: &#39;{tc|Center Title}{titleBg|}&#39;,\nrich: {\n    titleBg: {\n        align: &#39;right&#39;,\n        backgroundColor: &#39;#000&#39;,\n        height: 30,\n        borderRadius: [5, 5, 0, 0],\n        padding: [0, 10, 0, 10],\n        width: &#39;100%&#39;,\n        color: &#39;#eee&#39;\n    }\n}\n</code></pre>\n<p>Simple table can be implemented by specify the same width to text fragments that are in the same column of different lines. See the <a href=\"https://echarts.apache.org/examples/en/view.html?c=pie-rich-text&amp;edit=1&amp;reset=1\" target=\"_blank\">example</a> at the mentioned above.</p>\n"},"Server-side Rendering":{"type":["*"],"description":"<p>Apache ECharts<sup>TM</sup> can be rendered at server-side. For example, the thumbnails in the <a href=\"https://echarts.apache.org/examples/en/index.html\" target=\"_blank\">official examples page</a> are generated at a server.</p>\n<p>Commonly used headless tool is required, for example, <a href=\"https://github.com/GoogleChrome/puppeteer\" target=\"_blank\">puppeteer</a>, <a href=\"https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md\" target=\"_blank\">headless chrome</a>, <a href=\"https://github.com/Automattic/node-canvas\" target=\"_blank\">node-canvas</a>, <a href=\"https://github.com/jsdom/jsdom\" target=\"_blank\">jsdom</a>, <a href=\"http://phantomjs.org/\" target=\"_blank\">PhantomJS</a>, etc.</p>\n<p>Some solutions contributed by the community are list as follows:</p>\n<ul>\n<li><a href=\"https://github.com/hellosean1025/node-echarts\" target=\"_blank\">https://github.com/hellosean1025/node-echarts</a></li>\n<li><a href=\"https://github.com/chfw/echarts-scrappeteer\" target=\"_blank\">https://github.com/chfw/echarts-scrappeteer</a></li>\n<li><a href=\"https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js\" target=\"_blank\">https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js</a></li>\n<li><a href=\"https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73\" target=\"_blank\">https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73</a></li>\n</ul>\n<p>Notice: if server-side rendering result is different from browser-side rendering, please set <a href=\"option.html#animation\" target=\"_blank\">animation</a> as <code class=\"codespan\">false</code> and try again.</p>\n"},"Render by Canvas or SVG":{"type":["*"],"description":"<p>Most of browser-side charting libraries use SVG or Canvas as their underlying renderer. In the scope of Apache ECharts<sup>TM</sup>, they are usually alternative, without critical differences. But in some environment and scenarios, they show notable differences in performance or functionality.</p>\n<p>ECharts has been using Canvas as its renderer (use VML for IE8-) from the beginning. As of <a href=\"https://github.com/apache/echarts/releases\" target=\"_blank\">ECharts v3.8</a> we provide an SVG renderer (beta version) as another option. Either of them can be used by specifing parameter <a href=\"api.html#echarts.init\" target=\"_blank\">renderer</a> as <code class=\"codespan\">&#39;canvas&#39;</code> or <code class=\"codespan\">&#39;svg&#39;</code> when initailizing a chart instance.</p>\n<blockquote>\n<p>Both SVG and Canvas, which are very different rendering implementations, are supported in ECharts by leveraging the Canvas and SVG renderers offered by the <a href=\"https://github.com/ecomfe/zrender\" target=\"_blank\">zrender</a> library.</p>\n</blockquote>\n<h2 id=\"how-to-make-a-choice-\">How to make a choice?</h2>\n<p>Generally speaking, Canvas is suitable for cases where there is a large amount of graphical elements (usually due to a large amount of data points), like heatmap and lines or scatter plot with large data in geo or parallel coordinates. In addition, it supports some <a href=\"https://echarts.apache.org/examples/en/editor.html?c=lines-bmap-effect\" target=\"_blank\">special visual effect</a> not supported by SVG. However, in some other scenarios SVG has some critical advantages: it consumes less memory than Canvas (especially in mobile devices), and gives better performance in rendering. Moreover, it never blurs when zooming the viewport of the browser whereas Canvas may blur.</p>\n<p>How to make a choice? These factors, hardware and software environment, data amount and functional requirements, should be considered.</p>\n<ul>\n<li>When not constrained by hardware/software, and the data amount is not large, both should provide equally satisfactory results.</li>\n<li>When encountering performance issues, we can attempt to get better result by choose appropriate renderer.<ul>\n<li>If lots of ECharts instances have to be created, and it causes the browser crash (probably caused by that the large memory consumption) we can try the SVG renderer. Or, generally, when running on some old Android devices, or if we are using some kind of charts like <a href=\"https://ecomfe.github.io/echarts-liquidfill/example/\" target=\"_blank\">liquidfill</a>, the SVG renderer probably gives a better performance.</li>\n<li>If visualizing a large amount of data, or complicated human interactions with data is required, the Canvas renderer works better currently.</li>\n</ul>\n</li>\n</ul>\n<p>Therefore <a href=\"https://github.com/apache/echarts/issues/new\" target=\"_blank\">feedback</a> of experiences and usage scenarios are strongly welcomed, which will help improve the these renderers.</p>\n<h2 id=\"how-to-use-specify-a-renderer-\">How to use specify a renderer?</h2>\n<p>ECharts uses Canvas by default. If a user intends to use the SVG renderer, the module of the SVG renderer should be included in ECharts bundle.</p>\n<ul>\n<li>In the <a href=\"https://www.jsdelivr.com/package/npm/echarts\" target=\"_blank\">pre-build</a> of ECharts, the SVG renderer has been included in <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.common.min.js\" target=\"_blank\">common version</a> and <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js\" target=\"_blank\">complete version</a>. But not in <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.simple.min.js\" target=\"_blank\">simple version</a>.</li>\n<li>When <a href=\"https://echarts.apache.org/en/builder.html\" target=\"_blank\">building ECharts online</a>, the checkbox &quot;SVG Renderer&quot; should be checked.</li>\n<li>When <a href=\"tutorial.html#Use%20ECharts%20with%20bundler%20and%20NPM\" target=\"_blank\">building ECharts offline</a>, the SVG renderer module should be imported:</li>\n</ul>\n<pre><code class=\"lang-js\">import &#39;zrender/lib/svg/svg&#39;;\n</code></pre>\n<p>Then we can specify renderer by <a href=\"api.html#echarts.init\" target=\"_blank\">parameter</a>:</p>\n<pre><code class=\"lang-js\">// Use the Canvas renderer (default).\nvar chart = echarts.init(containerDom, null, {renderer: &#39;canvas&#39;});\n// which is equal to:\nvar chart = echarts.init(containerDom, null, {renderer: &#39;canvas&#39;});\n\n// Use the SVG renderer.\nvar chart = echarts.init(containerDom, null, {renderer: &#39;svg&#39;});\n</code></pre>\n"},"SVG Base Map in Geo Coords and Map Series":{"type":["*"],"description":"<p>Since <code class=\"codespan\">v5.1.0</code>, ECharts support to use SVG as the base map in <a href=\"option.html#geo\" target=\"_blank\">geo coordinate system</a> and <a href=\"option.html#series-map\" target=\"_blank\">map series</a>, where previously only <a href=\"http://geojson.org/\" target=\"_blank\">GeoJSON</a> is supported.</p>\n<p>This feature enables ECharts to display SVG in either of the render modes (<code class=\"codespan\">canvas</code> render mode and <code class=\"codespan\">svg</code> render mode), and enables features like <a href=\"option.html#geo.roam\" target=\"_blank\">zoom</a>, <a href=\"option.html#geo.roam\" target=\"_blank\">pan</a>, <a href=\"option.html#geo.select\" target=\"_blank\">select</a>, <a href=\"option.html#geo.emphasis\" target=\"_blank\">emphasis</a>, <a href=\"option.html#geo.emphasis.focus\" target=\"_blank\">focus-blur</a>, <a href=\"option.html#geo.label\" target=\"_blank\">label</a>, <a href=\"option.html#series-map.labelLayout\" target=\"_blank\">labelLayout</a>, <a href=\"option.html#geo.tooltip\" target=\"_blank\">tooltip</a> on SVG with only simple some ECharts options. Series like <a href=\"option.html#series-scatter\" target=\"_blank\">scatter</a>, <a href=\"option.html#series-effectScatter\" target=\"_blank\">effectScatter</a>, <a href=\"option.html#series-lines\" target=\"_blank\">lines</a>, <a href=\"option.html#series-custom\" target=\"_blank\">custom</a> that are available on <a href=\"option.html#geo\" target=\"_blank\">geo coordinate system</a> can also be positioned and displayed based on SVG base map.</p>\n<p>There are several examples where SVG base map is used:</p>\n<p><a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-beef-cuts\" target=\"_blank\">Beef Cuts</a> |\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-organ\" target=\"_blank\">Organ Visualization</a> |\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-seatmap-flight\" target=\"_blank\">Flight Seatmap</a> |\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-svg-map\" target=\"_blank\">SVG Map</a> |\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-svg-scatter-simple\" target=\"_blank\">SVG Scatter</a> |\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-svg-lines\" target=\"_blank\">SVG Lines</a> |\n<a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-svg-traffic\" target=\"_blank\">SVG Traffic</a></p>\n<h2 id=\"basic-usage\">Basic Usage</h2>\n<p>The usage of SVG base map is the same as the usage of <a href=\"http://geojson.org/\" target=\"_blank\">GeoJSON</a>.</p>\n<p>If used in <a href=\"option.html#geo\" target=\"_blank\">geo coordinate system</a>:</p>\n<pre><code class=\"lang-js\">$.get(&#39;map/organ.svg&#39;, function (svg) {\n    // Firstly we need to register SVG raw string or parsed SVG DOM\n    // to echarts with a name:\n    echarts.registerMap(&#39;organ_diagram&#39;, {svg: svg});\n\n    var chart = echarts.init(document.getElementById(&#39;main&#39;));\n    chart.setOption({\n        geo: {\n            // Reference it in echarts option.\n            map: &#39;organ_diagram&#39;,\n            ...\n        }\n    });\n});\n</code></pre>\n<p>If used in <a href=\"option.html#series-map\" target=\"_blank\">map series</a>:</p>\n<pre><code class=\"lang-js\">$.get(&#39;map/beef_cuts.svg&#39;, function (svg) {\n    // Firstly we need to register SVG raw string or parsed SVG DOM\n    // to echarts with a name:\n    echarts.registerMap(&#39;beef_cuts_diagram&#39;, {svg: svg});\n\n    var chart = echarts.init(document.getElementById(&#39;main&#39;));\n    chart.setOption({\n        series: {\n            type: &#39;map&#39;,\n            // Reference it in echarts option.\n            map: &#39;beef_cuts_diagram&#39;,\n            ...\n        }\n    });\n});\n</code></pre>\n<h2 id=\"zoom-and-pan\">Zoom and Pan</h2>\n<p>For <a href=\"option.html#geo\" target=\"_blank\">Geo coordinate system</a></p>\n<pre><code class=\"lang-js\">option = {\n    geo: {\n        // Enable zoom and pan.\n        roam: true,\n        ...\n    }\n};\n</code></pre>\n<p>For <a href=\"option.html#series-map\" target=\"_blank\">map series</a></p>\n<pre><code class=\"lang-js\">option = {\n    series: {\n        type: &#39;map&#39;,\n        // Enable zoom and pan.\n        roam: true,\n        ...\n    }\n};\n</code></pre>\n<p>See <a href=\"option.html#geo.roam\" target=\"_blank\">roam</a>.\nAlso see example <a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-svg-map\" target=\"_blank\">SVG Map</a>.</p>\n<h2 id=\"named-element\">Named Element</h2>\n<p>If intending to interact with some elements of SVG, we need to mark those elements in SVG firstly. That can be done simply by adding names to the target elements. The interaction related feature like <a href=\"option.html#geo.select\" target=\"_blank\">select</a>, <a href=\"option.html#geo.emphasis\" target=\"_blank\">emphasis</a>, <a href=\"option.html#geo.emphasis.focus\" target=\"_blank\">focus-blur</a>, <a href=\"option.html#geo.label\" target=\"_blank\">label</a>, <a href=\"option.html#series-map.labelLayout\" target=\"_blank\">labelLayout</a>, <a href=\"option.html#geo.tooltip\" target=\"_blank\">tooltip</a> depend on those named elements.</p>\n<p>For example, we add name attribute <code class=\"codespan\">name=&quot;named_rect&quot;</code> only to the left SVG <code class=\"codespan\">path</code>.</p>\n<pre><code class=\"lang-xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\n&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; version=&quot;1.2&quot; fill-rule=&quot;evenodd&quot; xml:space=&quot;preserve&quot;&gt;\n    &lt;path name=&quot;named_rect&quot; d=&quot;M 0,0 L 0,100 100,100 100,0 Z&quot; fill=&quot;#765&quot; /&gt;\n    &lt;path d=&quot;M 150,0 L 150,100 250,100 250,0 Z&quot; fill=&quot;#567&quot; /&gt;\n&lt;/svg&gt;\n</code></pre>\n<p>Then hover on the left rect, it can be highlighted, whereas the right one can not.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/geo-svg-named-basic&edit=1&reset=1\" width=\"500\" height=\"200\" ></iframe>\n\n\n<p>Option for some certain named elements can be specified in <a href=\"option.html#geo.regions\" target=\"_blank\">geo.regions</a>, like:</p>\n<pre><code class=\"lang-js\">option = {\n    geo: {\n        map: &#39;some_svg&#39;,\n        regions: [{\n            name: &#39;element_name_1&#39;,\n            itemStyle: { ... }\n        }, {\n            name: &#39;element_name_2&#39;,\n            itemStyle: { ... }\n        }]\n    }\n};\n</code></pre>\n<p>Note:</p>\n<ul>\n<li>These SVG elements can be named and recognized by ECharts:\n<code class=\"codespan\">rect</code>, <code class=\"codespan\">circle</code>, <code class=\"codespan\">line</code>, <code class=\"codespan\">ellipse</code>, <code class=\"codespan\">polygon</code>, <code class=\"codespan\">polyline</code>, <code class=\"codespan\">path</code>, <code class=\"codespan\">text</code>, <code class=\"codespan\">tspan</code>, <code class=\"codespan\">g</code>.</li>\n<li>It is supported that multiple elements are named with the same name, will they will be highlighted/selected together.</li>\n</ul>\n<h2 id=\"style-customization\">Style Customization</h2>\n<p>Although the style (such as color, font, lineWidth, ...) of SVG Elements can be defined directly in SVG file, style of named elements can also be customized in ECharts option, which will be handy in some scenario.</p>\n<p>Styles can be specified in <a href=\"option.html#geo.itemStyle\" target=\"_blank\">geo.itemStyle</a> and <a href=\"option.html#series-map.itemStyle\" target=\"_blank\">series-map.itemStyle</a> (also includes <code class=\"codespan\">emphasis.itemStyle</code>, <code class=\"codespan\">select.itemStyle</code>, <code class=\"codespan\">blur.itemStyle</code>, <code class=\"codespan\">regions[i].itemStyle</code>, <code class=\"codespan\">regions[i].emphasis.itemStyle</code>, <code class=\"codespan\">regions[i].select.itemStyle</code>, <code class=\"codespan\">regions[i].blur.itemStyle</code>). Some default style of the named elements can also be removed here (e.g., set <code class=\"codespan\">emphasis.itemStyle.color: null</code> to prevent the fill color from changing when mouse hovering.)</p>\n<p>Moreover, named elements can also be styled by <a href=\"option.html#visualMap\" target=\"_blank\">visualMap component</a> if using <a href=\"option.html#series-map\" target=\"_blank\">series-map</a>. See <a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-beef-cuts\" target=\"_blank\">Beef Cuts</a>.</p>\n<p>Note:\nOnly these named elements can be styled in <code class=\"codespan\">itemStyle</code>:\n<code class=\"codespan\">rect</code>, <code class=\"codespan\">circle</code>, <code class=\"codespan\">line</code>, <code class=\"codespan\">ellipse</code>, <code class=\"codespan\">polygon</code>, <code class=\"codespan\">polyline</code>, <code class=\"codespan\">path</code>.</p>\n<h2 id=\"select\">Select</h2>\n<p>Named elements can adopt &quot;select&quot; feature by setting <a href=\"option.html#geo.selectedMode\" target=\"_blank\">geo.selectedMode</a> or <a href=\"option.html#series-map.selectedMode\" target=\"_blank\">series-map.selectedMode</a> as <code class=\"codespan\">&#39;single&#39;</code> or <code class=\"codespan\">&#39;multiple&#39;</code>. The style of element when selected can be specified in <a href=\"option.html#geo.select\" target=\"_blank\">geo.select</a> or <a href=\"option.html#series-map.select\" target=\"_blank\">series-map.select</a>.</p>\n<p>The selected names can be obtained by <a href=\"api.html#event.geoselectchanged\" target=\"_blank\">geoselectchanged</a> event, like:</p>\n<pre><code class=\"lang-js\">myChart.on(&#39;geoselectchanged&#39;, function (params) {\n    var selectedNames = params.allSelected[0].name;\n    console.log(&#39;selected&#39;, selectedNames);\n});\n</code></pre>\n<p>See <a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-seatmap-flight\" target=\"_blank\">Flight Seatmap</a> for more details.</p>\n<h2 id=\"emphasis-and-focus-blur\">Emphasis and Focus-Blur</h2>\n<p><code class=\"codespan\">emphasis</code> state (highlight when hovering) can be auto adopted to named elements.</p>\n<p>Especially, <a href=\"option.html#geo.emphasis.focus\" target=\"_blank\">geo.emphasis.focus</a> and be set as <code class=\"codespan\">&#39;self&#39;</code> to enable &quot;focus-blur&quot; feature, where all all of the other elements will be blurred when hovering on an named element.</p>\n<p>See <a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-organ\" target=\"_blank\">Organ Visualization</a> for more details.</p>\n<h2 id=\"tooltip\">Tooltip</h2>\n<p>Tooltip can be enabled or disabled on named elements.</p>\n<pre><code class=\"lang-js\">option = {\n    // Need to declare the root tooltip to\n    // enable tooltip feature on ECharts.\n    tooltip: {},\n    geo: {\n        map: &#39;some_svg&#39;,\n        tooltip: {\n            // Use `show` to enable/disable tooltip\n            // on geo coordinate system.\n            show: true\n        },\n        regions: [{\n            name: &#39;some_name1&#39;,\n            // Set named element specified tooltip option if needed.\n            tooltip: {\n                formatter: &#39;some special tooltip 1&#39;\n            }\n        }, {\n            name: &#39;some_name2&#39;,\n            tooltip: {\n                formatter: &#39;some special tooltip 2&#39;\n            }\n        }]\n    }\n};\n</code></pre>\n<p>If intending to disable the geo tooltip when hovering a on named elements, just:</p>\n<pre><code class=\"lang-js\">option = {\n    tooltip: {},\n    geo: {\n        map: &#39;some_svg&#39;,\n        tooltip: {\n            show: false\n        }\n    }\n};\n</code></pre>\n<p>See <a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-svg-map\" target=\"_blank\">SVG Map</a> for more details.</p>\n<h2 id=\"label\">Label</h2>\n<p>Although text label can be declared in SVG file directly via <code class=\"codespan\">&lt;text&gt;</code>/<code class=\"codespan\">&lt;tspan&gt;</code>, we can also use ECharts built-in label feature on named elements by specifying <a href=\"option.html#geo.label\" target=\"_blank\">geo.label</a> or <a href=\"option.html#series-map.label\" target=\"_blank\">series-map.label</a>.</p>\n<p>By default the label feature is enabled when hovering on a named element. If intending to disable it, just:</p>\n<pre><code class=\"lang-js\">option = {\n    geo: {\n        map: &#39;some_svg&#39;,\n        emphasis: {\n            label: {\n                show: false\n            }\n        }\n    }\n};\n</code></pre>\n<p>When multiple elements need to share one label text, we have two choices:</p>\n<ul>\n<li>Wrap those elements in a named <code class=\"codespan\">&lt;g&gt;</code> (e.g., <code class=\"codespan\">&lt;g name=&quot;name_a&quot;&gt;</code>), where a single label will be displayed and located based on the bounding rect of the <code class=\"codespan\">&lt;g&gt;</code>.</li>\n<li>Name those elements with the same name (e.g., <code class=\"codespan\">&lt;path name=&quot;name_b&quot;/&gt;&lt;path name=&quot;name_b&quot;/&gt;</code>), where multiple labels will be displayed and located based on each elements self.</li>\n</ul>\n<p>For example (hover to show the labels):</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/geo-svg-label-basic&edit=1&reset=1\" width=\"500\" height=\"300\" ></iframe>\n\n\n<p>Note: Only these named elements can be labeled via <code class=\"codespan\">label</code> option:\n<code class=\"codespan\">rect</code>, <code class=\"codespan\">circle</code>, <code class=\"codespan\">line</code>, <code class=\"codespan\">ellipse</code>, <code class=\"codespan\">polygon</code>, <code class=\"codespan\">polyline</code>, <code class=\"codespan\">path</code>, <code class=\"codespan\">g</code>.</p>\n<p>Also see <a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-organ\" target=\"_blank\">Organ Visualization</a> for the usage of label.</p>\n<h2 id=\"events\">Events</h2>\n<p>Mouse events or touch events of named elements can be listened simply by:</p>\n<pre><code class=\"lang-js\">// &#39;name1&#39; is a name of a SVG element.\nmyChart.on(&#39;click&#39;, { geoIndex: 0, name: &#39;name1&#39; }, function (params) {\n    console.log(params);\n});\n</code></pre>\n<h2 id=\"layout-of-svg-base-map\">Layout of SVG Base Map</h2>\n<p>By default ECharts will position the SVG base map in the center of the canvas. If need some adjust, we usually only adjust <a href=\"option.html#geo.layoutCenter\" target=\"_blank\">layoutCenter</a>/<a href=\"option.html#geo.layoutSize\" target=\"_blank\">layoutSize</a>, and occasionally <code class=\"codespan\">&lt;svg viewBox=&quot;...&quot;&gt;</code>/<a href=\"option.html#geo.boundingCoords\" target=\"_blank\">geo.boundingCoords</a> (difference: clip or not). In most cases they are enough.</p>\n<p>If need some advanced precise control of the position and zoom, several concepts below can be noticed.</p>\n<p>The layout rule and options of <a href=\"option.html#geo\" target=\"_blank\">geo coordinate system</a> and <a href=\"option.html#series-map\" target=\"_blank\">map series</a> are the same. So we only demonstrate <a href=\"option.html#geo\" target=\"_blank\">geo coordinate system</a> below.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/geo-svg-layout-basic&edit=1&reset=1\" width=\"700\" height=\"550\" ></iframe>\n\n\n<p>The demo above shows six <a href=\"option.html#geo\" target=\"_blank\">geo coordinate system</a> with three SVG files in a single ECharts canvas. Each two <a href=\"option.html#geo\" target=\"_blank\">geo</a> that are in the same column use the same SVG file.</p>\n<p>Firstly, what shapes looks like is determined by SVG file itself. That is, in the demo above, determined by the <code class=\"codespan\">&lt;circle&gt;</code> and <code class=\"codespan\">viewBox</code> attribute (<code class=\"codespan\">viewBox</code> cut (clips) the circle). We can noticed that the final shape outlines in each column are the same (despite the difference in position, size and scratch), since they use the same SVG file.</p>\n<p>Secondly, users can use either of the two option groups below to determine the location and the size of the <code class=\"codespan\">geo view port</code> of <a href=\"option.html#geo\" target=\"_blank\">geo coordinate system</a> according to the entire chart canvas (all of these options are measured in echarts canvas pixel, or percentage value):</p>\n<ul>\n<li><a href=\"option.html#geo.layoutCenter\" target=\"_blank\">layoutCenter</a>, <a href=\"option.html#geo.layoutSize\" target=\"_blank\">layoutSize</a> (recommended).</li>\n<li><a href=\"option.html#geo.top\" target=\"_blank\">top</a>, <a href=\"option.html#geo.right\" target=\"_blank\">right</a>, <a href=\"option.html#geo.bottom\" target=\"_blank\">bottom</a>, <a href=\"option.html#geo.left\" target=\"_blank\">left</a> (which is used in the demo above).</li>\n</ul>\n<p>In the demo above, the six geo <code class=\"codespan\">geo view ports</code> are displayed as six black squares.</p>\n<p>Thirdly, a <code class=\"codespan\">bounding rect</code> of the SVG is determined, which is determined by methods below (all of them are measured in SVG local unit):</p>\n<ol>\n<li>If <a href=\"option.html#geo.boundingCoords\" target=\"_blank\">geo.boundingCoords</a> is specified, use it as <code class=\"codespan\">bounding rect</code>.</li>\n<li>Else if <code class=\"codespan\">&lt;svg width=&quot;...&quot; height=&quot;...&quot;&gt;</code> is specified, use <code class=\"codespan\">[0, 0, width, height]</code> as <code class=\"codespan\">bounding rect</code>. (If only <code class=\"codespan\">width</code> or only <code class=\"codespan\">height</code> is specified, only use <code class=\"codespan\">[0, width]</code> or <code class=\"codespan\">[0, height]</code>).</li>\n<li>Else if <code class=\"codespan\">svg viewBox=&quot;...&quot;&gt;</code> is specified, use <code class=\"codespan\">viewBox</code> as <code class=\"codespan\">bounding rect</code>.</li>\n<li>Else use the union bounding rect of all of the SVG elements as the <code class=\"codespan\">bounding rect</code>.</li>\n<li>If <a href=\"option.html#geo.center\" target=\"_blank\">geo.center</a> or <a href=\"option.html#geo.zoom\" target=\"_blank\">geo.zoom</a> is specified, transform the <code class=\"codespan\">bounding rect</code> determined by <code class=\"codespan\">1~4</code> above.</li>\n</ol>\n<p>Having <code class=\"codespan\">bounding rect</code> determined, it will be placed into its corresponding <code class=\"codespan\">geo view port</code>:</p>\n<ul>\n<li>If <a href=\"option.html#geo.layoutCenter\" target=\"_blank\">layoutCenter</a>, <a href=\"option.html#geo.layoutSize\" target=\"_blank\">layoutSize</a> is used, the <code class=\"codespan\">bounding rect</code> will be placed at the center and as big as possible into the <code class=\"codespan\">geo view port</code> (keep aspect ratio).</li>\n<li>If <a href=\"option.html#geo.top\" target=\"_blank\">top</a>, <a href=\"option.html#geo.right\" target=\"_blank\">right</a>, <a href=\"option.html#geo.bottom\" target=\"_blank\">bottom</a>, <a href=\"option.html#geo.left\" target=\"_blank\">left</a> is used, the view rect will be stretched to fill the <code class=\"codespan\">geo view port</code> entirely.</li>\n</ul>\n<h2 id=\"place-series-on-svg-base-map\">Place Series on SVG Base Map</h2>\n<p>Series like <a href=\"option.html#series-scatter\" target=\"_blank\">scatter</a>, <a href=\"option.html#series-effectScatter\" target=\"_blank\">effectScatter</a>, <a href=\"option.html#series-lines\" target=\"_blank\">lines</a>, <a href=\"option.html#series-custom\" target=\"_blank\">custom</a> that are available on <a href=\"option.html#geo\" target=\"_blank\">geo coordinate system</a> can also be positioned and displayed on SVG base map.</p>\n<p>Note that in this kind of usage the unit of series data value is the SVG file local coords. For example:</p>\n<pre><code class=\"lang-js\">option = {\n    geo: {\n        map: &#39;some_svg&#39;\n    },\n    series: {\n        type: &#39;effectScatter&#39;,\n        coordinateSystem: &#39;geo&#39;,\n        geoIndex: 0,\n        data: [\n            // SVG local coords.\n            [488.2358421078053, 459.70913833075736],\n            [770.3415644319939, 757.9672194986475],\n            [1180.0329284196291, 743.6141808346214],\n        ]\n    }\n};\n</code></pre>\n<p>By the way, there is a simple approach to get SVG local coord:</p>\n<pre><code class=\"lang-js\">myChart.setOption({\n    geo: {\n        map: &#39;some_svg&#39;\n    }\n});\nmyChart.getZr().on(&#39;click&#39;, function (params) {\n    var pixelPoint = [params.offsetX, params.offsetY];\n    var dataPoint = myChart.convertFromPixel({ geoIndex: 0 }, pixelPoint);\n    // When click, the data in SVG local coords will be printed,\n    // which can be used in `series.data`.\n    console.log(dataPoint);\n});\n</code></pre>\n<p>See also <a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-svg-scatter-simple\" target=\"_blank\">SVG Scatter</a>, <a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-svg-lines\" target=\"_blank\">SVG Lines</a>, <a href=\"https://echarts.apache.org/examples/en/editor.html?c=geo-traffic\" target=\"_blank\">SVG Traffic</a>.</p>\n<h2 id=\"unsupported-svg-features\">Unsupported SVG features</h2>\n<p>Unfortunately it is difficult to implement a complete SVG parser. While the common SVG features are supported, at least these features listed below are not supported yet:</p>\n<ul>\n<li>Flip and skew (will be supported <code class=\"codespan\">v5.1.2</code>):<ul>\n<li>Not support <code class=\"codespan\">transform: skew(...)</code> (including <code class=\"codespan\">transform: matrix(...)</code> that includes skew).</li>\n<li>Not support <code class=\"codespan\">transform: scale(x, y)</code> that <code class=\"codespan\">x</code>, <code class=\"codespan\">y</code> has different sign while has <code class=\"codespan\">rotate</code> (e.g., <code class=\"codespan\">scale: (1, -1), rotate(90)</code>).</li>\n</ul>\n</li>\n<li>Standalone <code class=\"codespan\">&lt;style&gt;</code> tag is not supported.<ul>\n<li>But inline style is supported (e.g., <code class=\"codespan\">&lt;path style=&quot;color:red&quot; /&gt;</code>).</li>\n</ul>\n</li>\n<li>Unit:<ul>\n<li>Only <code class=\"codespan\">px</code> is supported. Other unit like <code class=\"codespan\">width=&quot;231.65mm&quot;</code> is not supported.</li>\n<li>Percentage value like <code class=\"codespan\">&lt;svg width=&quot;30%&quot; height=&quot;40%&quot;&gt;</code> is not supported.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">&lt;defs&gt;</code> tag:<ul>\n<li>Only <code class=\"codespan\">&lt;linearGradient&gt;</code>, <code class=\"codespan\">&lt;radialGradient&gt;</code> are supported.</li>\n<li>other elements (e.g., <code class=\"codespan\">&lt;pattern&gt;</code>, <code class=\"codespan\">&lt;path&gt;</code>, ...) defined in <code class=\"codespan\">&lt;defs&gt;</code> are not supported yet.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">&lt;linearGradient&gt;</code>, <code class=\"codespan\">&lt;radialGradient&gt;</code>:<ul>\n<li><code class=\"codespan\">fx</code>, <code class=\"codespan\">fy</code> is not supported.</li>\n<li><code class=\"codespan\">gradientTransform</code> attribute is not supported.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">fill:url(...)</code>, <code class=\"codespan\">stroke:utl(...)</code>:<ul>\n<li>Only <code class=\"codespan\">url(#someId)</code> is supported.</li>\n<li>Other URL patterns are not supported. e.g.,<ul>\n<li><code class=\"codespan\">url(https://example.com/images/myImg.jpg)</code>;</li>\n<li><code class=\"codespan\">url(data:image/png;base64,iRxVB0…)</code>;</li>\n<li><code class=\"codespan\">url(myFont.woff)</code>;</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><code class=\"codespan\">&lt;switch&gt;</code> tag:<ul>\n<li>All the content inside <code class=\"codespan\">&lt;switch&gt;</code> tag will be displayed. The &quot;switch&quot; feature is not supported.</li>\n</ul>\n</li>\n<li><code class=\"codespan\">&lt;text&gt;</code>:<ul>\n<li><code class=\"codespan\">textPath</code> is not supported.</li>\n<li><a href=\"https://www.w3.org/TR/SVG/text.html#TermAddressableCharacter\" target=\"_blank\">Addressable character</a> is not supported. That is,<pre><code class=\"lang-xml\">&lt;!-- Not supported: --&gt;\n&lt;tspan x=&quot;0 4.94 9.89&quot;&gt;abc&lt;/tspan&gt;\n&lt;!-- Supported: --&gt;\n&lt;tspan x=&quot;0&quot;&gt;a&lt;/tspan&gt;\n&lt;tspan x=&quot;4.94&quot;&gt;b&lt;/tspan&gt;\n&lt;tspan x=&quot;9.89&quot;&gt;c&lt;/tspan&gt;\n</code></pre>\n</li>\n</ul>\n</li>\n</ul>\n"},"Supporting ARIA in Charts":{"type":["*"],"description":"<p>The W3C has developed the <a href=\"https://www.w3.org/WAI/intro/aria\" target=\"_blank\">WAI-ARIA</a>, the Accessible Rich Internet Applications Suite, which is dedicated to making web content and web applications accessible. Apache ECharts<sup>TM</sup> 4 complies with this specification by supporting the automatic generation of intelligent descriptions based on chart configuration items, allowing blind people to understand the chart content with the help of a reading device, making the chart accessible to a wider audience.</p>\n<p>By default, ARIA is disabled. To enable it, you should set <a href=\"#aria.enabled\">aria.enabled</a> to be <code class=\"codespan\">true</code>. After enabling, it will generate descriptions based on charts, series, data, and so on. Users may change the generated description.</p>\n<p><strong>For example:</strong></p>\n<p>For config:</p>\n<pre><code class=\"lang-js\">option = {\n    aria: {\n        show: true\n    },\n    title: {\n        text: &#39;Source of user access to a site&#39;,\n        x: &#39;center&#39;\n    },\n    series: [\n        {\n             Name: &#39;access source&#39;,\n            type: &#39;pie&#39;,\n            data: [\n                { value: 335, name: &#39;direct access&#39; },\n                { value: 310, name: &#39;mail marketing&#39; },\n                { value: 234, name: &#39;union ad&#39; },\n                { value: 135, name: &#39;video ad&#39; },\n                { value: 1548, name: &#39;search engine&#39; }\n            ]\n        }\n    ]\n};\n</code></pre>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/aria-pie&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n<p>There should be an <code class=\"codespan\">aria-label</code> attribute on the chart DOM, which can help the disabled understand the content of charts with the help of certain devices. The value of the label is:</p>\n<pre><code>This is a chart of &quot;Source of user access to a site.&quot; The chart type is a pie chart that indicates the source of the visit. The data is - direct access data is 335, mail marketing data is 310, union ad data is 234, video ad data is 135, search engine data is 1548.\n</code></pre><p>The default language is in defined by the language package (Chinese by default), but you can configure it with templates.</p>\n<p>In addition, Apache ECharts 5 now supports applique textures as a secondary expression of color to further differentiate data. If <code class=\"codespan\">aria.enabled</code> is set to <code class=\"codespan\">true</code>, <code class=\"codespan\">aria.decal.show</code> is set to <code class=\"codespan\">true</code> to adopt the default applique style.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/aria-decal-simple&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n\n<p>Next, let&#39;s describe more specifically how these two accessible designs can be configured.</p>\n<h2 id=\"chart-labels\">Chart Labels</h2>\n<h3 id=\"apply-overall-modification-description\">Apply Overall Modification Description</h3>\n<p>For some charts, the default generated descriptions of the data points are not sufficient to represent the overall information. For example, in the scatter plot below, the default description can include the coordinates of the data points, but knowing the coordinates of hundreds or thousands of points does not help us to effectively understand the information presented in the chart.</p>\n<p><img width=\"600\" height=\"auto\" src=\"documents/asset/img/aria-example.png\"></p>\n<p>At this point, the user can specify the overall description of the chart via the <a href=\"option.html#aria.label.description\" target=\"_blank\">aria.label.description</a> configuration item.</p>\n<h3 id=\"customizing-the-template-description\">Customizing the Template Description</h3>\n<p>In addition to modifying descriptions holistically, we also provide templates for generating descriptions that can be easily modified at a fine-grained level.</p>\n<p>The basic flow for generating descriptions is that if <a href=\"option.html#aria.label.show\" target=\"_blank\">aria.label.description</a> is set to <code class=\"codespan\">true</code>, then the accessibility description is generated, otherwise it is not. If <a href=\"option.html#aria.label.description\" target=\"_blank\">aria.label.description</a> is defined, it is used as the full description of the chart, otherwise the description is generated according to the template stitching. We provide a default algorithm for generating descriptions, and only if the generated descriptions are not quite right, we need to modify these templates, or even override them completely with <code class=\"codespan\">aria.description</code>.</p>\n<p>When using the template, whether <a href=\"#title.text\">title.text</a> is used along with <a href=\"option.html#aria.label.general.withTitle\" target=\"_blank\">aria.label.general.withTitle</a> while <a href=\"option.html#aria.label.general.withoutTitle\" target=\"_blank\">aria.label.general.withoutTitle</a> is used if there is no title text. <code class=\"codespan\">aria.general.withTitle</code> supports a template <code class=\"codespan\">&#39;{title}&#39;</code>, which will be replaced with chart title. This means, if <code class=\"codespan\">aria.general.withTitle</code> is set to be <code class=\"codespan\">&#39;The chart title is {title}.&#39;</code> and the chart title is <code class=\"codespan\">Price Distribution</code>, it will be interpreted into <code class=\"codespan\">&#39;The chart title is Price Distribution.&#39;</code></p>\n<p>After generating the title, the description of the series (<a href=\"option.html#aria.label.series\" target=\"_blank\">aria.label.series</a>) and the description of the data for each series (<a href=\"option.html#aria.label.data\" target=\"_blank\">aria.label.data</a>) are generated in turn. The following is an example of a template. Likewise, each template may include template variables to replace actual values.</p>\n<h2 id=\"decal-pattern\">Decal Pattern</h2>\n<p>The way to use the default applique pattern was described above. If you need to customize the decal pattern, you can use <a href=\"option.html#aria.decal.decals\" target=\"_blank\">aria.decal.decals</a> to configure a flexible decal pattern.</p>\n<iframe data-src=\"https://echarts.apache.org/examples/en/view.html?c=doc-example/aria-decal&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n<p>Please refer to <a href=\"option.html#aria\" target=\"_blank\">ARIA option</a> for more detail.</p>\n"}}}}
\ No newline at end of file
diff --git a/en/events.html b/en/events.html
index 6f77fec..a42956d 100644
--- a/en/events.html
+++ b/en/events.html
@@ -7,7 +7,7 @@
     document.head.insertBefore(el, document.getElementById('font-hack'));
 }
 </script><title>Events - Apache 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.apache.org/en/images/forie.png?_v_=20200710_1" alt="ie tip"></div></body><![endif]-->
-<!--[if (gt IE 8)|!(IE)]><body class="Events - Apache ECharts"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Please visit the official Apache ECharts Website at</p><a id="a2" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>Visit Official Website</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><nav class="navbar navbar-default navbar-fixed-top"><nav role="navigation" 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.apache.org/en/images/logo.png" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/en/index.html">Home</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Docs<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/feature.html">Features</a></li><li><a href="https://echarts.apache.org/en/tutorial.html">Tutorials</a></li><li><a href="https://echarts.apache.org/en/api.html">API</a></li><li><a href="https://echarts.apache.org/en/option.html">Chart Configuration</a></li><li><a href="https://echarts.apache.org/en/changelog.html">Changelog</a></li><li><a href="https://echarts.apache.org/en/faq.html">FAQ</a></li><li><a href="https://echarts.apache.org/en/tutorial.html#ECharts%205%20Upgrade%20Guide">V5 Upgrade Guide<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Download<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/download.html">Download</a></li><li><a href="https://echarts.apache.org/en/download-theme.html">Download Themes</a></li><li><a href="https://echarts.apache.org/en/download-extension.html">Download Extensions</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/en/index.html">Examples</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Resources<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/spreadsheet.html">Spread Sheet Tool</a></li><li><a href="https://echarts.apache.org/en/theme-builder.html">Theme Builder</a></li><li><a href="https://echarts.apache.org/en/cheat-sheet.html">Cheat Sheet</a></li><li><a href="https://echarts.apache.org/en/resources.html">More Resources</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Community<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/events.html">Events</a></li><li><a href="https://echarts.apache.org/en/committers.html">Committers</a></li><li><a href="https://echarts.apache.org/en/maillist.html">Mailing List</a></li><li><a href="https://echarts.apache.org/en/contributing.html">How to Contribute</a></li><li><a href="https://echarts.apache.org/en/dependencies.html">Dependencies</a></li><li><a href="https://echarts.apache.org/en/coding-standard.html">Code Standard</a></li><li><a href="https://github.com/apache/echarts" target="_blank">Source Code (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/en/security.html">Security</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">License<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">Events<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">Sponsorship<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">Thanks<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('zh')">中文</a></li></ul></div></div></nav></nav><div class="page-main"><div class="page-info"><div class="container"><h1>Events</h1><p class="page-info-echarts">Apache ECharts<sup>TM</sup></p></div></div><div class="page-content"><div class="container"><h2>Current Events</h2><a href="./events/2021-05-13-iscas.html" class="event"><picture><source data-srcset="https://echarts.apache.org/en/images/event/20210513-iscas-en.webp?_v_=20200710_1" type="image/webp" class="lazy"><source data-srcset="https://echarts.apache.org/en/images/event/20210513-iscas-en.jpeg?_v_=20200710_1" type="image/jpeg" class="lazy"><img data-src="https://echarts.apache.org/en/images/event/20210513-iscas-en.jpeg?_v_=20200710_1" alt="Summer 2021 of Open Source Promotion Plan" class="lazy"></picture></a></div></div><footer class="inner-footer"><div class="container"><div class="row"><div class="col-md-8"><p>Copyright © 2017-2021, The Apache Software Foundation Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.</p></div><div id="footer-icon-panel" class="col-md-4"><a href="https://www.apache.org"><img src="https://echarts.apache.org/en/images/asf_logo.svg?_v_=20200710_1" class="footer-apache-logo"></a></div></div></div></footer></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://echarts.apache.org/en/js/common.js?_v_=b5b8944fb9"></script><script type="text/javascript">window.lazyLoadOptions = {
+<!--[if (gt IE 8)|!(IE)]><body class="Events - Apache ECharts"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Please visit the official Apache ECharts Website at</p><a id="a2" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>Visit Official Website</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><nav class="navbar navbar-default navbar-fixed-top"><nav role="navigation" 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.apache.org/en/images/logo.png" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/en/index.html">Home</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Docs<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/feature.html">Features</a></li><li><a href="https://echarts.apache.org/en/tutorial.html">Tutorials</a></li><li><a href="https://echarts.apache.org/en/api.html">API</a></li><li><a href="https://echarts.apache.org/en/option.html">Chart Configuration</a></li><li><a href="https://echarts.apache.org/en/changelog.html">Changelog</a></li><li><a href="https://echarts.apache.org/en/faq.html">FAQ</a></li><li><a href="https://echarts.apache.org/en/tutorial.html#ECharts%205%20Upgrade%20Guide">V5 Upgrade Guide<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Download<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/download.html">Download</a></li><li><a href="https://echarts.apache.org/en/download-theme.html">Download Themes</a></li><li><a href="https://echarts.apache.org/en/download-extension.html">Download Extensions</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/en/index.html">Examples</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Resources<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/spreadsheet.html">Spread Sheet Tool</a></li><li><a href="https://echarts.apache.org/en/theme-builder.html">Theme Builder</a></li><li><a href="https://echarts.apache.org/en/cheat-sheet.html">Cheat Sheet</a></li><li><a href="https://echarts.apache.org/en/resources.html">More Resources</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Community<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/events.html">Events</a></li><li><a href="https://echarts.apache.org/en/committers.html">Committers</a></li><li><a href="https://echarts.apache.org/en/maillist.html">Mailing List</a></li><li><a href="https://echarts.apache.org/en/contributing.html">How to Contribute</a></li><li><a href="https://echarts.apache.org/en/dependencies.html">Dependencies</a></li><li><a href="https://echarts.apache.org/en/coding-standard.html">Code Standard</a></li><li><a href="https://github.com/apache/echarts" target="_blank">Source Code (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/en/security.html">Security</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">License<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">Events<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">Sponsorship<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">Thanks<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('zh')">中文</a></li></ul></div></div></nav></nav><div class="page-main"><div class="page-info"><div class="container"><h1>Events</h1><p class="page-info-echarts">Apache ECharts<sup>TM</sup></p></div></div><div class="page-content"><div class="container"><h2>Current Events</h2><a href="./events/2021-07-05-apachecon.html" class="event"><picture><source data-srcset="https://echarts.apache.org/en/images/event/20210705-apachecon-en.webp?_v_=20200710_1" type="image/webp" class="lazy"><source data-srcset="https://echarts.apache.org/en/images/event/20210705-apachecon-en.jpeg?_v_=20200710_1" type="image/jpeg" class="lazy"><img data-src="https://echarts.apache.org/en/images/event/20210705-apachecon-en.jpeg?_v_=20200710_1" alt="ApacheCon Asia 2021" class="lazy"></picture></a><h2>Previous Events</h2><a href="./events/2021-05-13-iscas.html" class="event"><picture><source data-srcset="https://echarts.apache.org/en/images/event/20210513-iscas-en.webp?_v_=20200710_1" type="image/webp" class="lazy"><source data-srcset="https://echarts.apache.org/en/images/event/20210513-iscas-en.jpeg?_v_=20200710_1" type="image/jpeg" class="lazy"><img data-src="https://echarts.apache.org/en/images/event/20210513-iscas-en.jpeg?_v_=20200710_1" alt="Summer 2021 of Open Source Promotion Plan" class="lazy"></picture></a></div></div><footer><div class="container"><div class="row"><div class="col-md-9"><p>Copyright © 2017-2021, The Apache Software Foundation Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.</p><div class="icon-panel"><a href="mailto:dev@echarts.apache.org?body=%28Thanks%20for%20using%20ECharts.%20Email%20us%20if%20you%20have%20non-technical%20problems%20using%20ECharts.%20For%20technical%20support%2C%20please%20go%20to%20https%3A//github.com/apache/echarts/issues%20.%29" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-email.png?_v_=20200710_1"></a><a href="https://twitter.com/ApacheECharts" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-twitter.png?_v_=20200710_1"></a><a href="https://weibo.com/echarts" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-weibo.png?_v_=20200710_1"></a><a href="https://github.com/apache/echarts" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-github.png?_v_=20200710_1"></a></div></div><div id="footer-icon-panel" class="col-md-3"><a href="https://www.apache.org"><img src="https://echarts.apache.org/en/images/asf_logo.svg?_v_=20200710_1" class="footer-apache-logo"></a></div></div></div></footer></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://echarts.apache.org/en/js/common.js?_v_=b5b8944fb9"></script><script type="text/javascript">window.lazyLoadOptions = {
     elements_selector: ".lazy"
 };
 document.getElementById('nav-contribute').className = 'active';</script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@12.0.0/dist/lazyload.min.js"></script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
diff --git a/en/events/2021-05-13-iscas.html b/en/events/2021-05-13-iscas.html
index 905ff7b..786b7ff 100644
--- a/en/events/2021-05-13-iscas.html
+++ b/en/events/2021-05-13-iscas.html
@@ -7,7 +7,7 @@
     document.head.insertBefore(el, document.getElementById('font-hack'));
 }
 </script><title>Events - Apache 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.apache.org/en/images/forie.png?_v_=20200710_1" alt="ie tip"></div></body><![endif]-->
-<!--[if (gt IE 8)|!(IE)]><body class="Events - Apache ECharts"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Please visit the official Apache ECharts Website at</p><a id="a2" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>Visit Official Website</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><nav class="navbar navbar-default navbar-fixed-top"><nav role="navigation" 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.apache.org/en/images/logo.png" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/en/index.html">Home</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Docs<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/feature.html">Features</a></li><li><a href="https://echarts.apache.org/en/tutorial.html">Tutorials</a></li><li><a href="https://echarts.apache.org/en/api.html">API</a></li><li><a href="https://echarts.apache.org/en/option.html">Chart Configuration</a></li><li><a href="https://echarts.apache.org/en/changelog.html">Changelog</a></li><li><a href="https://echarts.apache.org/en/faq.html">FAQ</a></li><li><a href="https://echarts.apache.org/en/tutorial.html#ECharts%205%20Upgrade%20Guide">V5 Upgrade Guide<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Download<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/download.html">Download</a></li><li><a href="https://echarts.apache.org/en/download-theme.html">Download Themes</a></li><li><a href="https://echarts.apache.org/en/download-extension.html">Download Extensions</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/en/index.html">Examples</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Resources<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/spreadsheet.html">Spread Sheet Tool</a></li><li><a href="https://echarts.apache.org/en/theme-builder.html">Theme Builder</a></li><li><a href="https://echarts.apache.org/en/cheat-sheet.html">Cheat Sheet</a></li><li><a href="https://echarts.apache.org/en/resources.html">More Resources</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Community<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/events.html">Events</a></li><li><a href="https://echarts.apache.org/en/committers.html">Committers</a></li><li><a href="https://echarts.apache.org/en/maillist.html">Mailing List</a></li><li><a href="https://echarts.apache.org/en/contributing.html">How to Contribute</a></li><li><a href="https://echarts.apache.org/en/dependencies.html">Dependencies</a></li><li><a href="https://echarts.apache.org/en/coding-standard.html">Code Standard</a></li><li><a href="https://github.com/apache/echarts" target="_blank">Source Code (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/en/security.html">Security</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">License<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">Events<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">Sponsorship<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">Thanks<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('zh')">中文</a></li></ul></div></div></nav></nav><div class="page-main"><div class="page-info"><div class="container"><h1>Summer 2021 of Open Source Promotion Plan</h1><p class="page-info-echarts">Apache ECharts<sup>TM</sup></p></div></div><div class="page-content"><div class="container"><div><a href="../events.html">Back to the event list</a></div><div class="event event-detail-img"><picture><source data-srcset="https://echarts.apache.org/en/images/event/20210513-iscas-en.webp?_v_=20200710_1" type="image/webp" class="lazy"><source data-srcset="https://echarts.apache.org/en/images/event/20210513-iscas-en.jpeg?_v_=20200710_1" type="image/jpeg" class="lazy"><img data-src="https://echarts.apache.org/en/images/event/20210513-iscas-en.jpeg?_v_=20200710_1" alt="Open Source Software Supply Chain Ignite Program - Summer 2021" class="lazy"></picture></div><h3>Event Description</h3><p><a href="https://summer.iscas.ac.cn/help/en/" target="_blank">Summer 2021 of Open Source Promotion Plan</a> is a summer program for college students jointly organized by Institute of Software Chinese Academy of Sciences and openEuler community. It aims to encourage college students to actively participate in the development and maintenance of open source software and promote the vigorous development of excellent open source software community.</p><p>The organizer will fund projects with student applications, and the corresponding pre-tax prizes are high (RMB 12,000), medium (RMB 9,000), and low (RMB 6,000) depending on the difficulty (note: the prize amounts are pre-tax RMB amounts). Please refer to the official instructions of the Open Source Software Supply Chain Illumination Program for details.</p><p>The community needs to designate a community mentor for each project, in the process, you can have a better understanding of the Apache ECharts project development with the help of the mentor.</p><h3>Event Registration</h3><p>Please go to the <a href="https://summer.iscas.ac.cn/help/en/student/" target="_blank">event website</a> to register or for more information.</p><h3>Project List</h3><p>Applicants can complete one project from the following list.</p><table><tr><th>ID</th><th>Name</th><th>Difficulty</th><th style="width: 40%">Description</th><th>Delivery</th><th>Requirement</th></tr><tr><td>#1</td><td>Graph series support for dragging nodes</td><td>Easy</td><td>Support for dragging nodes in case of graph series with layout: none, see: <a href="https://github.com/apache/echarts/issues/14510" target="_blank">#14510</a></td><td>Support for dragging nodes in case of graph series with layout: none</td><td>TypeScript</td></tr><tr><td>#2</td><td>Graph charts can be configured to not scaling automatically</td><td>Easy</td><td>With`layout: none`, the developer can turn off the adjustment of the node position through an option, ensuring that the position given by the developer is the coordinate of the final rendering. See: <a href="https://github.com/apache/echarts/issues/13516" target="_blank">#13516</a></td><td>Implement using an option to turn off node position adjustment</td><td>TypeScript</td></tr><tr><td>#3</td><td>Apache ECharts Issue Helper</td><td>Medium</td><td><a href="https://github.com/ecomfe/echarts-issue-helper" target="_blank">The Apache ECharts Issue Helper</a> is a form tool for generating GitHub issues, which is a better way to ensure that the questioner gives the necessary information by using a form rather than Markdown. The project currently has limited functionality and would like to enhance Markdown-related features.</td><td><ol><li>Support for Markdown format (including code) highlighting</li><li>Image upload support</li><li>Support for Markdown result preview</li></ol></td><td>TypeScript; Vue.js (optional)</td></tr><tr><td>#4</td><td>Example website with third-party editors</td><td>Medium</td><td>The examples section of the official Apache ECharts website currently uses its own code editor, and the community would like to provide the same functionality for editing examples in major third-party online editors (StackBiz, JSFiddle, CodePen, CodeSandbox).</td><td><ol><li>Add the "Go to CodeSandbox (StackBlitz, jsfiddle, CodePen) Edit" button to the Apache ECharts website sample component</li><li>Call the API of a third-party online editor and pass the code used in the example in the jump</li></ol></td><td>JavaScript</td></tr><tr><td>#5</td><td>Asymmetric rawing of theme river series</td><td>Medium</td><td>The Apache ECharts theme river is currently drawn using a symmetric drawing method (the overall pattern is symmetric along the x-axis), and it is hoped that the wiggle algorithm will enable an asymmetric drawing to increase the viewability of the river map. See: <a href="https://github.com/apache/echarts/issues/14643" target="_blank">#14643</a></td><td>Implement the function to select the drawing mode of river map using wiggle configuration item in river map</td><td>TypeScript; a brief understanding of computer graphics (requires reading algorithm papers and implementing them)</td></tr><tr><td>#6</td><td>Extend the overlap anti-overlap of labels</td><td>High</td><td>Apache ECharts now provides an anti-overlap layout algorithm for labels on some specific graphs such as pie charts. Now we hope to add a more general layout algorithm, which can search for a better position by iteratively searching for the positions where labels can be placed, and solve the label overlap problem when there are more data in the scatterplots and other graphs. You can refer to the existing papers and implementations: 1. An Empirical Study of Algorithms for Point-Feature Label Placement 2. <a href="https://github.com/tinker10/D3- Labeler" target="_blank">https://github.com/tinker10/D3-Labeler</a> 3. <a href="https://cran.r-project.org/web/packages/ggrepel/ vignettes/ggrepel.html" target="_blank">https://cran.r-project.org/web/packages/ggrepel/vignettes/ggrepel.html</a></td><td><ol><li>Add a configuration item to enable only anti-overlap of tags when turned on</li><li>The anti-overlap algorithm can achieve a balance between performance, complexity (amount of code) and end result</li></ol></td><td>TypeScript</td></tr><tr><td>#7</td><td>Interleaved coordinate axis labels to optimize label overlap</td><td>High</td><td>NAt present, the axis of Apache ECharts can only hide some of the overlapping labels when there are too many labels, but in some scenarios, the labels can be displayed staggered up and down without hiding them, so I would like to add a configuration that allows the user to intelligently move the overlapping labels up/down (or left/right in the case of the Y-axis).</td><td>Add an option to enable alternate display of axis labels when turned on</td><td>TypeScript; need to read the algorithm paper and implement it</td></tr><tr><td>#8</td><td>Circular references to the graph series</td><td>High</td><td>Supports graph nodes pointing to themselves. See: <a href="https://github.com/apache/echarts/issues/12951" target="_blank">#12951</a></td><td><ol><li>Graph nodes can point to themselves</li><li>Configurable parameters to control the position of the connection</li><li>Support for multiple lines pointing to themselves</li></ol></td><td>TypeScript</td></tr></table></div></div><footer class="inner-footer"><div class="container"><div class="row"><div class="col-md-8"><p>Copyright © 2017-2021, The Apache Software Foundation Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.</p></div><div id="footer-icon-panel" class="col-md-4"><a href="https://www.apache.org"><img src="https://echarts.apache.org/en/images/asf_logo.svg?_v_=20200710_1" class="footer-apache-logo"></a></div></div></div></footer></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://echarts.apache.org/en/js/common.js?_v_=b5b8944fb9"></script><script type="text/javascript">window.lazyLoadOptions = {
+<!--[if (gt IE 8)|!(IE)]><body class="Events - Apache ECharts"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Please visit the official Apache ECharts Website at</p><a id="a2" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>Visit Official Website</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><nav class="navbar navbar-default navbar-fixed-top"><nav role="navigation" 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.apache.org/en/images/logo.png" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/en/index.html">Home</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Docs<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/feature.html">Features</a></li><li><a href="https://echarts.apache.org/en/tutorial.html">Tutorials</a></li><li><a href="https://echarts.apache.org/en/api.html">API</a></li><li><a href="https://echarts.apache.org/en/option.html">Chart Configuration</a></li><li><a href="https://echarts.apache.org/en/changelog.html">Changelog</a></li><li><a href="https://echarts.apache.org/en/faq.html">FAQ</a></li><li><a href="https://echarts.apache.org/en/tutorial.html#ECharts%205%20Upgrade%20Guide">V5 Upgrade Guide<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Download<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/download.html">Download</a></li><li><a href="https://echarts.apache.org/en/download-theme.html">Download Themes</a></li><li><a href="https://echarts.apache.org/en/download-extension.html">Download Extensions</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/en/index.html">Examples</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Resources<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/spreadsheet.html">Spread Sheet Tool</a></li><li><a href="https://echarts.apache.org/en/theme-builder.html">Theme Builder</a></li><li><a href="https://echarts.apache.org/en/cheat-sheet.html">Cheat Sheet</a></li><li><a href="https://echarts.apache.org/en/resources.html">More Resources</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Community<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/events.html">Events</a></li><li><a href="https://echarts.apache.org/en/committers.html">Committers</a></li><li><a href="https://echarts.apache.org/en/maillist.html">Mailing List</a></li><li><a href="https://echarts.apache.org/en/contributing.html">How to Contribute</a></li><li><a href="https://echarts.apache.org/en/dependencies.html">Dependencies</a></li><li><a href="https://echarts.apache.org/en/coding-standard.html">Code Standard</a></li><li><a href="https://github.com/apache/echarts" target="_blank">Source Code (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/en/security.html">Security</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">License<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">Events<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">Sponsorship<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">Thanks<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('zh')">中文</a></li></ul></div></div></nav></nav><div class="page-main"><div class="page-info"><div class="container"><h1>Summer 2021 of Open Source Promotion Plan</h1><p class="page-info-echarts">Apache ECharts<sup>TM</sup></p></div></div><div class="page-content"><div class="container"><div><a href="../events.html">Back to the event list</a></div><div class="event event-detail-img"><picture><source data-srcset="https://echarts.apache.org/en/images/event/20210513-iscas-en.webp?_v_=20200710_1" type="image/webp" class="lazy"><source data-srcset="https://echarts.apache.org/en/images/event/20210513-iscas-en.jpeg?_v_=20200710_1" type="image/jpeg" class="lazy"><img data-src="https://echarts.apache.org/en/images/event/20210513-iscas-en.jpeg?_v_=20200710_1" alt="Open Source Software Supply Chain Ignite Program - Summer 2021" class="lazy"></picture></div><h3>Event Description</h3><p><a href="https://summer.iscas.ac.cn/help/en/" target="_blank">Summer 2021 of Open Source Promotion Plan</a> is a summer program for college students jointly organized by Institute of Software Chinese Academy of Sciences and openEuler community. It aims to encourage college students to actively participate in the development and maintenance of open source software and promote the vigorous development of excellent open source software community.</p><p>The organizer will fund projects with student applications, and the corresponding pre-tax prizes are high (RMB 12,000), medium (RMB 9,000), and low (RMB 6,000) depending on the difficulty (note: the prize amounts are pre-tax RMB amounts). Please refer to the official instructions of the Open Source Software Supply Chain Illumination Program for details.</p><p>The community needs to designate a community mentor for each project, in the process, you can have a better understanding of the Apache ECharts project development with the help of the mentor.</p><h3>Event Registration</h3><p>Please go to the <a href="https://summer.iscas.ac.cn/help/en/student/" target="_blank">event website</a> to register or for more information.</p><h3>Project List</h3><p>Applicants can complete one project from the following list.</p><table><tr><th>ID</th><th>Name</th><th>Difficulty</th><th style="width: 40%">Description</th><th>Delivery</th><th>Requirement</th></tr><tr><td>#1</td><td>Graph series support for dragging nodes</td><td>Easy</td><td>Support for dragging nodes in case of graph series with layout: none, see: <a href="https://github.com/apache/echarts/issues/14510" target="_blank">#14510</a></td><td>Support for dragging nodes in case of graph series with layout: none</td><td>TypeScript</td></tr><tr><td>#2</td><td>Graph charts can be configured to not scaling automatically</td><td>Easy</td><td>With`layout: none`, the developer can turn off the adjustment of the node position through an option, ensuring that the position given by the developer is the coordinate of the final rendering. See: <a href="https://github.com/apache/echarts/issues/13516" target="_blank">#13516</a></td><td>Implement using an option to turn off node position adjustment</td><td>TypeScript</td></tr><tr><td>#3</td><td>Apache ECharts Issue Helper</td><td>Medium</td><td><a href="https://github.com/ecomfe/echarts-issue-helper" target="_blank">The Apache ECharts Issue Helper</a> is a form tool for generating GitHub issues, which is a better way to ensure that the questioner gives the necessary information by using a form rather than Markdown. The project currently has limited functionality and would like to enhance Markdown-related features.</td><td><ol><li>Support for Markdown format (including code) highlighting</li><li>Image upload support</li><li>Support for Markdown result preview</li></ol></td><td>TypeScript; Vue.js (optional)</td></tr><tr><td>#4</td><td>Example website with third-party editors</td><td>Medium</td><td>The examples section of the official Apache ECharts website currently uses its own code editor, and the community would like to provide the same functionality for editing examples in major third-party online editors (StackBiz, JSFiddle, CodePen, CodeSandbox).</td><td><ol><li>Add the "Go to CodeSandbox (StackBlitz, jsfiddle, CodePen) Edit" button to the Apache ECharts website sample component</li><li>Call the API of a third-party online editor and pass the code used in the example in the jump</li></ol></td><td>JavaScript</td></tr><tr><td>#5</td><td>Asymmetric rawing of theme river series</td><td>Medium</td><td>The Apache ECharts theme river is currently drawn using a symmetric drawing method (the overall pattern is symmetric along the x-axis), and it is hoped that the wiggle algorithm will enable an asymmetric drawing to increase the viewability of the river map. See: <a href="https://github.com/apache/echarts/issues/14643" target="_blank">#14643</a></td><td>Implement the function to select the drawing mode of river map using wiggle configuration item in river map</td><td>TypeScript; a brief understanding of computer graphics (requires reading algorithm papers and implementing them)</td></tr><tr><td>#6</td><td>Extend the overlap anti-overlap of labels</td><td>High</td><td>Apache ECharts now provides an anti-overlap layout algorithm for labels on some specific graphs such as pie charts. Now we hope to add a more general layout algorithm, which can search for a better position by iteratively searching for the positions where labels can be placed, and solve the label overlap problem when there are more data in the scatterplots and other graphs. You can refer to the existing papers and implementations: 1. An Empirical Study of Algorithms for Point-Feature Label Placement 2. <a href="https://github.com/tinker10/D3- Labeler" target="_blank">https://github.com/tinker10/D3-Labeler</a> 3. <a href="https://cran.r-project.org/web/packages/ggrepel/ vignettes/ggrepel.html" target="_blank">https://cran.r-project.org/web/packages/ggrepel/vignettes/ggrepel.html</a></td><td><ol><li>Add a configuration item to enable only anti-overlap of tags when turned on</li><li>The anti-overlap algorithm can achieve a balance between performance, complexity (amount of code) and end result</li></ol></td><td>TypeScript</td></tr><tr><td>#7</td><td>Interleaved coordinate axis labels to optimize label overlap</td><td>High</td><td>NAt present, the axis of Apache ECharts can only hide some of the overlapping labels when there are too many labels, but in some scenarios, the labels can be displayed staggered up and down without hiding them, so I would like to add a configuration that allows the user to intelligently move the overlapping labels up/down (or left/right in the case of the Y-axis).</td><td>Add an option to enable alternate display of axis labels when turned on</td><td>TypeScript; need to read the algorithm paper and implement it</td></tr><tr><td>#8</td><td>Circular references to the graph series</td><td>High</td><td>Supports graph nodes pointing to themselves. See: <a href="https://github.com/apache/echarts/issues/12951" target="_blank">#12951</a></td><td><ol><li>Graph nodes can point to themselves</li><li>Configurable parameters to control the position of the connection</li><li>Support for multiple lines pointing to themselves</li></ol></td><td>TypeScript</td></tr></table></div></div><footer><div class="container"><div class="row"><div class="col-md-9"><p>Copyright © 2017-2021, The Apache Software Foundation Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.</p><div class="icon-panel"><a href="mailto:dev@echarts.apache.org?body=%28Thanks%20for%20using%20ECharts.%20Email%20us%20if%20you%20have%20non-technical%20problems%20using%20ECharts.%20For%20technical%20support%2C%20please%20go%20to%20https%3A//github.com/apache/echarts/issues%20.%29" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-email.png?_v_=20200710_1"></a><a href="https://twitter.com/ApacheECharts" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-twitter.png?_v_=20200710_1"></a><a href="https://weibo.com/echarts" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-weibo.png?_v_=20200710_1"></a><a href="https://github.com/apache/echarts" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-github.png?_v_=20200710_1"></a></div></div><div id="footer-icon-panel" class="col-md-3"><a href="https://www.apache.org"><img src="https://echarts.apache.org/en/images/asf_logo.svg?_v_=20200710_1" class="footer-apache-logo"></a></div></div></div></footer></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://echarts.apache.org/en/js/common.js?_v_=b5b8944fb9"></script><script type="text/javascript">window.lazyLoadOptions = {
     elements_selector: ".lazy"
 };
 document.getElementById('nav-contribute').className = 'active';</script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@12.0.0/dist/lazyload.min.js"></script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
diff --git a/en/events/2021-07-05-apachecon.html b/en/events/2021-07-05-apachecon.html
new file mode 100644
index 0000000..68e6e20
--- /dev/null
+++ b/en/events/2021-07-05-apachecon.html
@@ -0,0 +1,25 @@
+<!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.apache.org/en/images/favicon.png?_v_=20200710_1"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"><!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries--><!--[if lt IE 9]><script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script><script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script><![endif]--><link rel="stylesheet" type="text/css" href="https://echarts.apache.org/en/css/main.css?_v_=5bc19a133c"><script>window.EC_WWW_LANG = 'en';
+</script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/pace-progressbar@1.0.2/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
+    var el = document.createElement('style');
+    el.innerHTML = ''
+        + '@font-face {font-family:"noto-thin";src:local("Microsoft Yahei");}'
+        + '@font-face {font-family:"noto-light";src:local("Microsoft Yahei");}';
+    document.head.insertBefore(el, document.getElementById('font-hack'));
+}
+</script><title>Events - Apache 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.apache.org/en/images/forie.png?_v_=20200710_1" alt="ie tip"></div></body><![endif]-->
+<!--[if (gt IE 8)|!(IE)]><body class="Events - Apache ECharts"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Please visit the official Apache ECharts Website at</p><a id="a2" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>Visit Official Website</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><nav class="navbar navbar-default navbar-fixed-top"><nav role="navigation" 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.apache.org/en/images/logo.png" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/en/index.html">Home</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Docs<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/feature.html">Features</a></li><li><a href="https://echarts.apache.org/en/tutorial.html">Tutorials</a></li><li><a href="https://echarts.apache.org/en/api.html">API</a></li><li><a href="https://echarts.apache.org/en/option.html">Chart Configuration</a></li><li><a href="https://echarts.apache.org/en/changelog.html">Changelog</a></li><li><a href="https://echarts.apache.org/en/faq.html">FAQ</a></li><li><a href="https://echarts.apache.org/en/tutorial.html#ECharts%205%20Upgrade%20Guide">V5 Upgrade Guide<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Download<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/download.html">Download</a></li><li><a href="https://echarts.apache.org/en/download-theme.html">Download Themes</a></li><li><a href="https://echarts.apache.org/en/download-extension.html">Download Extensions</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/en/index.html">Examples</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Resources<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/spreadsheet.html">Spread Sheet Tool</a></li><li><a href="https://echarts.apache.org/en/theme-builder.html">Theme Builder</a></li><li><a href="https://echarts.apache.org/en/cheat-sheet.html">Cheat Sheet</a></li><li><a href="https://echarts.apache.org/en/resources.html">More Resources</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Community<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/events.html">Events</a></li><li><a href="https://echarts.apache.org/en/committers.html">Committers</a></li><li><a href="https://echarts.apache.org/en/maillist.html">Mailing List</a></li><li><a href="https://echarts.apache.org/en/contributing.html">How to Contribute</a></li><li><a href="https://echarts.apache.org/en/dependencies.html">Dependencies</a></li><li><a href="https://echarts.apache.org/en/coding-standard.html">Code Standard</a></li><li><a href="https://github.com/apache/echarts" target="_blank">Source Code (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/en/security.html">Security</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">License<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">Events<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">Sponsorship<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">Thanks<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('zh')">中文</a></li></ul></div></div></nav></nav><div class="page-main"><div class="page-info"><div class="container"><h1>ApacheCon Asia 2021</h1><p class="page-info-echarts">Apache ECharts<sup>TM</sup></p></div></div><div class="page-content"><div class="container"><div><a href="../events.html">Back to the event list</a></div><div class="event event-detail-img"><picture><source data-srcset="https://echarts.apache.org/en/images/event/20210705-apachecon-en.webp?_v_=20200710_1" type="image/webp" class="lazy"><source data-srcset="https://echarts.apache.org/en/images/event/20210705-apachecon-en.jpeg?_v_=20200710_1" type="image/jpeg" class="lazy"><img data-src="https://echarts.apache.org/en/images/event/20210705-apachecon-en.jpeg?_v_=20200710_1" alt="ApacheCon Asia 2021" class="lazy"></picture></div><h3>Coming to your living room this August!</h3><p>Join us from the comfort of your own home for three days of Apache project content across dozens of categories, from Big Data to Fintech to Search to Tomcat and more.</p><p>The <a href="https://apachecon.com/acasia2021/tracks/datavisualization.html">Data Visualization track</a> is on 2021.08.06 and the topics are:</p><table><tr><td>13:30 GMT+8</td><td><a href="https://apachecon.com/acasia2021/sessions/1090.html">Why Apache Superset is Betting on Apache ECharts</a></td><td>English Session</td><td>Ville Brofeldt</td></tr><tr><td>14:10 GMT+8</td><td><a href="https://apachecon.com/acasia2021/sessions/1087.html">Dirty-rectangle Rendering with Apache ECharts</a></td><td>English Session</td><td>Wenli Zhang</td></tr><tr><td>14:50 GMT+8</td><td><a href="https://apachecon.com/acasia2021/sessions/1093.html">The challenge of 16ms - Charting tool optimization</a></td><td>Chinese Session</td><td>Shuang Su</td></tr><tr><td>15:30 GMT+8</td><td><a href="https://apachecon.com/acasia2021/sessions/1094.html">Fun with ECharts! - how we use it in Tesla!</a></td><td>Chinese Session</td><td>Fanchao Meng</td></tr><tr><td>16:10 GMT+8</td><td><a href="https://apachecon.com/acasia2021/sessions/1092.html">Rendering charts using echarts to present community activity</a></td><td>Chinese Session</td><td>Sun Yi</td></tr><tr><td>16:50 GMT+8</td><td><a href="https://apachecon.com/acasia2021/sessions/1091.html">echarts4r: ECharts integration with the R programming language</a></td><td>English Session</td><td>John Coene</td></tr></table><h3>Event Registration</h3><p>Please go to the <a href="https://hopin.com/events/apachecon-asia-2021">Hopin platform</a> to register or check for more information at <a href="https://apachecon.com/acasia2021/index.html">the official Website</a>.</p></div></div><footer><div class="container"><div class="row"><div class="col-md-9"><p>Copyright © 2017-2021, The Apache Software Foundation Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.</p><div class="icon-panel"><a href="mailto:dev@echarts.apache.org?body=%28Thanks%20for%20using%20ECharts.%20Email%20us%20if%20you%20have%20non-technical%20problems%20using%20ECharts.%20For%20technical%20support%2C%20please%20go%20to%20https%3A//github.com/apache/echarts/issues%20.%29" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-email.png?_v_=20200710_1"></a><a href="https://twitter.com/ApacheECharts" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-twitter.png?_v_=20200710_1"></a><a href="https://weibo.com/echarts" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-weibo.png?_v_=20200710_1"></a><a href="https://github.com/apache/echarts" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-github.png?_v_=20200710_1"></a></div></div><div id="footer-icon-panel" class="col-md-3"><a href="https://www.apache.org"><img src="https://echarts.apache.org/en/images/asf_logo.svg?_v_=20200710_1" class="footer-apache-logo"></a></div></div></div></footer></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://echarts.apache.org/en/js/common.js?_v_=b5b8944fb9"></script><script type="text/javascript">window.lazyLoadOptions = {
+    elements_selector: ".lazy"
+};
+document.getElementById('nav-contribute').className = 'active';</script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@12.0.0/dist/lazyload.min.js"></script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
+(function() {
+var hm = document.createElement("script");
+
+hm.src = "https://hm.baidu.com/hm.js?54b918eee37cb8a7045f0fd0f0b24395";
+
+var s = document.getElementsByTagName("script")[0];
+s.parentNode.insertBefore(hm, s);
+})();
+</script><!-- Google Analytics--><script type="text/javascript" async src="https://www.googletagmanager.com/gtag/js?id=UA-141228404-1"></script><script type="text/javascript">window.dataLayer = window.dataLayer || [];
+function gtag(){dataLayer.push(arguments);}
+gtag('js', new Date());
+gtag('config', 'UA-141228404-1');</script></html>
\ No newline at end of file
diff --git a/en/feature.html b/en/feature.html
index 2d1230b..6342a5f 100644
--- a/en/feature.html
+++ b/en/feature.html
@@ -7,7 +7,7 @@
     document.head.insertBefore(el, document.getElementById('font-hack'));
 }
 </script><title>Features - Apache 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.apache.org/en/images/forie.png?_v_=20200710_1" alt="ie tip"></div></body><![endif]-->
-<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Please visit the official Apache ECharts Website at</p><a id="a2" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>Visit Official Website</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><nav class="navbar navbar-default navbar-fixed-top"><nav role="navigation" 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.apache.org/en/images/logo.png" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/en/index.html">Home</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Docs<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/feature.html">Features</a></li><li><a href="https://echarts.apache.org/en/tutorial.html">Tutorials</a></li><li><a href="https://echarts.apache.org/en/api.html">API</a></li><li><a href="https://echarts.apache.org/en/option.html">Chart Configuration</a></li><li><a href="https://echarts.apache.org/en/changelog.html">Changelog</a></li><li><a href="https://echarts.apache.org/en/faq.html">FAQ</a></li><li><a href="https://echarts.apache.org/en/tutorial.html#ECharts%205%20Upgrade%20Guide">V5 Upgrade Guide<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Download<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/download.html">Download</a></li><li><a href="https://echarts.apache.org/en/download-theme.html">Download Themes</a></li><li><a href="https://echarts.apache.org/en/download-extension.html">Download Extensions</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/en/index.html">Examples</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Resources<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/spreadsheet.html">Spread Sheet Tool</a></li><li><a href="https://echarts.apache.org/en/theme-builder.html">Theme Builder</a></li><li><a href="https://echarts.apache.org/en/cheat-sheet.html">Cheat Sheet</a></li><li><a href="https://echarts.apache.org/en/resources.html">More Resources</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Community<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/events.html">Events</a></li><li><a href="https://echarts.apache.org/en/committers.html">Committers</a></li><li><a href="https://echarts.apache.org/en/maillist.html">Mailing List</a></li><li><a href="https://echarts.apache.org/en/contributing.html">How to Contribute</a></li><li><a href="https://echarts.apache.org/en/dependencies.html">Dependencies</a></li><li><a href="https://echarts.apache.org/en/coding-standard.html">Code Standard</a></li><li><a href="https://github.com/apache/echarts" target="_blank">Source Code (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/en/security.html">Security</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">License<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">Events<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">Sponsorship<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">Thanks<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('zh')">中文</a></li></ul></div></div></nav></nav><div class="page-main"><div class="page-info"><div class="container"><h1>Features</h1><p class="page-info-echarts">Apache ECharts<sup>TM</sup></p></div></div><div class="page-content single-page"><div class="page-nav"><h4>Features</h4><ul></ul></div><div class="page-detail"><p class="page-detail-desc">Apache ECharts<sup>TM</sup> is an open-sourced JavaScript visualization tool, which can run fluently on PC and mobile devices. It is compatible with most modern Web Browsers, e.g., IE8/9/10/11, Chrome, Firefox, Safari and so on. ECharts depends on <a href="https://github.com/ecomfe/zrender" target="_blank">ZRender</a>, a graphic rendering engine, to create intuitive, interactive, and highly-customizable charts.</p><h2 id="chart-types">Abundant Chart Types</h2><p>The basic chart types ECharts supports include <a href="option.html#series-line" target="_blank">line series</a>, <a href="option.html#series-line" target="_blank">bar series</a>, <a href="option.html#series-scatter" target="_blank">scatter series</a>, <a href="option.html#series-pie" target="_blank">pie charts</a>, <a href="option.html#series-candlestick" target="_blank">candle-stick series</a>, <a href="option.html#series-boxplot" target="_blank">boxplot series</a> for statistics, <a href="option.html#series-map" target="_blank">map series</a>, <a href="option.html#series-heatmap" target="_blank">heatmap series</a>, <a href="option.html#series-lines" target="_blank">lines series</a> for directional information, <a href="option.html#series-graph" target="_blank">graph series</a> for relationships, <a href="option.html#series-treemap" target="_blank">treemap series</a>, <a href="option.html#series-sunburst">sunburst series</a>, <a href="option.html#series-parallel" target="_blank">parallel series</a> for multi-dimensional data, <a href="option.html#series-funnel" target="_blank">funnel series</a>, <a href="option.html#series-gauge" target="_blank">gauge series</a>. And it's extremely easy to create a combinition of them with ECharts.</p><p>Besides the built-in chart types, ECharts also provide the <a href="option.html#series-custom">customed series</a> for users to create a specific chart types. To use it, you should only pass in a callback function named <em>renderItem</em>, and return any graphic elements you wish to draw to according to the data. What makes it even better is that it can interact with the existing ECharts components and you don't have to worry about the interaction with them.</p><p>If the default package size is too large for you, you can choose the chart types and components you need and download in <a href="builder.html">the online builder</a>.</p><h2 id="dataset">Multiple Data Format Ready-To-Use</h2><p>The built-in <code>dataset</code> attribute from ECharts v4.0 supports data formats including two-dimensional table, key-value object, and so on. The map from data to graphic can be easily set by the <code>encode</code> attribute. This is a more intuitive way to think when developing a chart, and it saves much time writing data-converting steps for developers. Futhermore, it saves memory since different components can share on piece of data rather than copying.</p><p>ECharts supports TypedArray, which occupies less memory than array and is more garbage-collection-friendly. For big data visualization, it is suggested to use TypedArray to improve performance.</p><h2 id="big-data">Data Visualization of Tens of Millions on Web</h2><p>With the help of incremental rendering technique since v4.0 and optimization of all aspects, ECharts can display the visualization of tens of millions of data. What's more, interactions like scaling and transforming are fluent all the same.</p><p>Tens of millions of data usually takes over hundreds of MB in memory. ECharts provide streaming data ability since v4.0 and makes it possible to render as much data as loaded from WebSocket. There is no need to wait for all data to be loaded to start rendering.</p><img src="https://echarts.apache.org/en/images/features/scatterGL.jpg?_v_=20200710_1" width="60%"><br /><img src="https://echarts.apache.org/en/images/features/scatterGL2.jpg?_v_=20200710_1" width="30%"><img src="https://echarts.apache.org/en/images/features/scatterGL3.jpg?_v_=20200710_1" width="30%"><h2 id="mobile">Mobile Optimization</h2><p>ECharts has been carefully optimized for mobile interaction, such zooming and panning the coordinate system with your fingers on small screens. The PC users can also use the mouse wheel to do the same interaction.</p><p>The fine-grained modularity and packaging mechanism allows ECharts to have a small package size on mobile, and the optional SVG rendering engine makes the memory cost of mobile much smaller.</p><iframe data-src="https://echarts.apache.org/examples/en/view.html?c=area-simple&amp;reset=1&amp;edit=1&amp;renderer=svg" width="60%" height="400"></iframe><h2 id="mult-platform">Multi-Rendering Solutions and Cross-Platform Support</h2><p>ECharts supports rendering charts in the form of Canvas, SVG (v4.0+), and VML. VML is compatible with lower versions of IE; SVG reduces the memory cost on mobiles; and Canvas can easily handle large data visualization and special rendering effects. Different rendering methods provide more choices, making ECharts perform better in different scenarios.</p><p>In addition to PC and mobile browsers, ECharts can also be used with node-canvas on Node for efficient server-side rendering (SSR). And ECharts support Wechat Applet rendering since v4.0.</p><p>Community contributors also provide us with a variety of different language extensions. For example, <a href="https://github.com/pyecharts/pyecharts" target="_blank">pyecharts</a> for Python, <a href="https://github.com/cosname/recharts" target="_blank">recharts</a> for R, <a href="https://github.com/randyzwitch/ECharts.jl">ECharts.jl</a> for Julia and so on.</p><p>We hope that the platform and language will not be the limit for everyone to use ECharts for visualization!</p><h2 id="interaction">Interactive Data Exploration In-Depth</h2><p>Interaction is an important means of mining information from data. Overview first, zoom filtering to view details as needed is a basic requirement for data visualization interaction.</p><p>ECharts has been on the road of <em>interaction</em>. We have provided <a href="option.html#legend" target="_blank">legend</a>, <a href="option.html#visualMap" target="_blank">visualMap</a>, <a href="option.html#dataZoom" target="_blank">dataZoom</a>, <a href="option.html#tooltip" target="_blank">tooltip</a>, <a href="option.html#brush">brushing</a> and other ready-to-use interactive components, which can perform interactive operations such as multi-dimensional data screening, view zooming, and display details on the data.</p><iframe data-src="https://echarts.apache.org/examples/en/view.html?c=scatter-matrix&amp;reset=1&amp;edit=1" width="60%" height="540"></iframe><h2 id="visual-mapping">Multi-Dimensional Data Support and Rich Visual Coding</h2><p>ECharts 3 began to strengthen support for multi-dimensional data. In addition to the common multi-dimensional data visualization tools such as parallel coordinates, for traditional scatter plots, etc., the input data can also be multiple dimensions. With the rich visual coding provided by the visual mapping component <a href="option.html#visualMap" target="_blank">visualMap</a>, it is possible to map data of different dimensions to color, size, transparency, shading, etc. Different visual channels.</p><iframe data-src="https://echarts.apache.org/examples/en/view.html?c=scatter-nutrients-matrix&amp;reset=1&amp;edit=1" width="60%" height="400"></iframe><h2 id="dynamic-data">Dynamic Data</h2><p>ECharts is driven by data, and changes in data drive changes in the chart. So the implementation of dynamic data has become extremely simple, just need to get the data, fill in the data, ECharts will find the difference between the two sets of data and then use the appropriate animation to represent the data changes. The <a href="option.html#timeline" target="_blank">timeline</a> component can present data information in a higher time dimension.</p><iframe data-src="https://echarts.apache.org/examples/en/view.html?c=scatter-life-expectancy-timeline&amp;reset=1&amp;edit=1" width="60%" height="400"></iframe><h2 id="fancy-effects">Special Effects</h2><p>ECharts provides eye-catching effects for the visualization of geographic data such as line data and point data.</p><iframe data-src="https://echarts.apache.org/examples/en/view.html?c=lines-bmap-effect&amp;reset=1&amp;edit=1" width="60%" height="400"></iframe><h2 id="gl">More Powerful and Beautiful 3D Visualization with GL</h2><p>Do you want to achieve 3D visualization in VR, large screen scenes? We provide WebGL-based ECharts GL. You can use ECharts GL to draw 3D Earth, buildings, and population distribution histograms as easily as ECharts common components. Furthermore, we also provide configuration items so that you can get artistic results with a few lines of configuration!</p><img src="https://echarts.apache.org/en/images/features/flowGL-line.jpg?_v_=20200710_1" width="40%"><img src="https://echarts.apache.org/en/images/features/buildings-ny.jpg?_v_=20200710_1" width="40%"><br /><img src="https://echarts.apache.org/en/images/features/capetown-taxi.jpg?_v_=20200710_1" width="40%"><img src="https://echarts.apache.org/en/images/features/population.jpg?_v_=20200710_1" width="40%"><h2 id="aria">Accessibility</h2><p>When we talk about visualization, we tend to naturally associate it with seeing, but it is one-sided. The W3C has developed the Accessible Rich Internet Applications Suite (WAI-ARIA), which aims to make web content and web applications accessible to more people with disabilities.</p><p>ECharts 4.0 complies with this specification and supports automatic generation of descriptions based on chart configuration items, enabling people with visual disabilities to understand the chart content with the help of reading devices, so that charts can be accessed by more people!</p><footer class="inner-footer"><div class="container"><div class="row"><div class="col-md-8"><p>Copyright © 2017-2021, The Apache Software Foundation Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.</p></div><div id="footer-icon-panel" class="col-md-4"><a href="https://www.apache.org"><img src="https://echarts.apache.org/en/images/asf_logo.svg?_v_=20200710_1" class="footer-apache-logo"></a></div></div></div></footer></div></div></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://echarts.apache.org/en/js/common.js?_v_=b5b8944fb9"></script><script>window.lazyLoadOptions = {
+<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Please visit the official Apache ECharts Website at</p><a id="a2" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>Visit Official Website</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><nav class="navbar navbar-default navbar-fixed-top"><nav role="navigation" 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.apache.org/en/images/logo.png" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/en/index.html">Home</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Docs<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/feature.html">Features</a></li><li><a href="https://echarts.apache.org/en/tutorial.html">Tutorials</a></li><li><a href="https://echarts.apache.org/en/api.html">API</a></li><li><a href="https://echarts.apache.org/en/option.html">Chart Configuration</a></li><li><a href="https://echarts.apache.org/en/changelog.html">Changelog</a></li><li><a href="https://echarts.apache.org/en/faq.html">FAQ</a></li><li><a href="https://echarts.apache.org/en/tutorial.html#ECharts%205%20Upgrade%20Guide">V5 Upgrade Guide<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Download<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/download.html">Download</a></li><li><a href="https://echarts.apache.org/en/download-theme.html">Download Themes</a></li><li><a href="https://echarts.apache.org/en/download-extension.html">Download Extensions</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/en/index.html">Examples</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Resources<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/spreadsheet.html">Spread Sheet Tool</a></li><li><a href="https://echarts.apache.org/en/theme-builder.html">Theme Builder</a></li><li><a href="https://echarts.apache.org/en/cheat-sheet.html">Cheat Sheet</a></li><li><a href="https://echarts.apache.org/en/resources.html">More Resources</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Community<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/events.html">Events</a></li><li><a href="https://echarts.apache.org/en/committers.html">Committers</a></li><li><a href="https://echarts.apache.org/en/maillist.html">Mailing List</a></li><li><a href="https://echarts.apache.org/en/contributing.html">How to Contribute</a></li><li><a href="https://echarts.apache.org/en/dependencies.html">Dependencies</a></li><li><a href="https://echarts.apache.org/en/coding-standard.html">Code Standard</a></li><li><a href="https://github.com/apache/echarts" target="_blank">Source Code (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/en/security.html">Security</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">License<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">Events<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">Sponsorship<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">Thanks<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('zh')">中文</a></li></ul></div></div></nav></nav><div class="page-main"><div class="page-info"><div class="container"><h1>Features</h1><p class="page-info-echarts">Apache ECharts<sup>TM</sup></p></div></div><div class="page-content single-page"><div class="page-nav"><h4>Features</h4><ul></ul></div><div class="page-detail"><p class="page-detail-desc">Apache ECharts<sup>TM</sup> is an open-sourced JavaScript visualization tool, which can run fluently on PC and mobile devices. It is compatible with most modern Web Browsers, e.g., IE9/10/11, Chrome, Firefox, Safari and so on. ECharts depends on <a href="https://github.com/ecomfe/zrender" target="_blank">ZRender</a>, a graphic rendering engine, to create intuitive, interactive, and highly-customizable charts.</p><h2 id="chart-types">Abundant Chart Types</h2><p>The basic chart types ECharts supports include <a href="option.html#series-line" target="_blank">line series</a>, <a href="option.html#series-line" target="_blank">bar series</a>, <a href="option.html#series-scatter" target="_blank">scatter series</a>, <a href="option.html#series-pie" target="_blank">pie charts</a>, <a href="option.html#series-candlestick" target="_blank">candle-stick series</a>, <a href="option.html#series-boxplot" target="_blank">boxplot series</a> for statistics, <a href="option.html#series-map" target="_blank">map series</a>, <a href="option.html#series-heatmap" target="_blank">heatmap series</a>, <a href="option.html#series-lines" target="_blank">lines series</a> for directional information, <a href="option.html#series-graph" target="_blank">graph series</a> for relationships, <a href="option.html#series-treemap" target="_blank">treemap series</a>, <a href="option.html#series-sunburst">sunburst series</a>, <a href="option.html#series-parallel" target="_blank">parallel series</a> for multi-dimensional data, <a href="option.html#series-funnel" target="_blank">funnel series</a>, <a href="option.html#series-gauge" target="_blank">gauge series</a>. And it's extremely easy to create a combinition of them with ECharts.</p><p>Besides the built-in chart types, ECharts also provide the <a href="option.html#series-custom">customed series</a> for users to create a specific chart types. To use it, you should only pass in a callback function named <em>renderItem</em>, and return any graphic elements you wish to draw to according to the data. What makes it even better is that it can interact with the existing ECharts components and you don't have to worry about the interaction with them.</p><p>If the default package size is too large for you, you can choose the chart types and components you need and download in <a href="builder.html">the online builder</a>.</p><h2 id="dataset">Multiple Data Format Ready-To-Use</h2><p>The built-in <code>dataset</code> attribute from ECharts v4.0 supports data formats including two-dimensional table, key-value object, and so on. The map from data to graphic can be easily set by the <code>encode</code> attribute. This is a more intuitive way to think when developing a chart, and it saves much time writing data-converting steps for developers. Futhermore, it saves memory since different components can share on piece of data rather than copying.</p><p>ECharts supports TypedArray, which occupies less memory than array and is more garbage-collection-friendly. For big data visualization, it is suggested to use TypedArray to improve performance.</p><h2 id="big-data">Data Visualization of Tens of Millions on Web</h2><p>With the help of incremental rendering technique since v4.0 and optimization of all aspects, ECharts can display the visualization of tens of millions of data. What's more, interactions like scaling and transforming are fluent all the same.</p><p>Tens of millions of data usually takes over hundreds of MB in memory. ECharts provide streaming data ability since v4.0 and makes it possible to render as much data as loaded from WebSocket. There is no need to wait for all data to be loaded to start rendering.</p><img src="https://echarts.apache.org/en/images/features/scatterGL.jpg?_v_=20200710_1" width="60%"><br /><img src="https://echarts.apache.org/en/images/features/scatterGL2.jpg?_v_=20200710_1" width="30%"><img src="https://echarts.apache.org/en/images/features/scatterGL3.jpg?_v_=20200710_1" width="30%"><h2 id="mobile">Mobile Optimization</h2><p>ECharts has been carefully optimized for mobile interaction, such zooming and panning the coordinate system with your fingers on small screens. The PC users can also use the mouse wheel to do the same interaction.</p><p>The fine-grained modularity and packaging mechanism allows ECharts to have a small package size on mobile, and the optional SVG rendering engine makes the memory cost of mobile much smaller.</p><iframe data-src="https://echarts.apache.org/examples/en/view.html?c=area-simple&amp;reset=1&amp;edit=1&amp;renderer=svg" width="60%" height="400"></iframe><h2 id="mult-platform">Multi-Rendering Solutions and Cross-Platform Support</h2><p>ECharts supports rendering charts in the form of Canvas, SVG (v4.0+), and VML. VML is compatible with lower versions of IE; SVG reduces the memory cost on mobiles; and Canvas can easily handle large data visualization and special rendering effects. Different rendering methods provide more choices, making ECharts perform better in different scenarios.</p><p>In addition to PC and mobile browsers, ECharts can also be used with node-canvas on Node for efficient server-side rendering (SSR). And ECharts support Wechat Applet rendering since v4.0.</p><p>Community contributors also provide us with a variety of different language extensions. For example, <a href="https://github.com/pyecharts/pyecharts" target="_blank">pyecharts</a> for Python, <a href="https://github.com/cosname/recharts" target="_blank">recharts</a> for R, <a href="https://github.com/randyzwitch/ECharts.jl">ECharts.jl</a> for Julia and so on.</p><p>We hope that the platform and language will not be the limit for everyone to use ECharts for visualization!</p><h2 id="interaction">Interactive Data Exploration In-Depth</h2><p>Interaction is an important means of mining information from data. Overview first, zoom filtering to view details as needed is a basic requirement for data visualization interaction.</p><p>ECharts has been on the road of <em>interaction</em>. We have provided <a href="option.html#legend" target="_blank">legend</a>, <a href="option.html#visualMap" target="_blank">visualMap</a>, <a href="option.html#dataZoom" target="_blank">dataZoom</a>, <a href="option.html#tooltip" target="_blank">tooltip</a>, <a href="option.html#brush">brushing</a> and other ready-to-use interactive components, which can perform interactive operations such as multi-dimensional data screening, view zooming, and display details on the data.</p><iframe data-src="https://echarts.apache.org/examples/en/view.html?c=scatter-matrix&amp;reset=1&amp;edit=1" width="60%" height="540"></iframe><h2 id="visual-mapping">Multi-Dimensional Data Support and Rich Visual Coding</h2><p>ECharts 3 began to strengthen support for multi-dimensional data. In addition to the common multi-dimensional data visualization tools such as parallel coordinates, for traditional scatter plots, etc., the input data can also be multiple dimensions. With the rich visual coding provided by the visual mapping component <a href="option.html#visualMap" target="_blank">visualMap</a>, it is possible to map data of different dimensions to color, size, transparency, shading, etc. Different visual channels.</p><iframe data-src="https://echarts.apache.org/examples/en/view.html?c=scatter-nutrients-matrix&amp;reset=1&amp;edit=1" width="60%" height="400"></iframe><h2 id="dynamic-data">Dynamic Data</h2><p>ECharts is driven by data, and changes in data drive changes in the chart. So the implementation of dynamic data has become extremely simple, just need to get the data, fill in the data, ECharts will find the difference between the two sets of data and then use the appropriate animation to represent the data changes. The <a href="option.html#timeline" target="_blank">timeline</a> component can present data information in a higher time dimension.</p><iframe data-src="https://echarts.apache.org/examples/en/view.html?c=scatter-life-expectancy-timeline&amp;reset=1&amp;edit=1" width="60%" height="400"></iframe><h2 id="fancy-effects">Special Effects</h2><p>ECharts provides eye-catching effects for the visualization of geographic data such as line data and point data.</p><iframe data-src="https://echarts.apache.org/examples/en/view.html?c=lines-bmap-effect&amp;reset=1&amp;edit=1" width="60%" height="400"></iframe><h2 id="gl">More Powerful and Beautiful 3D Visualization with GL</h2><p>Do you want to achieve 3D visualization in VR, large screen scenes? We provide WebGL-based ECharts GL. You can use ECharts GL to draw 3D Earth, buildings, and population distribution histograms as easily as ECharts common components. Furthermore, we also provide configuration items so that you can get artistic results with a few lines of configuration!</p><img src="https://echarts.apache.org/en/images/features/flowGL-line.jpg?_v_=20200710_1" width="40%"><img src="https://echarts.apache.org/en/images/features/buildings-ny.jpg?_v_=20200710_1" width="40%"><br /><img src="https://echarts.apache.org/en/images/features/capetown-taxi.jpg?_v_=20200710_1" width="40%"><img src="https://echarts.apache.org/en/images/features/population.jpg?_v_=20200710_1" width="40%"><h2 id="aria">Accessibility</h2><p>When we talk about visualization, we tend to naturally associate it with seeing, but it is one-sided. The W3C has developed the Accessible Rich Internet Applications Suite (WAI-ARIA), which aims to make web content and web applications accessible to more people with disabilities.</p><p>ECharts 4.0 complies with this specification and supports automatic generation of descriptions based on chart configuration items, enabling people with visual disabilities to understand the chart content with the help of reading devices, so that charts can be accessed by more people!</p><footer class="inner-footer"><div class="container"><div class="row"><div class="col-md-8"><p>Copyright © 2017-2021, The Apache Software Foundation Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.</p></div><div id="footer-icon-panel" class="col-md-4"><a href="https://www.apache.org"><img src="https://echarts.apache.org/en/images/asf_logo.svg?_v_=20200710_1" class="footer-apache-logo"></a></div></div></div></footer></div></div></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://echarts.apache.org/en/js/common.js?_v_=b5b8944fb9"></script><script>window.lazyLoadOptions = {
     elements_selector: 'iframe'
 };</script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@12.0.0/dist/lazyload.min.js"></script><script type="text/javascript">document.getElementById('nav-doc').className = 'active';</script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
 (function() {
diff --git a/en/images/event/20210705-apachecon-en.jpeg b/en/images/event/20210705-apachecon-en.jpeg
new file mode 100644
index 0000000..4b3ffb9
--- /dev/null
+++ b/en/images/event/20210705-apachecon-en.jpeg
Binary files differ
diff --git a/en/images/event/20210705-apachecon-en.webp b/en/images/event/20210705-apachecon-en.webp
new file mode 100644
index 0000000..e859935
--- /dev/null
+++ b/en/images/event/20210705-apachecon-en.webp
Binary files differ
diff --git a/en/images/event/20210705-apachecon.jpeg b/en/images/event/20210705-apachecon.jpeg
new file mode 100644
index 0000000..7c1f76f
--- /dev/null
+++ b/en/images/event/20210705-apachecon.jpeg
Binary files differ
diff --git a/en/images/event/20210705-apachecon.webp b/en/images/event/20210705-apachecon.webp
new file mode 100644
index 0000000..870862b
--- /dev/null
+++ b/en/images/event/20210705-apachecon.webp
Binary files differ
diff --git a/en/images/people/nick.jpg b/en/images/people/nick.jpg
new file mode 100644
index 0000000..fcaee32
--- /dev/null
+++ b/en/images/people/nick.jpg
Binary files differ
diff --git a/en/index.html b/en/index.html
index f704b7f..99e4a30 100644
--- a/en/index.html
+++ b/en/index.html
@@ -7,9 +7,9 @@
     document.head.insertBefore(el, document.getElementById('font-hack'));
 }
 </script><title>Apache ECharts</title><script src="https://cdn.jsdelivr.net/npm/scrollreveal@4.0.7/dist/scrollreveal.min.js"></script><script src="https://cdn.jsdelivr.net/npm/lottie-web@5.7.6/build/player/lottie.min.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.apache.org/en/images/forie.png?_v_=20200710_1" alt="ie tip"></div></body><![endif]-->
-<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Please visit the official Apache ECharts Website at</p><a id="a2" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>Visit Official Website</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><nav role="navigation" class="navbar navbar-default navbar-fixed-top"><nav role="navigation" 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.apache.org/en/images/logo.png" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/en/index.html">Home</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Docs<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/feature.html">Features</a></li><li><a href="https://echarts.apache.org/en/tutorial.html">Tutorials</a></li><li><a href="https://echarts.apache.org/en/api.html">API</a></li><li><a href="https://echarts.apache.org/en/option.html">Chart Configuration</a></li><li><a href="https://echarts.apache.org/en/changelog.html">Changelog</a></li><li><a href="https://echarts.apache.org/en/faq.html">FAQ</a></li><li><a href="https://echarts.apache.org/en/tutorial.html#ECharts%205%20Upgrade%20Guide">V5 Upgrade Guide<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Download<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/download.html">Download</a></li><li><a href="https://echarts.apache.org/en/download-theme.html">Download Themes</a></li><li><a href="https://echarts.apache.org/en/download-extension.html">Download Extensions</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/en/index.html">Examples</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Resources<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/spreadsheet.html">Spread Sheet Tool</a></li><li><a href="https://echarts.apache.org/en/theme-builder.html">Theme Builder</a></li><li><a href="https://echarts.apache.org/en/cheat-sheet.html">Cheat Sheet</a></li><li><a href="https://echarts.apache.org/en/resources.html">More Resources</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Community<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/events.html">Events</a></li><li><a href="https://echarts.apache.org/en/committers.html">Committers</a></li><li><a href="https://echarts.apache.org/en/maillist.html">Mailing List</a></li><li><a href="https://echarts.apache.org/en/contributing.html">How to Contribute</a></li><li><a href="https://echarts.apache.org/en/dependencies.html">Dependencies</a></li><li><a href="https://echarts.apache.org/en/coding-standard.html">Code Standard</a></li><li><a href="https://github.com/apache/echarts" target="_blank">Source Code (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/en/security.html">Security</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">License<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">Events<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">Sponsorship<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">Thanks<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('zh')">中文</a></li></ul></div></div></nav></nav><div id="page-index" class="page-main"><div id="main-content"><section id="home-section"><div class="home-brand-panel description container"><div class="home-info"><div class="home-brand">Apache ECharts</div><div class="home-subtitle">An Open Source JavaScript Visualization Library</div><div class="home-btn-panel"><a href="https://echarts.apache.org/en/tutorial.html#Get%20Started%20with%20ECharts%20in%205%20minutes" class="btn btn-main btn-index-home"><svg width="22px" height="19px" viewBox="0 0 17 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="index-home-svg"><path fill="#fff" d="M10.9,16.2 C10.9,16.8 10.5,17.2 9.9,17.2 L5.3,17.2 C4.7,17.2 4.3,16.8 4.3,16.2 C4.3,15.6 4.7,15.2 5.3,15.2 L9.9,15.2 C10.5,15.2 10.9,15.7 10.9,16.2 Z M13.6,7.5 L5.3,7.5 C4.7,7.5 4.3,7.9 4.3,8.5 C4.3,9.1 4.7,9.5 5.3,9.5 L13.6,9.5 C14.2,9.5 14.6,9.1 14.6,8.5 C14.6,7.9 14.2,7.5 13.6,7.5 Z M17.9,6 L17.9,19 C17.9,20.7 16.6,22 14.9,22 L3.9,22 C2.2,22 0.9,20.7 0.9,19 L0.9,7.5 L0.9,6 L0.9,5 L0.9,4 L0.9,2 C0.9,0.9 1.8,0 2.9,0 L12.9,0 C14,0 14.9,0.9 14.9,2 L14.9,3 C16.6,3 17.9,4.3 17.9,6 Z M2.9,3 L3.9,3 L12.9,3 L12.9,2 L2.9,2 L2.9,3 Z M15.9,6 C15.9,5.4 15.5,5 14.9,5 L3.9,5 C3.3,5 2.9,5.4 2.9,6 L2.9,19 C2.9,19.6 3.3,20 3.9,20 L14.9,20 C15.5,20 15.9,19.6 15.9,19 L15.9,6 Z M13.6,11.5 L5.3,11.5 C4.7,11.5 4.3,11.9 4.3,12.5 C4.3,13.1 4.7,13.5 5.3,13.5 L13.6,13.5 C14.2,13.5 14.6,13.1 14.6,12.5 C14.6,11.9 14.2,11.5 13.6,11.5 Z"></path></svg><span>Get Started</span></a><a href="https://echarts.apache.org/examples/en/index.html" class="btn btn-main btn-index-home"><svg width="25px" height="19px" viewBox="0 0 17 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="index-home-svg"><path fill="#F72C5B" d="M21,0 L6,0 C4.9,0 4,0.9 4,2 L4,4 L2,4 C0.9,4 0,4.9 0,6 L0,18 C0,19.1 0.9,20 2,20 L17,20 C18.1,20 19,19.1 19,18 L19,16 L21,16 C22.1,16 23,15.1 23,14 L23,2 C23,0.9 22.1,0 21,0 Z M17,18 L2,18 L2,6 L17,6 L17,18 Z M21,14 L19,14 L19,6 C19,4.9 18.1,4 17,4 L6,4 L6,2 L21,2 L21,14 Z M4,15 L4,12 C4,11.4 4.4,11 5,11 C5.6,11 6,11.4 6,12 L6,15 C6,15.6 5.6,16 5,16 C4.4,16 4,15.6 4,15 Z M13,15 L13,12 C13,11.4 13.4,11 14,11 C14.6,11 15,11.4 15,12 L15,15 C15,15.6 14.6,16 14,16 C13.4,16 13,15.6 13,15 Z M7,15 L7,9 C7,8.4 7.4,8 8,8 C8.6,8 9,8.4 9,9 L9,15 C9,15.6 8.6,16 8,16 C7.4,16 7,15.6 7,15 Z M10,15 L10,11 C10,10.4 10.4,10 11,10 C11.6,10 12,10.4 12,11 L12,15 C12,15.6 11.6,16 11,16 C10.4,16 10,15.6 10,15 Z"></path></svg><span>Demo</span></a><a href="https://github.com/apache/echarts" target="_blank" class="btn btn-main btn-index-home btn-index-github"><svg width="22px" height="22px" viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-262.000000, -2480.000000)" fill="#081642"><g transform="translate(252.000000, 2470.000000)"><path d="M29.9006449,27.904446 C28.5016932,29.8668872 26.6944882,31.2248797 24.4790301,31.9784237 C24.2211218,32.0272886 24.0325745,31.9931534 23.9133882,31.876018 C23.7942019,31.7588827 23.7346171,31.6119968 23.7346338,31.4353603 L23.7346338,28.3376019 C23.7346338,27.3880159 23.4865017,26.6930482 22.9902375,26.2526987 C23.5347812,26.1938141 24.024319,26.1058042 24.458851,25.9886688 C24.893383,25.8715335 25.3422785,25.680801 25.8055376,25.4164714 C26.2687966,25.1521418 26.6556591,24.8267354 26.9661251,24.4402521 C27.276591,24.0537688 27.5296112,23.5398222 27.7251857,22.8984123 C27.9207602,22.2570024 28.0185475,21.5203805 28.0185475,20.6885464 C28.0185475,19.504056 27.6414612,18.4959023 26.8872886,17.6640854 C27.240536,16.7733669 27.2023419,15.7752328 26.7727063,14.6696833 C26.5050218,14.5813565 26.1181593,14.6352226 25.6121189,14.8312818 C25.1060784,15.0273409 24.6669591,15.2428141 24.2947609,15.4777015 L23.7502256,15.8300324 C22.8622108,15.5757225 21.9454689,15.4485675 21,15.4485675 C20.0545311,15.4485675 19.1377892,15.5757225 18.2497744,15.8300324 C18.0969813,15.7223001 17.8940788,15.5901353 17.641067,15.433538 C17.3880551,15.2769408 16.9892689,15.0884007 16.4447085,14.8679176 C15.9001481,14.6474346 15.4894467,14.5813479 15.2126043,14.6696576 C14.7921266,15.7758408 14.7588206,16.7739749 15.1126863,17.6640597 C14.3585137,18.4958938 13.9814275,19.5040475 13.9814275,20.6885208 C13.9814275,21.5203548 14.0792147,22.2544676 14.2747892,22.8908591 C14.4703637,23.5272505 14.720944,24.0411971 15.0265302,24.4326988 C15.3321164,24.8242005 15.7165391,25.1521076 16.1797981,25.41642 C16.6430571,25.6807325 17.0919527,25.871465 17.5264847,25.9886174 C17.9610167,26.1057699 18.4505545,26.1937799 18.9950982,26.2526473 C18.6131238,26.60467 18.3790461,27.1085884 18.292865,27.7644025 C18.0924107,27.8621152 17.8775846,27.935404 17.6483866,27.984269 C17.4191886,28.0331339 17.1469167,28.0575663 16.831571,28.0575663 C16.5162253,28.0575663 16.203612,27.9523346 15.8937309,27.7418712 C15.5838499,27.5314078 15.3189144,27.225424 15.0989244,26.8239198 C14.9174043,26.5107253 14.6857747,26.2564154 14.4040358,26.0609899 C14.1222969,25.8655645 13.8860801,25.7481209 13.6953854,25.708659 L13.4084408,25.6644956 C13.2079866,25.6644956 13.069557,25.6864188 12.9931521,25.7302654 C12.9167472,25.7741119 12.8929083,25.8304873 12.9216353,25.8993914 C12.9503623,25.9682956 12.9934529,26.0368829 13.050907,26.1051533 C13.1083611,26.1734238 13.1703941,26.2319915 13.2370061,26.2808564 L13.336924,26.3541538 C13.5471712,26.4518665 13.7549701,26.6378974 13.9603209,26.9122466 C14.1656716,27.1865958 14.3160164,27.4362043 14.4113555,27.661072 L14.554364,27.9983735 C14.67843,28.3704354 14.8886689,28.6714094 15.1850804,28.9012955 C15.481492,29.1311815 15.8014334,29.2780674 16.1449045,29.3419532 C16.4883756,29.405839 16.8202406,29.4399742 17.1404995,29.4443589 C17.4607584,29.4487435 17.7256939,29.4315218 17.935306,29.3926936 L18.2644137,29.3335008 C18.2644137,29.7055627 18.2668619,30.1412107 18.2717584,30.6404447 C18.2766548,31.1396787 18.279103,31.4040083 18.279103,31.4334334 C18.279103,31.6094533 18.21707,31.7563392 18.093004,31.8740912 C17.9689379,31.9918431 17.7779507,32.0259784 17.5200424,31.9764969 C15.3045843,31.22297 13.4973793,29.8649774 12.0984276,27.9025191 C10.6994759,25.9400608 10,23.7305118 10,21.2738721 C10,19.2281225 10.4916769,17.3417791 11.4750308,15.6148418 C12.4583846,13.8879045 13.7928551,12.5202092 15.4784422,11.5117558 C17.1640293,10.5033024 19.0045486,9.99938397 21,10.0000006 C22.9954514,10.0006172 24.8359707,10.5045356 26.5215578,11.5117558 C28.2071449,12.518976 29.5416154,13.8866713 30.5249692,15.6148418 C31.5083231,17.3430123 32,19.2293557 32,21.2738721 C31.9990725,23.7324558 31.2995966,25.9420048 29.9006449,27.904446 Z"></path></g></g></g></svg></a></div></div><div class="home-chart"><img src="images/index-home-pie.png"></div></div></section><section id="events-section"><div class="container"><a href="./events/2021-05-13-iscas.html" class="event"><picture><source data-srcset="https://echarts.apache.org/en/images/event/20210513-iscas-en.webp?_v_=20200710_1" type="image/webp" class="lazy"><source data-srcset="https://echarts.apache.org/en/images/event/20210513-iscas-en.jpeg?_v_=20200710_1" type="image/jpeg" class="lazy"><img data-src="https://echarts.apache.org/en/images/event/20210513-iscas-en.jpeg?_v_=20200710_1" alt="Summer 2021 of Open Source Promotion Plan" class="lazy"></picture></a></div></section><section id="feature-section"><div class="container"><div class="index-features"><h2 class="reveal">Features</h2><hr class="reveal"><a href="https://echarts.apache.org/en/feature.html" class="more reveal">View More</a></div><div class="row"><div class="col-md-6"><div id="index-feature-1" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-1" class="index-feature-icon-bg"></div><div id="icon-1" class="index-feature-icon"></div></div><div class="index-feature-right reveal"><h3 class="reveal">Flexible Chart Types</h3><p class="reveal-later">Apache ECharts provides more than 20 chart types available out of the box, along with a dozen components, and each of them can be arbitrarily combined to use.</p></div></div></div><div class="col-md-6"><div id="index-feature-2" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-2" class="index-feature-icon-bg"></div><div id="icon-2" class="index-feature-icon"></div></div><div class="index-feature-right"><h3 class="reveal">Powerful Rendering Engine</h3><p class="reveal-later">Easily switch between Canvas and SVG rendering. Progressive rendering and stream loading make it possible to render 10 million data in realtime.</p></div></div></div><div class="col-md-6"><div id="index-feature-3" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-3" class="index-feature-icon-bg"></div><div id="icon-3" class="index-feature-icon"></div></div><div class="index-feature-right"><h3 class="reveal">Professional Data Analysis</h3><p class="reveal-later">Manage data through datasets, which support data transforms like filtering, clustering, and regression to help analyze multi-dimensional analysis of the same data.</p></div></div></div><div class="col-md-6"><div id="index-feature-4" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-4" class="index-feature-icon-bg"></div><div id="icon-4" class="index-feature-icon"></div></div><div class="index-feature-right"><h3 class="reveal">Elegant Visual Design</h3><p class="reveal-later">The default design follows visualization principles, supports responsive design. Flexible configurations make it easy to customize.</p></div></div></div><div class="col-md-6"><div id="index-feature-5" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-5" class="index-feature-icon-bg"></div><div id="icon-5" class="index-feature-icon"></div></div><div class="index-feature-right"><h3 class="reveal">A Healthy Community</h3><p class="reveal-later">The active open source community ensures the healthy development of the project and contributes a wealth of third-party extensions.</p></div></div></div><div class="col-md-6"><div id="index-feature-6" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-6" class="index-feature-icon-bg"></div><div id="icon-6" class="index-feature-icon"></div></div><div class="index-feature-right"><h3 class="reveal">Accessibility-Friendly</h3><p class="reveal-later">Automatically generated chart descriptions and decal patterns help users with disabilities understand the content and the stories behind the charts.</p></div></div></div></div></div></section><section id="publication"><div class="container"><div id="start-line"></div><div class="paper"><div class="content"><h2 class="reveal-latest">ECharts: A Declarative Framework for Rapid Construction of Web-based Visualization</h2><p class="note reveal-latest">You are welcomed to cite the following paper whenever you use ECharts in your R&D projects, products, research papers, technical reports, news reports, books, presentations, teaching, patents, and other related intelligence activities.</p><div class="single-btn-panel reveal-latest"><a href="http://www.cad.zju.edu.cn/home/vagblog/VAG_Work/echarts.pdf" class="pdf reveal-later">Visual Informatics, 2018 [PDF]</a></div></div><div class="icon"><div id="paper-icon"></div></div></div><div id="end-line"></div></div></section><section id="about-section" class="normal reveal-about"><div class="container"><h3>Follow</h3><hr><p>Follow us to get more updates in time.</p><div class="btn-panel row"><div class="col-lg-3 col-sm-6"><a id="btn-github" href="https://github.com/apache/echarts"><div class="btn-content"><div class="btn-logo"><svg width="22px" height="22px" viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-262.000000, -2480.000000)" fill="#081642"><g transform="translate(252.000000, 2470.000000)"><path d="M29.9006449,27.904446 C28.5016932,29.8668872 26.6944882,31.2248797 24.4790301,31.9784237 C24.2211218,32.0272886 24.0325745,31.9931534 23.9133882,31.876018 C23.7942019,31.7588827 23.7346171,31.6119968 23.7346338,31.4353603 L23.7346338,28.3376019 C23.7346338,27.3880159 23.4865017,26.6930482 22.9902375,26.2526987 C23.5347812,26.1938141 24.024319,26.1058042 24.458851,25.9886688 C24.893383,25.8715335 25.3422785,25.680801 25.8055376,25.4164714 C26.2687966,25.1521418 26.6556591,24.8267354 26.9661251,24.4402521 C27.276591,24.0537688 27.5296112,23.5398222 27.7251857,22.8984123 C27.9207602,22.2570024 28.0185475,21.5203805 28.0185475,20.6885464 C28.0185475,19.504056 27.6414612,18.4959023 26.8872886,17.6640854 C27.240536,16.7733669 27.2023419,15.7752328 26.7727063,14.6696833 C26.5050218,14.5813565 26.1181593,14.6352226 25.6121189,14.8312818 C25.1060784,15.0273409 24.6669591,15.2428141 24.2947609,15.4777015 L23.7502256,15.8300324 C22.8622108,15.5757225 21.9454689,15.4485675 21,15.4485675 C20.0545311,15.4485675 19.1377892,15.5757225 18.2497744,15.8300324 C18.0969813,15.7223001 17.8940788,15.5901353 17.641067,15.433538 C17.3880551,15.2769408 16.9892689,15.0884007 16.4447085,14.8679176 C15.9001481,14.6474346 15.4894467,14.5813479 15.2126043,14.6696576 C14.7921266,15.7758408 14.7588206,16.7739749 15.1126863,17.6640597 C14.3585137,18.4958938 13.9814275,19.5040475 13.9814275,20.6885208 C13.9814275,21.5203548 14.0792147,22.2544676 14.2747892,22.8908591 C14.4703637,23.5272505 14.720944,24.0411971 15.0265302,24.4326988 C15.3321164,24.8242005 15.7165391,25.1521076 16.1797981,25.41642 C16.6430571,25.6807325 17.0919527,25.871465 17.5264847,25.9886174 C17.9610167,26.1057699 18.4505545,26.1937799 18.9950982,26.2526473 C18.6131238,26.60467 18.3790461,27.1085884 18.292865,27.7644025 C18.0924107,27.8621152 17.8775846,27.935404 17.6483866,27.984269 C17.4191886,28.0331339 17.1469167,28.0575663 16.831571,28.0575663 C16.5162253,28.0575663 16.203612,27.9523346 15.8937309,27.7418712 C15.5838499,27.5314078 15.3189144,27.225424 15.0989244,26.8239198 C14.9174043,26.5107253 14.6857747,26.2564154 14.4040358,26.0609899 C14.1222969,25.8655645 13.8860801,25.7481209 13.6953854,25.708659 L13.4084408,25.6644956 C13.2079866,25.6644956 13.069557,25.6864188 12.9931521,25.7302654 C12.9167472,25.7741119 12.8929083,25.8304873 12.9216353,25.8993914 C12.9503623,25.9682956 12.9934529,26.0368829 13.050907,26.1051533 C13.1083611,26.1734238 13.1703941,26.2319915 13.2370061,26.2808564 L13.336924,26.3541538 C13.5471712,26.4518665 13.7549701,26.6378974 13.9603209,26.9122466 C14.1656716,27.1865958 14.3160164,27.4362043 14.4113555,27.661072 L14.554364,27.9983735 C14.67843,28.3704354 14.8886689,28.6714094 15.1850804,28.9012955 C15.481492,29.1311815 15.8014334,29.2780674 16.1449045,29.3419532 C16.4883756,29.405839 16.8202406,29.4399742 17.1404995,29.4443589 C17.4607584,29.4487435 17.7256939,29.4315218 17.935306,29.3926936 L18.2644137,29.3335008 C18.2644137,29.7055627 18.2668619,30.1412107 18.2717584,30.6404447 C18.2766548,31.1396787 18.279103,31.4040083 18.279103,31.4334334 C18.279103,31.6094533 18.21707,31.7563392 18.093004,31.8740912 C17.9689379,31.9918431 17.7779507,32.0259784 17.5200424,31.9764969 C15.3045843,31.22297 13.4973793,29.8649774 12.0984276,27.9025191 C10.6994759,25.9400608 10,23.7305118 10,21.2738721 C10,19.2281225 10.4916769,17.3417791 11.4750308,15.6148418 C12.4583846,13.8879045 13.7928551,12.5202092 15.4784422,11.5117558 C17.1640293,10.5033024 19.0045486,9.99938397 21,10.0000006 C22.9954514,10.0006172 24.8359707,10.5045356 26.5215578,11.5117558 C28.2071449,12.518976 29.5416154,13.8866713 30.5249692,15.6148418 C31.5083231,17.3430123 32,19.2293557 32,21.2738721 C31.9990725,23.7324558 31.2995966,25.9420048 29.9006449,27.904446 Z"></path></g></g></g></svg><span>GitHub</span></div><div class="icon-v-right"></div></div></a></div><div class="col-lg-3 col-sm-6"><a id="btn-weixin"><div class="btn-content zh"><div class="btn-logo"><svg width="25px" height="21px" viewBox="0 0 25 21" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-512.000000, -2480.000000)" fill="rgba(93, 201, 116)"><g transform="translate(512.000000, 2480.000000)"><path d="M17.6290595,6.47976119 C17.7534123,6.47976119 17.8770026,6.48260946 18,6.4873469 C17.2166965,2.79549199 13.5198007,0 9.07678865,0 C4.06379837,0 0,3.55853831 0,7.94816178 C0,10.5128275 1.38756065,12.7933344 3.54074891,14.2466508 L2.63388325,17 L5.63681512,15.3050455 C6.69779456,15.6858421 7.85912588,15.8963236 9.07676039,15.8963236 C9.31148885,15.8963236 9.54412784,15.8885344 9.77433851,15.8731886 C9.52032463,15.1807388 9.38270085,14.4428328 9.38270085,13.676822 C9.38275733,9.70202902 13.0747399,6.47976119 17.6290595,6.47976119 Z M12.5,4 C13.328411,4 14,4.67155738 14,5.5 C14,6.32841103 13.3284426,7 12.5,7 C11.6715574,7 11,6.32844262 11,5.5 C11.0000316,4.67155738 11.671589,4 12.5,4 Z M5.5,7 C4.67158897,7 4,6.32844262 4,5.5 C4,4.67158897 4.67155738,4 5.5,4 C6.32844262,4 7,4.67155738 7,5.5 C7,6.32841103 6.32844262,7 5.5,7 Z"></path><path d="M25,13.4664775 C25,9.89513318 21.6421433,7 17.4999862,7 C13.3578291,7 10,9.89513318 10,13.4664775 C10,17.0378217 13.3578567,19.9329549 17.5000138,19.9329549 C18.36973,19.9329549 19.2046277,19.804878 19.9813841,19.5701641 L22.5457108,21 L21.8004292,18.7646117 C23.7349834,17.5951163 25,15.6582837 25,13.4664775 Z M15,12 C14.447707,12 14,11.552293 14,11 C14,10.447707 14.447707,10 15,10 C15.552293,10 16,10.447707 16,11 C16,11.552293 15.552293,12 15,12 Z M20,12 C19.447707,12 19,11.552293 19,11 C19,10.447707 19.447707,10 20,10 C20.552293,10 21,10.447707 21,11 C21,11.552293 20.5522667,12 20,12 Z"></path></g></g></g></svg><span>Wechat</span></div><div class="weixin-code"><img src="images/ercode.jpg"></div></div></a></div><div class="col-lg-3 col-sm-6"><a id="btn-weibo" href="https://weibo.com/echarts"><div class="btn-content"><div class="btn-logo"><svg width="25px" height="20px" viewBox="0 0 25 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-774.000000, -2480.000000)" fill="rgba(174, 44, 53)"><g transform="translate(767.000000, 2470.000000)"><g transform="translate(7.000000, 10.000000)"><path d="M9.56107255,18.530208 C5.55942203,18.7083394 2.28534432,16.6598289 2.28534432,13.9878588 C2.28534432,11.3158886 5.55942203,9.08924686 9.56107255,8.91111551 C13.5627231,8.73298415 16.8368008,10.4252319 16.8368008,13.0972021 C16.8368008,15.7691722 13.5627231,18.3520767 9.56107255,18.530208 Z M18.1100532,9.71270657 C17.1096406,9.53457522 17.6553202,9.0001812 17.6553202,9.0001812 C17.6553202,9.0001812 18.5647862,7.48606478 17.473427,6.32821106 C16.1092279,4.90316031 12.7442036,6.50634241 12.7442036,6.50634241 C11.4709512,6.95167077 11.8347376,6.32821106 12.0166308,5.34848869 C12.0166308,4.19063497 11.6528444,2.14212451 8.19687348,3.3890439 C4.74090259,4.54689763 1.83061129,8.7329842 1.83061129,8.7329842 C-0.26116057,11.49402 0.0116792299,13.6315961 0.0116792299,13.6315961 C0.557358851,18.3520767 5.4684754,19.5989961 9.37917931,19.9552588 C13.4717764,20.3115215 18.9285726,18.5302081 20.5656115,14.9675812 C22.1117037,11.3158886 19.1104658,9.89083792 18.1100532,9.71270657 Z"></path><path d="M12.8641827,12.2517204 C12.2123929,10.4024172 10.0707976,9.57023078 7.92920237,10.2174869 C5.78760713,10.9572081 4.57714023,12.9914416 5.13581726,14.7482796 C5.78760713,16.5975828 7.92920237,17.4297692 10.0707976,16.7825131 C12.2123929,16.135257 13.4228598,14.1010235 12.8641827,12.2517204 Z M8.11542806,15.4880009 C7.37052537,15.6729312 6.53250982,15.3955358 6.34628415,14.7482797 C6.16005847,14.1010235 6.62562266,13.4537674 7.46363821,13.176372 C8.2085409,12.9914416 9.04655645,13.2688371 9.23278212,13.9160932 C9.32589493,14.5633493 8.86033075,15.3030706 8.11542806,15.4880009 Z M10.3501361,13.176372 C10.2570233,13.4537674 9.88457196,13.6386977 9.60523346,13.5462326 C9.32589496,13.4537674 9.23278212,13.0839068 9.32589496,12.8065113 C9.4190078,12.5291159 9.79145914,12.3441855 10.0707976,12.4366507 C10.3501361,12.621581 10.5363618,12.8989765 10.3501361,13.176372 Z"></path><path d="M24.5953609,9.4285714 C24.5953609,9.3333333 24.6913146,9.2380952 24.6913146,9.14285713 C25.2670362,7.5238095 24.9791754,5.9047619 24.3075001,4.38095238 C23.0601032,1.7142857 20.3734021,0 17.4947939,0 C16.9190722,0 16.3433505,0.0952380996 15.8635825,0.190476199 L15.8635825,0.190476199 L15.8635825,0.190476199 C15.8635825,0.190476199 15.7676289,0.190476199 15.6716753,0.285714299 L15.6716753,0.285714299 C15.2878608,0.476190498 15,0.857142874 15,1.33333335 C15,2.00000002 15.479768,2.4761905 16.1514433,2.4761905 C16.2473969,2.4761905 16.3433505,2.4761905 16.5352577,2.3809524 L16.5352577,2.3809524 C16.8231186,2.1904762 17.3988402,2.09523812 17.4947938,2.09523812 L17.5907475,2.09523812 C19.6057732,2.09523812 21.5248454,3.23809527 22.3884279,5.23809525 C22.8681959,6.2857143 22.9641496,7.42857143 22.6762887,8.57142857 C22.6762887,8.66666667 22.5803351,8.85714285 22.5803351,8.95238095 C22.5803351,9.52380952 23.0601031,10 23.6358248,10 L23.827732,10 L23.827732,10 L23.9236856,10 C24.2115465,9.9047619 24.4034537,9.8095238 24.5953609,9.61904762 C24.4994073,9.5238095 24.4994073,9.5238095 24.5953609,9.4285714 C24.5953609,9.5238095 24.5953609,9.4285714 24.5953609,9.4285714 Z"></path><path d="M17.6310803,4 C17.3252528,4 16.9174827,4.08510639 16.6116551,4.08510639 C16.3058276,4.17021275 16,4.42553192 16,4.76595745 C16,5.10638297 16.3058275,5.36170214 16.7135976,5.36170214 C16.8155402,5.36170214 16.9174827,5.36170214 17.0194252,5.27659575 C17.2233102,5.27659575 17.3252527,5.19148936 17.5291378,5.19148936 C18.548563,5.19148936 19.4660456,5.87234042 19.4660456,6.72340425 C19.4660456,6.89361703 19.4660456,6.97872339 19.3641031,7.14893617 L19.3641031,7.40425531 L19.3641031,7.40425531 L19.3641031,7.40425531 L19.3641031,7.40425531 L19.3641031,7.40425531 L19.3641031,7.4893617 L19.3641031,7.4893617 C19.4660456,7.82978723 19.7718732,8 20.0777008,8 C20.3835283,8 20.5874133,7.82978723 20.7912984,7.65957447 L20.7912984,7.65957447 C20.8932409,7.40425533 20.9951834,7.06382978 20.9951834,6.72340425 C21.0971259,5.27659575 19.5679882,4 17.6310803,4 Z"></path></g></g></g></g></svg><span>Weibo</span></div><div class="icon-v-right"></div></div></a></div><div class="col-lg-3 col-sm-6"><a id="btn-twitter" href="https://twitter.com/ApacheECharts"><div class="btn-content"><div class="btn-logo"><svg width="22px" height="19px" viewBox="0 0 22 19" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-1029.000000, -2481.000000)" fill="rgba(0, 172, 237)" fill-rule="nonzero"><g transform="translate(1019.000000, 2470.000000)"><path d="M31.9965682,13.2536272 C31.3736136,14.2239084 30.6196136,15.0506018 29.7346591,15.7332964 C29.7441818,15.8714453 29.7489318,16.0792366 29.7489318,16.3566705 C29.7489318,17.6436908 29.5720682,18.9275445 29.2183409,20.2082316 C28.8645909,21.4890636 28.3274091,22.7184796 27.6069091,23.8965522 C26.8862955,25.0746247 26.0280455,26.1166031 25.0323864,27.0222697 C24.0366364,27.9281298 22.8360682,28.6508066 21.4306364,29.1904211 C20.0251818,29.7300356 18.5226591,30 16.9230227,30 C14.4015909,30 12.0938636,29.2822545 10,27.8470776 C10.3251136,27.8862863 10.6878182,27.9059148 11.0880909,27.9059148 C13.1819545,27.9059148 15.0477727,27.2230992 16.6854545,25.8575407 C15.7087727,25.8372354 14.8339318,25.5180789 14.0609545,24.8998053 C13.288,24.281701 12.7573636,23.4924033 12.4690909,22.532299 C12.7763409,22.581612 13.0604091,22.606341 13.32125,22.606341 C13.7215227,22.606341 14.1168864,22.5518066 14.5076136,22.4428346 C13.4654545,22.214883 12.6024318,21.6632061 11.9187955,20.7878041 C11.2351591,19.9125471 10.8933409,18.8958295 10.8933409,17.7380623 L10.8933409,17.6790802 C11.5258182,18.0553092 12.2052955,18.2580242 12.9318409,18.287201 C12.3172955,17.851458 11.8288409,17.2826425 11.4667727,16.5808028 C11.1046818,15.8790598 10.923,15.1170776 10.9219318,14.2949288 C10.9219318,13.4233702 11.1267045,12.6170789 11.5365227,11.8760064 C12.6620909,13.3505127 14.0323182,14.5304949 15.6474545,15.4160496 C17.2624545,16.3015076 18.9907727,16.7936705 20.8321364,16.8924898 C20.7582955,16.5162366 20.7213636,16.1501361 20.7213636,15.7941883 C20.7213636,14.4678626 21.1608409,13.3372176 22.0398409,12.4023257 C22.9188409,11.4674338 23.9818864,11 25.2289318,11 C26.5319318,11 27.6300455,11.5048779 28.5233636,12.5144402 C29.5382045,12.306673 30.4922273,11.9209198 31.3854091,11.3572048 C31.0412273,12.4947875 30.3808409,13.3759186 29.4041364,14.0003804 C30.2700455,13.9015611 31.1353409,13.6539809 32,13.2574224 L31.9965682,13.2536272 Z"></path></g></g></g></svg><span>Twitter</span></div><div class="icon-v-right"></div></div></a></div></div></div></section></div><footer><div class="container"><div class="row"><div class="col-md-9"><p>Copyright © 2017-2021, The Apache Software Foundation Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.</p><div class="icon-panel"><a href="mailto:dev@echarts.apache.org?body=%28Thanks%20for%20using%20ECharts.%20Email%20us%20if%20you%20have%20non-technical%20problems%20using%20ECharts.%20For%20technical%20support%2C%20please%20go%20to%20https%3A//github.com/apache/echarts/issues%20.%29" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-email.png?_v_=20200710_1"></a><a href="https://twitter.com/ApacheECharts" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-twitter.png?_v_=20200710_1"></a><a href="https://weibo.com/echarts" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-weibo.png?_v_=20200710_1"></a><a href="https://github.com/apache/echarts" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-github.png?_v_=20200710_1"></a></div></div><div id="footer-icon-panel" class="col-md-3"><a href="https://www.apache.org"><img src="https://echarts.apache.org/en/images/asf_logo.svg?_v_=20200710_1" class="footer-apache-logo"></a></div></div></div></footer></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://echarts.apache.org/en/js/common.js?_v_=b5b8944fb9"></script><script type="text/javascript">window.lazyLoadOptions = {
+<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>Please visit the official Apache ECharts Website at</p><a id="a2" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>Visit Official Website</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><nav role="navigation" class="navbar navbar-default navbar-fixed-top"><nav role="navigation" 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.apache.org/en/images/logo.png" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/en/index.html">Home</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Docs<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/feature.html">Features</a></li><li><a href="https://echarts.apache.org/en/tutorial.html">Tutorials</a></li><li><a href="https://echarts.apache.org/en/api.html">API</a></li><li><a href="https://echarts.apache.org/en/option.html">Chart Configuration</a></li><li><a href="https://echarts.apache.org/en/changelog.html">Changelog</a></li><li><a href="https://echarts.apache.org/en/faq.html">FAQ</a></li><li><a href="https://echarts.apache.org/en/tutorial.html#ECharts%205%20Upgrade%20Guide">V5 Upgrade Guide<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Download<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/download.html">Download</a></li><li><a href="https://echarts.apache.org/en/download-theme.html">Download Themes</a></li><li><a href="https://echarts.apache.org/en/download-extension.html">Download Extensions</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/en/index.html">Examples</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Resources<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/spreadsheet.html">Spread Sheet Tool</a></li><li><a href="https://echarts.apache.org/en/theme-builder.html">Theme Builder</a></li><li><a href="https://echarts.apache.org/en/cheat-sheet.html">Cheat Sheet</a></li><li><a href="https://echarts.apache.org/en/resources.html">More Resources</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Community<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/en/events.html">Events</a></li><li><a href="https://echarts.apache.org/en/committers.html">Committers</a></li><li><a href="https://echarts.apache.org/en/maillist.html">Mailing List</a></li><li><a href="https://echarts.apache.org/en/contributing.html">How to Contribute</a></li><li><a href="https://echarts.apache.org/en/dependencies.html">Dependencies</a></li><li><a href="https://echarts.apache.org/en/coding-standard.html">Code Standard</a></li><li><a href="https://github.com/apache/echarts" target="_blank">Source Code (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues (GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/en/security.html">Security</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">License<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">Events<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">Sponsorship<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">Thanks<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('zh')">中文</a></li></ul></div></div></nav></nav><div id="page-index" class="page-main"><div id="main-content"><section id="home-section"><div class="home-brand-panel description container"><div class="home-info"><div class="home-brand">Apache ECharts</div><div class="home-subtitle">An Open Source JavaScript Visualization Library</div><div class="home-btn-panel"><a href="https://echarts.apache.org/en/tutorial.html#Get%20Started%20with%20ECharts%20in%205%20minutes" class="btn btn-main btn-index-home"><svg width="22px" height="19px" viewBox="0 0 17 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="index-home-svg"><path fill="#fff" d="M10.9,16.2 C10.9,16.8 10.5,17.2 9.9,17.2 L5.3,17.2 C4.7,17.2 4.3,16.8 4.3,16.2 C4.3,15.6 4.7,15.2 5.3,15.2 L9.9,15.2 C10.5,15.2 10.9,15.7 10.9,16.2 Z M13.6,7.5 L5.3,7.5 C4.7,7.5 4.3,7.9 4.3,8.5 C4.3,9.1 4.7,9.5 5.3,9.5 L13.6,9.5 C14.2,9.5 14.6,9.1 14.6,8.5 C14.6,7.9 14.2,7.5 13.6,7.5 Z M17.9,6 L17.9,19 C17.9,20.7 16.6,22 14.9,22 L3.9,22 C2.2,22 0.9,20.7 0.9,19 L0.9,7.5 L0.9,6 L0.9,5 L0.9,4 L0.9,2 C0.9,0.9 1.8,0 2.9,0 L12.9,0 C14,0 14.9,0.9 14.9,2 L14.9,3 C16.6,3 17.9,4.3 17.9,6 Z M2.9,3 L3.9,3 L12.9,3 L12.9,2 L2.9,2 L2.9,3 Z M15.9,6 C15.9,5.4 15.5,5 14.9,5 L3.9,5 C3.3,5 2.9,5.4 2.9,6 L2.9,19 C2.9,19.6 3.3,20 3.9,20 L14.9,20 C15.5,20 15.9,19.6 15.9,19 L15.9,6 Z M13.6,11.5 L5.3,11.5 C4.7,11.5 4.3,11.9 4.3,12.5 C4.3,13.1 4.7,13.5 5.3,13.5 L13.6,13.5 C14.2,13.5 14.6,13.1 14.6,12.5 C14.6,11.9 14.2,11.5 13.6,11.5 Z"></path></svg><span>Get Started</span></a><a href="https://echarts.apache.org/examples/en/index.html" class="btn btn-main btn-index-home"><svg width="25px" height="19px" viewBox="0 0 17 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="index-home-svg"><path fill="#F72C5B" d="M21,0 L6,0 C4.9,0 4,0.9 4,2 L4,4 L2,4 C0.9,4 0,4.9 0,6 L0,18 C0,19.1 0.9,20 2,20 L17,20 C18.1,20 19,19.1 19,18 L19,16 L21,16 C22.1,16 23,15.1 23,14 L23,2 C23,0.9 22.1,0 21,0 Z M17,18 L2,18 L2,6 L17,6 L17,18 Z M21,14 L19,14 L19,6 C19,4.9 18.1,4 17,4 L6,4 L6,2 L21,2 L21,14 Z M4,15 L4,12 C4,11.4 4.4,11 5,11 C5.6,11 6,11.4 6,12 L6,15 C6,15.6 5.6,16 5,16 C4.4,16 4,15.6 4,15 Z M13,15 L13,12 C13,11.4 13.4,11 14,11 C14.6,11 15,11.4 15,12 L15,15 C15,15.6 14.6,16 14,16 C13.4,16 13,15.6 13,15 Z M7,15 L7,9 C7,8.4 7.4,8 8,8 C8.6,8 9,8.4 9,9 L9,15 C9,15.6 8.6,16 8,16 C7.4,16 7,15.6 7,15 Z M10,15 L10,11 C10,10.4 10.4,10 11,10 C11.6,10 12,10.4 12,11 L12,15 C12,15.6 11.6,16 11,16 C10.4,16 10,15.6 10,15 Z"></path></svg><span>Demo</span></a><a href="https://github.com/apache/echarts" target="_blank" class="btn btn-main btn-index-home btn-index-github"><svg width="22px" height="22px" viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-262.000000, -2480.000000)" fill="#081642"><g transform="translate(252.000000, 2470.000000)"><path d="M29.9006449,27.904446 C28.5016932,29.8668872 26.6944882,31.2248797 24.4790301,31.9784237 C24.2211218,32.0272886 24.0325745,31.9931534 23.9133882,31.876018 C23.7942019,31.7588827 23.7346171,31.6119968 23.7346338,31.4353603 L23.7346338,28.3376019 C23.7346338,27.3880159 23.4865017,26.6930482 22.9902375,26.2526987 C23.5347812,26.1938141 24.024319,26.1058042 24.458851,25.9886688 C24.893383,25.8715335 25.3422785,25.680801 25.8055376,25.4164714 C26.2687966,25.1521418 26.6556591,24.8267354 26.9661251,24.4402521 C27.276591,24.0537688 27.5296112,23.5398222 27.7251857,22.8984123 C27.9207602,22.2570024 28.0185475,21.5203805 28.0185475,20.6885464 C28.0185475,19.504056 27.6414612,18.4959023 26.8872886,17.6640854 C27.240536,16.7733669 27.2023419,15.7752328 26.7727063,14.6696833 C26.5050218,14.5813565 26.1181593,14.6352226 25.6121189,14.8312818 C25.1060784,15.0273409 24.6669591,15.2428141 24.2947609,15.4777015 L23.7502256,15.8300324 C22.8622108,15.5757225 21.9454689,15.4485675 21,15.4485675 C20.0545311,15.4485675 19.1377892,15.5757225 18.2497744,15.8300324 C18.0969813,15.7223001 17.8940788,15.5901353 17.641067,15.433538 C17.3880551,15.2769408 16.9892689,15.0884007 16.4447085,14.8679176 C15.9001481,14.6474346 15.4894467,14.5813479 15.2126043,14.6696576 C14.7921266,15.7758408 14.7588206,16.7739749 15.1126863,17.6640597 C14.3585137,18.4958938 13.9814275,19.5040475 13.9814275,20.6885208 C13.9814275,21.5203548 14.0792147,22.2544676 14.2747892,22.8908591 C14.4703637,23.5272505 14.720944,24.0411971 15.0265302,24.4326988 C15.3321164,24.8242005 15.7165391,25.1521076 16.1797981,25.41642 C16.6430571,25.6807325 17.0919527,25.871465 17.5264847,25.9886174 C17.9610167,26.1057699 18.4505545,26.1937799 18.9950982,26.2526473 C18.6131238,26.60467 18.3790461,27.1085884 18.292865,27.7644025 C18.0924107,27.8621152 17.8775846,27.935404 17.6483866,27.984269 C17.4191886,28.0331339 17.1469167,28.0575663 16.831571,28.0575663 C16.5162253,28.0575663 16.203612,27.9523346 15.8937309,27.7418712 C15.5838499,27.5314078 15.3189144,27.225424 15.0989244,26.8239198 C14.9174043,26.5107253 14.6857747,26.2564154 14.4040358,26.0609899 C14.1222969,25.8655645 13.8860801,25.7481209 13.6953854,25.708659 L13.4084408,25.6644956 C13.2079866,25.6644956 13.069557,25.6864188 12.9931521,25.7302654 C12.9167472,25.7741119 12.8929083,25.8304873 12.9216353,25.8993914 C12.9503623,25.9682956 12.9934529,26.0368829 13.050907,26.1051533 C13.1083611,26.1734238 13.1703941,26.2319915 13.2370061,26.2808564 L13.336924,26.3541538 C13.5471712,26.4518665 13.7549701,26.6378974 13.9603209,26.9122466 C14.1656716,27.1865958 14.3160164,27.4362043 14.4113555,27.661072 L14.554364,27.9983735 C14.67843,28.3704354 14.8886689,28.6714094 15.1850804,28.9012955 C15.481492,29.1311815 15.8014334,29.2780674 16.1449045,29.3419532 C16.4883756,29.405839 16.8202406,29.4399742 17.1404995,29.4443589 C17.4607584,29.4487435 17.7256939,29.4315218 17.935306,29.3926936 L18.2644137,29.3335008 C18.2644137,29.7055627 18.2668619,30.1412107 18.2717584,30.6404447 C18.2766548,31.1396787 18.279103,31.4040083 18.279103,31.4334334 C18.279103,31.6094533 18.21707,31.7563392 18.093004,31.8740912 C17.9689379,31.9918431 17.7779507,32.0259784 17.5200424,31.9764969 C15.3045843,31.22297 13.4973793,29.8649774 12.0984276,27.9025191 C10.6994759,25.9400608 10,23.7305118 10,21.2738721 C10,19.2281225 10.4916769,17.3417791 11.4750308,15.6148418 C12.4583846,13.8879045 13.7928551,12.5202092 15.4784422,11.5117558 C17.1640293,10.5033024 19.0045486,9.99938397 21,10.0000006 C22.9954514,10.0006172 24.8359707,10.5045356 26.5215578,11.5117558 C28.2071449,12.518976 29.5416154,13.8866713 30.5249692,15.6148418 C31.5083231,17.3430123 32,19.2293557 32,21.2738721 C31.9990725,23.7324558 31.2995966,25.9420048 29.9006449,27.904446 Z"></path></g></g></g></svg></a></div></div><div class="home-chart"><img src="images/index-home-pie.png"></div></div></section><section id="events-section"><div class="container"><a href="./events/2021-07-05-apachecon.html" class="event"><picture><source data-srcset="https://echarts.apache.org/en/images/event/20210705-apachecon-en.webp?_v_=20200710_1" type="image/webp" class="lazy"><source data-srcset="https://echarts.apache.org/en/images/event/20210705-apachecon-en.jpeg?_v_=20200710_1" type="image/jpeg" class="lazy"><img data-src="https://echarts.apache.org/en/images/event/20210705-apachecon-en.jpeg?_v_=20200710_1" alt="ApacheCon Asia 2021" class="lazy"></picture></a></div></section><section id="feature-section"><div class="container"><div class="index-features"><h2 class="reveal">Features</h2><hr class="reveal"><a href="https://echarts.apache.org/en/feature.html" class="more reveal">View More</a></div><div class="row"><div class="col-md-6"><div id="index-feature-1" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-1" class="index-feature-icon-bg"></div><div id="icon-1" class="index-feature-icon"></div></div><div class="index-feature-right reveal"><h3 class="reveal">Flexible Chart Types</h3><p class="reveal-later">Apache ECharts provides more than 20 chart types available out of the box, along with a dozen components, and each of them can be arbitrarily combined to use.</p></div></div></div><div class="col-md-6"><div id="index-feature-2" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-2" class="index-feature-icon-bg"></div><div id="icon-2" class="index-feature-icon"></div></div><div class="index-feature-right"><h3 class="reveal">Powerful Rendering Engine</h3><p class="reveal-later">Easily switch between Canvas and SVG rendering. Progressive rendering and stream loading make it possible to render 10 million data in realtime.</p></div></div></div><div class="col-md-6"><div id="index-feature-3" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-3" class="index-feature-icon-bg"></div><div id="icon-3" class="index-feature-icon"></div></div><div class="index-feature-right"><h3 class="reveal">Professional Data Analysis</h3><p class="reveal-later">Manage data through datasets, which support data transforms like filtering, clustering, and regression to help analyze multi-dimensional analysis of the same data.</p></div></div></div><div class="col-md-6"><div id="index-feature-4" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-4" class="index-feature-icon-bg"></div><div id="icon-4" class="index-feature-icon"></div></div><div class="index-feature-right"><h3 class="reveal">Elegant Visual Design</h3><p class="reveal-later">The default design follows visualization principles, supports responsive design. Flexible configurations make it easy to customize.</p></div></div></div><div class="col-md-6"><div id="index-feature-5" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-5" class="index-feature-icon-bg"></div><div id="icon-5" class="index-feature-icon"></div></div><div class="index-feature-right"><h3 class="reveal">A Healthy Community</h3><p class="reveal-later">The active open source community ensures the healthy development of the project and contributes a wealth of third-party extensions.</p></div></div></div><div class="col-md-6"><div id="index-feature-6" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-6" class="index-feature-icon-bg"></div><div id="icon-6" class="index-feature-icon"></div></div><div class="index-feature-right"><h3 class="reveal">Accessibility-Friendly</h3><p class="reveal-later">Automatically generated chart descriptions and decal patterns help users with disabilities understand the content and the stories behind the charts.</p></div></div></div></div></div></section><section id="publication"><div class="container"><div id="start-line"></div><div class="paper"><div class="content"><h2 class="reveal-latest">ECharts: A Declarative Framework for Rapid Construction of Web-based Visualization</h2><p class="note reveal-latest">You are welcomed to cite the following paper whenever you use ECharts in your R&D projects, products, research papers, technical reports, news reports, books, presentations, teaching, patents, and other related intelligence activities.</p><div class="single-btn-panel reveal-latest"><a href="http://www.cad.zju.edu.cn/home/vagblog/VAG_Work/echarts.pdf" class="pdf reveal-later">Visual Informatics, 2018 [PDF]</a></div></div><div class="icon"><div id="paper-icon"></div></div></div><div id="end-line"></div></div></section><section id="about-section" class="normal reveal-about"><div class="container"><h3>Follow</h3><hr><p>Follow us to get more updates in time.</p><div class="btn-panel row"><div class="col-lg-3 col-sm-6"><a id="btn-github" href="https://github.com/apache/echarts"><div class="btn-content"><div class="btn-logo"><svg width="22px" height="22px" viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-262.000000, -2480.000000)" fill="#081642"><g transform="translate(252.000000, 2470.000000)"><path d="M29.9006449,27.904446 C28.5016932,29.8668872 26.6944882,31.2248797 24.4790301,31.9784237 C24.2211218,32.0272886 24.0325745,31.9931534 23.9133882,31.876018 C23.7942019,31.7588827 23.7346171,31.6119968 23.7346338,31.4353603 L23.7346338,28.3376019 C23.7346338,27.3880159 23.4865017,26.6930482 22.9902375,26.2526987 C23.5347812,26.1938141 24.024319,26.1058042 24.458851,25.9886688 C24.893383,25.8715335 25.3422785,25.680801 25.8055376,25.4164714 C26.2687966,25.1521418 26.6556591,24.8267354 26.9661251,24.4402521 C27.276591,24.0537688 27.5296112,23.5398222 27.7251857,22.8984123 C27.9207602,22.2570024 28.0185475,21.5203805 28.0185475,20.6885464 C28.0185475,19.504056 27.6414612,18.4959023 26.8872886,17.6640854 C27.240536,16.7733669 27.2023419,15.7752328 26.7727063,14.6696833 C26.5050218,14.5813565 26.1181593,14.6352226 25.6121189,14.8312818 C25.1060784,15.0273409 24.6669591,15.2428141 24.2947609,15.4777015 L23.7502256,15.8300324 C22.8622108,15.5757225 21.9454689,15.4485675 21,15.4485675 C20.0545311,15.4485675 19.1377892,15.5757225 18.2497744,15.8300324 C18.0969813,15.7223001 17.8940788,15.5901353 17.641067,15.433538 C17.3880551,15.2769408 16.9892689,15.0884007 16.4447085,14.8679176 C15.9001481,14.6474346 15.4894467,14.5813479 15.2126043,14.6696576 C14.7921266,15.7758408 14.7588206,16.7739749 15.1126863,17.6640597 C14.3585137,18.4958938 13.9814275,19.5040475 13.9814275,20.6885208 C13.9814275,21.5203548 14.0792147,22.2544676 14.2747892,22.8908591 C14.4703637,23.5272505 14.720944,24.0411971 15.0265302,24.4326988 C15.3321164,24.8242005 15.7165391,25.1521076 16.1797981,25.41642 C16.6430571,25.6807325 17.0919527,25.871465 17.5264847,25.9886174 C17.9610167,26.1057699 18.4505545,26.1937799 18.9950982,26.2526473 C18.6131238,26.60467 18.3790461,27.1085884 18.292865,27.7644025 C18.0924107,27.8621152 17.8775846,27.935404 17.6483866,27.984269 C17.4191886,28.0331339 17.1469167,28.0575663 16.831571,28.0575663 C16.5162253,28.0575663 16.203612,27.9523346 15.8937309,27.7418712 C15.5838499,27.5314078 15.3189144,27.225424 15.0989244,26.8239198 C14.9174043,26.5107253 14.6857747,26.2564154 14.4040358,26.0609899 C14.1222969,25.8655645 13.8860801,25.7481209 13.6953854,25.708659 L13.4084408,25.6644956 C13.2079866,25.6644956 13.069557,25.6864188 12.9931521,25.7302654 C12.9167472,25.7741119 12.8929083,25.8304873 12.9216353,25.8993914 C12.9503623,25.9682956 12.9934529,26.0368829 13.050907,26.1051533 C13.1083611,26.1734238 13.1703941,26.2319915 13.2370061,26.2808564 L13.336924,26.3541538 C13.5471712,26.4518665 13.7549701,26.6378974 13.9603209,26.9122466 C14.1656716,27.1865958 14.3160164,27.4362043 14.4113555,27.661072 L14.554364,27.9983735 C14.67843,28.3704354 14.8886689,28.6714094 15.1850804,28.9012955 C15.481492,29.1311815 15.8014334,29.2780674 16.1449045,29.3419532 C16.4883756,29.405839 16.8202406,29.4399742 17.1404995,29.4443589 C17.4607584,29.4487435 17.7256939,29.4315218 17.935306,29.3926936 L18.2644137,29.3335008 C18.2644137,29.7055627 18.2668619,30.1412107 18.2717584,30.6404447 C18.2766548,31.1396787 18.279103,31.4040083 18.279103,31.4334334 C18.279103,31.6094533 18.21707,31.7563392 18.093004,31.8740912 C17.9689379,31.9918431 17.7779507,32.0259784 17.5200424,31.9764969 C15.3045843,31.22297 13.4973793,29.8649774 12.0984276,27.9025191 C10.6994759,25.9400608 10,23.7305118 10,21.2738721 C10,19.2281225 10.4916769,17.3417791 11.4750308,15.6148418 C12.4583846,13.8879045 13.7928551,12.5202092 15.4784422,11.5117558 C17.1640293,10.5033024 19.0045486,9.99938397 21,10.0000006 C22.9954514,10.0006172 24.8359707,10.5045356 26.5215578,11.5117558 C28.2071449,12.518976 29.5416154,13.8866713 30.5249692,15.6148418 C31.5083231,17.3430123 32,19.2293557 32,21.2738721 C31.9990725,23.7324558 31.2995966,25.9420048 29.9006449,27.904446 Z"></path></g></g></g></svg><span>GitHub</span></div><div class="icon-v-right"></div></div></a></div><div class="col-lg-3 col-sm-6"><a id="btn-weixin"><div class="btn-content zh"><div class="btn-logo"><svg width="25px" height="21px" viewBox="0 0 25 21" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-512.000000, -2480.000000)" fill="rgba(93, 201, 116)"><g transform="translate(512.000000, 2480.000000)"><path d="M17.6290595,6.47976119 C17.7534123,6.47976119 17.8770026,6.48260946 18,6.4873469 C17.2166965,2.79549199 13.5198007,0 9.07678865,0 C4.06379837,0 0,3.55853831 0,7.94816178 C0,10.5128275 1.38756065,12.7933344 3.54074891,14.2466508 L2.63388325,17 L5.63681512,15.3050455 C6.69779456,15.6858421 7.85912588,15.8963236 9.07676039,15.8963236 C9.31148885,15.8963236 9.54412784,15.8885344 9.77433851,15.8731886 C9.52032463,15.1807388 9.38270085,14.4428328 9.38270085,13.676822 C9.38275733,9.70202902 13.0747399,6.47976119 17.6290595,6.47976119 Z M12.5,4 C13.328411,4 14,4.67155738 14,5.5 C14,6.32841103 13.3284426,7 12.5,7 C11.6715574,7 11,6.32844262 11,5.5 C11.0000316,4.67155738 11.671589,4 12.5,4 Z M5.5,7 C4.67158897,7 4,6.32844262 4,5.5 C4,4.67158897 4.67155738,4 5.5,4 C6.32844262,4 7,4.67155738 7,5.5 C7,6.32841103 6.32844262,7 5.5,7 Z"></path><path d="M25,13.4664775 C25,9.89513318 21.6421433,7 17.4999862,7 C13.3578291,7 10,9.89513318 10,13.4664775 C10,17.0378217 13.3578567,19.9329549 17.5000138,19.9329549 C18.36973,19.9329549 19.2046277,19.804878 19.9813841,19.5701641 L22.5457108,21 L21.8004292,18.7646117 C23.7349834,17.5951163 25,15.6582837 25,13.4664775 Z M15,12 C14.447707,12 14,11.552293 14,11 C14,10.447707 14.447707,10 15,10 C15.552293,10 16,10.447707 16,11 C16,11.552293 15.552293,12 15,12 Z M20,12 C19.447707,12 19,11.552293 19,11 C19,10.447707 19.447707,10 20,10 C20.552293,10 21,10.447707 21,11 C21,11.552293 20.5522667,12 20,12 Z"></path></g></g></g></svg><span>Wechat</span></div><div class="weixin-code"><img src="images/ercode.jpg"></div></div></a></div><div class="col-lg-3 col-sm-6"><a id="btn-weibo" href="https://weibo.com/echarts"><div class="btn-content"><div class="btn-logo"><svg width="25px" height="20px" viewBox="0 0 25 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-774.000000, -2480.000000)" fill="rgba(174, 44, 53)"><g transform="translate(767.000000, 2470.000000)"><g transform="translate(7.000000, 10.000000)"><path d="M9.56107255,18.530208 C5.55942203,18.7083394 2.28534432,16.6598289 2.28534432,13.9878588 C2.28534432,11.3158886 5.55942203,9.08924686 9.56107255,8.91111551 C13.5627231,8.73298415 16.8368008,10.4252319 16.8368008,13.0972021 C16.8368008,15.7691722 13.5627231,18.3520767 9.56107255,18.530208 Z M18.1100532,9.71270657 C17.1096406,9.53457522 17.6553202,9.0001812 17.6553202,9.0001812 C17.6553202,9.0001812 18.5647862,7.48606478 17.473427,6.32821106 C16.1092279,4.90316031 12.7442036,6.50634241 12.7442036,6.50634241 C11.4709512,6.95167077 11.8347376,6.32821106 12.0166308,5.34848869 C12.0166308,4.19063497 11.6528444,2.14212451 8.19687348,3.3890439 C4.74090259,4.54689763 1.83061129,8.7329842 1.83061129,8.7329842 C-0.26116057,11.49402 0.0116792299,13.6315961 0.0116792299,13.6315961 C0.557358851,18.3520767 5.4684754,19.5989961 9.37917931,19.9552588 C13.4717764,20.3115215 18.9285726,18.5302081 20.5656115,14.9675812 C22.1117037,11.3158886 19.1104658,9.89083792 18.1100532,9.71270657 Z"></path><path d="M12.8641827,12.2517204 C12.2123929,10.4024172 10.0707976,9.57023078 7.92920237,10.2174869 C5.78760713,10.9572081 4.57714023,12.9914416 5.13581726,14.7482796 C5.78760713,16.5975828 7.92920237,17.4297692 10.0707976,16.7825131 C12.2123929,16.135257 13.4228598,14.1010235 12.8641827,12.2517204 Z M8.11542806,15.4880009 C7.37052537,15.6729312 6.53250982,15.3955358 6.34628415,14.7482797 C6.16005847,14.1010235 6.62562266,13.4537674 7.46363821,13.176372 C8.2085409,12.9914416 9.04655645,13.2688371 9.23278212,13.9160932 C9.32589493,14.5633493 8.86033075,15.3030706 8.11542806,15.4880009 Z M10.3501361,13.176372 C10.2570233,13.4537674 9.88457196,13.6386977 9.60523346,13.5462326 C9.32589496,13.4537674 9.23278212,13.0839068 9.32589496,12.8065113 C9.4190078,12.5291159 9.79145914,12.3441855 10.0707976,12.4366507 C10.3501361,12.621581 10.5363618,12.8989765 10.3501361,13.176372 Z"></path><path d="M24.5953609,9.4285714 C24.5953609,9.3333333 24.6913146,9.2380952 24.6913146,9.14285713 C25.2670362,7.5238095 24.9791754,5.9047619 24.3075001,4.38095238 C23.0601032,1.7142857 20.3734021,0 17.4947939,0 C16.9190722,0 16.3433505,0.0952380996 15.8635825,0.190476199 L15.8635825,0.190476199 L15.8635825,0.190476199 C15.8635825,0.190476199 15.7676289,0.190476199 15.6716753,0.285714299 L15.6716753,0.285714299 C15.2878608,0.476190498 15,0.857142874 15,1.33333335 C15,2.00000002 15.479768,2.4761905 16.1514433,2.4761905 C16.2473969,2.4761905 16.3433505,2.4761905 16.5352577,2.3809524 L16.5352577,2.3809524 C16.8231186,2.1904762 17.3988402,2.09523812 17.4947938,2.09523812 L17.5907475,2.09523812 C19.6057732,2.09523812 21.5248454,3.23809527 22.3884279,5.23809525 C22.8681959,6.2857143 22.9641496,7.42857143 22.6762887,8.57142857 C22.6762887,8.66666667 22.5803351,8.85714285 22.5803351,8.95238095 C22.5803351,9.52380952 23.0601031,10 23.6358248,10 L23.827732,10 L23.827732,10 L23.9236856,10 C24.2115465,9.9047619 24.4034537,9.8095238 24.5953609,9.61904762 C24.4994073,9.5238095 24.4994073,9.5238095 24.5953609,9.4285714 C24.5953609,9.5238095 24.5953609,9.4285714 24.5953609,9.4285714 Z"></path><path d="M17.6310803,4 C17.3252528,4 16.9174827,4.08510639 16.6116551,4.08510639 C16.3058276,4.17021275 16,4.42553192 16,4.76595745 C16,5.10638297 16.3058275,5.36170214 16.7135976,5.36170214 C16.8155402,5.36170214 16.9174827,5.36170214 17.0194252,5.27659575 C17.2233102,5.27659575 17.3252527,5.19148936 17.5291378,5.19148936 C18.548563,5.19148936 19.4660456,5.87234042 19.4660456,6.72340425 C19.4660456,6.89361703 19.4660456,6.97872339 19.3641031,7.14893617 L19.3641031,7.40425531 L19.3641031,7.40425531 L19.3641031,7.40425531 L19.3641031,7.40425531 L19.3641031,7.40425531 L19.3641031,7.4893617 L19.3641031,7.4893617 C19.4660456,7.82978723 19.7718732,8 20.0777008,8 C20.3835283,8 20.5874133,7.82978723 20.7912984,7.65957447 L20.7912984,7.65957447 C20.8932409,7.40425533 20.9951834,7.06382978 20.9951834,6.72340425 C21.0971259,5.27659575 19.5679882,4 17.6310803,4 Z"></path></g></g></g></g></svg><span>Weibo</span></div><div class="icon-v-right"></div></div></a></div><div class="col-lg-3 col-sm-6"><a id="btn-twitter" href="https://twitter.com/ApacheECharts"><div class="btn-content"><div class="btn-logo"><svg width="22px" height="19px" viewBox="0 0 22 19" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-1029.000000, -2481.000000)" fill="rgba(0, 172, 237)" fill-rule="nonzero"><g transform="translate(1019.000000, 2470.000000)"><path d="M31.9965682,13.2536272 C31.3736136,14.2239084 30.6196136,15.0506018 29.7346591,15.7332964 C29.7441818,15.8714453 29.7489318,16.0792366 29.7489318,16.3566705 C29.7489318,17.6436908 29.5720682,18.9275445 29.2183409,20.2082316 C28.8645909,21.4890636 28.3274091,22.7184796 27.6069091,23.8965522 C26.8862955,25.0746247 26.0280455,26.1166031 25.0323864,27.0222697 C24.0366364,27.9281298 22.8360682,28.6508066 21.4306364,29.1904211 C20.0251818,29.7300356 18.5226591,30 16.9230227,30 C14.4015909,30 12.0938636,29.2822545 10,27.8470776 C10.3251136,27.8862863 10.6878182,27.9059148 11.0880909,27.9059148 C13.1819545,27.9059148 15.0477727,27.2230992 16.6854545,25.8575407 C15.7087727,25.8372354 14.8339318,25.5180789 14.0609545,24.8998053 C13.288,24.281701 12.7573636,23.4924033 12.4690909,22.532299 C12.7763409,22.581612 13.0604091,22.606341 13.32125,22.606341 C13.7215227,22.606341 14.1168864,22.5518066 14.5076136,22.4428346 C13.4654545,22.214883 12.6024318,21.6632061 11.9187955,20.7878041 C11.2351591,19.9125471 10.8933409,18.8958295 10.8933409,17.7380623 L10.8933409,17.6790802 C11.5258182,18.0553092 12.2052955,18.2580242 12.9318409,18.287201 C12.3172955,17.851458 11.8288409,17.2826425 11.4667727,16.5808028 C11.1046818,15.8790598 10.923,15.1170776 10.9219318,14.2949288 C10.9219318,13.4233702 11.1267045,12.6170789 11.5365227,11.8760064 C12.6620909,13.3505127 14.0323182,14.5304949 15.6474545,15.4160496 C17.2624545,16.3015076 18.9907727,16.7936705 20.8321364,16.8924898 C20.7582955,16.5162366 20.7213636,16.1501361 20.7213636,15.7941883 C20.7213636,14.4678626 21.1608409,13.3372176 22.0398409,12.4023257 C22.9188409,11.4674338 23.9818864,11 25.2289318,11 C26.5319318,11 27.6300455,11.5048779 28.5233636,12.5144402 C29.5382045,12.306673 30.4922273,11.9209198 31.3854091,11.3572048 C31.0412273,12.4947875 30.3808409,13.3759186 29.4041364,14.0003804 C30.2700455,13.9015611 31.1353409,13.6539809 32,13.2574224 L31.9965682,13.2536272 Z"></path></g></g></g></svg><span>Twitter</span></div><div class="icon-v-right"></div></div></a></div></div></div></section></div><footer><div class="container"><div class="row"><div class="col-md-9"><p>Copyright © 2017-2021, The Apache Software Foundation Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.</p><div class="icon-panel"><a href="mailto:dev@echarts.apache.org?body=%28Thanks%20for%20using%20ECharts.%20Email%20us%20if%20you%20have%20non-technical%20problems%20using%20ECharts.%20For%20technical%20support%2C%20please%20go%20to%20https%3A//github.com/apache/echarts/issues%20.%29" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-email.png?_v_=20200710_1"></a><a href="https://twitter.com/ApacheECharts" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-twitter.png?_v_=20200710_1"></a><a href="https://weibo.com/echarts" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-weibo.png?_v_=20200710_1"></a><a href="https://github.com/apache/echarts" class="footer-icon"><img src="https://echarts.apache.org/en/images/icon-github.png?_v_=20200710_1"></a></div></div><div id="footer-icon-panel" class="col-md-3"><a href="https://www.apache.org"><img src="https://echarts.apache.org/en/images/asf_logo.svg?_v_=20200710_1" class="footer-apache-logo"></a></div></div></div></footer></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://echarts.apache.org/en/js/common.js?_v_=b5b8944fb9"></script><script type="text/javascript">window.lazyLoadOptions = {
     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.apache.org/en/js/index.js?_v_=1624430965835"></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.apache.org/en/js/index.js?_v_=1625800930981"></script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
 (function() {
 var hm = document.createElement("script");
 
diff --git a/en/option-gl.html b/en/option-gl.html
index 5e5adaf..f407fa2 100644
--- a/en/option-gl.html
+++ b/en/option-gl.html
@@ -19,7 +19,7 @@
 };
 if (window.EC_WWW_CDN_PAY_ROOT) {
     window.globalArgsExtra.cdnRoot = window.EC_WWW_CDN_PAY_ROOT + '/en/' + window.globalArgsExtra.baseUrl
-}</script><script type="text/javascript">window.globalArgsExtra.version = '5728b56521';
+}</script><script type="text/javascript">window.globalArgsExtra.version = '7bbe88c914';
 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 8d37b54..f4c54e8 100644
--- a/en/option.html
+++ b/en/option.html
@@ -19,7 +19,7 @@
 };
 if (window.EC_WWW_CDN_PAY_ROOT) {
     window.globalArgsExtra.cdnRoot = window.EC_WWW_CDN_PAY_ROOT + '/en/' + window.globalArgsExtra.baseUrl
-}</script><script type="text/javascript">window.globalArgsExtra.version = '5728b56521';
+}</script><script type="text/javascript">window.globalArgsExtra.version = '7bbe88c914';
 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/spreadsheet.html b/en/spreadsheet.html
index 0c69c43..7e25086 100644
--- a/en/spreadsheet.html
+++ b/en/spreadsheet.html
@@ -12,7 +12,7 @@
 var vendorPath = '../vendors';
 
 define('globalArgs', extend({
-    version: '1624430965835',
+    version: '1625800930981',
     basePath: './'
 }, window.globalArgsExtra || {}));
 
@@ -31,7 +31,7 @@
         numeral: vendorPath + '/numeral/1.4.7/numeral.min',
         immutable: vendorPath + '/immutable/3.7.4/dist/immutable'
     },
-    urlArgs: '_v_=1624430965835'
+    urlArgs: '_v_=1625800930981'
 });
 
 require(['spreadsheet/spreadsheet'], function (spreadsheet) {
diff --git a/en/tutorial.html b/en/tutorial.html
index 69ecb1b..34f4189 100644
--- a/en/tutorial.html
+++ b/en/tutorial.html
@@ -19,7 +19,7 @@
 };
 if (window.EC_WWW_CDN_PAY_ROOT) {
     window.globalArgsExtra.cdnRoot = window.EC_WWW_CDN_PAY_ROOT + '/en/' + window.globalArgsExtra.baseUrl
-}</script><script type="text/javascript">window.globalArgsExtra.version = '5728b56521';
+}</script><script type="text/javascript">window.globalArgsExtra.version = '7bbe88c914';
 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/en/editor.html b/examples/en/editor.html
index 6bde7a5..04f87b7 100644
--- a/examples/en/editor.html
+++ b/examples/en/editor.html
@@ -15,7 +15,7 @@
 </script><script type="text/javascript">window.globalArgsExtra = {
     page: 'editor',
     locale: 'en'
-};</script><script type="text/javascript">window.globalArgsExtra.version = '1624430965835';
+};</script><script type="text/javascript">window.globalArgsExtra.version = '1625800930981';
 window.globalArgsExtra.cdnRoot = EC_WWW_CDN_PAY_ROOT + '/examples';
 echartsExample.init('#ec-example-main', window.globalArgsExtra);</script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
 (function() {
diff --git a/examples/en/index.html b/examples/en/index.html
index 7effb09..1f15363 100644
--- a/examples/en/index.html
+++ b/examples/en/index.html
@@ -15,7 +15,7 @@
 </script><script type="text/javascript">window.globalArgsExtra = {
     page: 'explore',
     locale: 'en'
-};</script><script type="text/javascript">window.globalArgsExtra.version = '1624430965835';
+};</script><script type="text/javascript">window.globalArgsExtra.version = '1625800930981';
 window.globalArgsExtra.cdnRoot = EC_WWW_CDN_PAY_ROOT + '/examples';
 echartsExample.init('#ec-example-main', window.globalArgsExtra);</script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
 (function() {
diff --git a/examples/en/view.html b/examples/en/view.html
index 9baae31..8a384fe 100644
--- a/examples/en/view.html
+++ b/examples/en/view.html
@@ -14,7 +14,7 @@
 </script><script type="text/javascript">window.globalArgsExtra = {
     page: 'view',
     locale: 'en'
-};</script><script type="text/javascript">window.globalArgsExtra.version = '1624430965835';
+};</script><script type="text/javascript">window.globalArgsExtra.version = '1625800930981';
 window.globalArgsExtra.cdnRoot = EC_WWW_CDN_PAY_ROOT + '/examples';
 echartsExample.init('#ec-example-main', window.globalArgsExtra);
 
diff --git a/examples/zh/editor.html b/examples/zh/editor.html
index 49bc8ab..3c93c97 100644
--- a/examples/zh/editor.html
+++ b/examples/zh/editor.html
@@ -15,7 +15,7 @@
 </script><script type="text/javascript">window.globalArgsExtra = {
     page: 'editor',
     locale: 'zh'
-};</script><script type="text/javascript">window.globalArgsExtra.version = '1624430965835';
+};</script><script type="text/javascript">window.globalArgsExtra.version = '1625800930981';
 window.globalArgsExtra.cdnRoot = EC_WWW_CDN_PAY_ROOT + '/examples';
 echartsExample.init('#ec-example-main', window.globalArgsExtra);</script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
 (function() {
diff --git a/examples/zh/index.html b/examples/zh/index.html
index 300a46b..c9cb03d 100644
--- a/examples/zh/index.html
+++ b/examples/zh/index.html
@@ -15,7 +15,7 @@
 </script><script type="text/javascript">window.globalArgsExtra = {
     page: 'explore',
     locale: 'zh'
-};</script><script type="text/javascript">window.globalArgsExtra.version = '1624430965835';
+};</script><script type="text/javascript">window.globalArgsExtra.version = '1625800930981';
 window.globalArgsExtra.cdnRoot = EC_WWW_CDN_PAY_ROOT + '/examples';
 echartsExample.init('#ec-example-main', window.globalArgsExtra);</script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
 (function() {
diff --git a/examples/zh/view.html b/examples/zh/view.html
index 881829a..8d7f9ff 100644
--- a/examples/zh/view.html
+++ b/examples/zh/view.html
@@ -14,7 +14,7 @@
 </script><script type="text/javascript">window.globalArgsExtra = {
     page: 'view',
     locale: 'zh'
-};</script><script type="text/javascript">window.globalArgsExtra.version = '1624430965835';
+};</script><script type="text/javascript">window.globalArgsExtra.version = '1625800930981';
 window.globalArgsExtra.cdnRoot = EC_WWW_CDN_PAY_ROOT + '/examples';
 echartsExample.init('#ec-example-main', window.globalArgsExtra);
 
diff --git a/layouts/doc.html b/layouts/doc.html
index 0faf407..3389153 100644
--- a/layouts/doc.html
+++ b/layouts/doc.html
@@ -12,7 +12,7 @@
 }</style><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/element-ui@2.13.2/lib/theme-chalk/index.css"><link rel="stylesheet" href="https://echarts.apache.org/zh/css/doc-bundle.css?_v_=928953a425"><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.apache.org/zh/images/forie.png?_v_=20200710_1" 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 的官网 &nbsp;</p><a id="a1" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>访问官网</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><nav id="ec-doc-nav" class="navbar navbar-default navbar-fixed-top doc-nav"><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/zh/index.html" class="navbar-brand"><img src="https://echarts.apache.org/zh/images/logo.png?_v_=20200710_1" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/zh/index.html">首页</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">文档<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/feature.html">特性</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html">教程</a></li><li><a href="https://echarts.apache.org/zh/api.html">API</a></li><li><a href="https://echarts.apache.org/zh/option.html">配置项手册</a></li><li><a href="https://echarts.apache.org/zh/changelog.html">版本记录</a></li><li><a href="https://echarts.apache.org/zh/faq.html">常见问题</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html#ECharts%205%20升级指南">v5 升级指南<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">下载<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/download.html">下载</a></li><li><a href="https://echarts.apache.org/zh/download-theme.html">主题下载</a></li><li><a href="https://echarts.apache.org/zh/download-extension.html">扩展下载</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/zh/index.html">示例</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">资源<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/spreadsheet.html">表格工具</a></li><li><a href="https://echarts.apache.org/zh/theme-builder.html">主题构建工具</a></li><li><a href="https://echarts.apache.org/zh/cheat-sheet.html">术语速查手册</a></li><li><a href="https://echarts.apache.org/zh/resources.html">更多资源</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">社区<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/events.html">活动</a></li><li><a href="https://echarts.apache.org/zh/committers.html">贡献者列表</a></li><li><a href="https://echarts.apache.org/zh/maillist.html">邮件列表</a></li><li><a href="https://echarts.apache.org/zh/contributing.html">如何贡献</a></li><li><a href="https://echarts.apache.org/zh/dependencies.html">依赖项</a></li><li><a href="https://echarts.apache.org/zh/coding-standard.html">代码规范</a></li><li><a href="https://github.com/apache/echarts" target="_blank">源码(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/zh/security.html">安全</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">版权<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">活动<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">捐赠<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">鸣谢<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('en')">EN</a></li></ul></div></div></nav><div class="page-main"><div id="ec-doc-main"></div><div id="v4-link" class="alert alert-info alert-dismissible"><a href="https://echarts.apache.org/v4/zh/option.html">旧版本文档</a><button type="button" data-dismiss="alert" aria-label="Close" class="close"><span aria-hidden="true">&times;</span></button></div></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://echarts.apache.org/zh/js/common.js?_v_=b5b8944fb9"></script><script src="https://cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js"></script><script src="https://cdn.jsdelivr.net/npm/element-ui@2.13.2/lib/index.js"></script><script src="https://cdn.jsdelivr.net/npm/codemirror@5.56.0/lib/codemirror.min.js"></script><script src="https://cdn.jsdelivr.net/npm/codemirror@5.56.0/mode/javascript/javascript.js"></script><script src="https://cdn.jsdelivr.net/npm/js-beautify@1.11.0/js/lib/beautifier.min.js"></script><script src="https://echarts.apache.org/zh/js/doc-bundle.js?_v_=ce87205a10"></script><script type="text/javascript">document.getElementById('nav-doc').className = 'active';
 window.EC_WWW_CDN_PAY_ROOT = 'https://echarts.apache.org';
-</script><script type="text/javascript">window.globalArgsExtra.version = '5728b56521';
+</script><script type="text/javascript">window.globalArgsExtra.version = '7bbe88c914';
 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/layouts/example-simple.html b/layouts/example-simple.html
index 5b38f6d..30a85a3 100644
--- a/layouts/example-simple.html
+++ b/layouts/example-simple.html
@@ -11,7 +11,7 @@
     overflow-x: hidden;
 }</style><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/element-ui@2.13.2/lib/theme-chalk/index.css"><link rel="stylesheet" href="https://echarts.apache.org/examples/css/example-bundle.css?_v_=4e03a5649f"><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.apache.org/zh/images/forie.png?_v_=20200710_1" 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 的官网 &nbsp;</p><a id="a1" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>访问官网</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><div id="ec-example-main"></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://echarts.apache.org/zh/js/common.js?_v_=b5b8944fb9"></script><script src="https://cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js"></script><script src="https://cdn.jsdelivr.net/npm/element-ui@2.13.2/lib/index.js"></script><script src="https://echarts.apache.org/examples/js/example-bundle.js?_v_=3020d4307e"></script><script type="text/javascript">window.EC_WWW_CDN_PAY_ROOT = 'https://echarts.apache.org';
-</script><script type="text/javascript">window.globalArgsExtra.version = '1624430965835';
+</script><script type="text/javascript">window.globalArgsExtra.version = '1625800930981';
 window.globalArgsExtra.cdnRoot = EC_WWW_CDN_PAY_ROOT + '/examples';
 echartsExample.init('#ec-example-main', window.globalArgsExtra);
 
diff --git a/layouts/example.html b/layouts/example.html
index 98b9911..7a16ebe 100644
--- a/layouts/example.html
+++ b/layouts/example.html
@@ -12,7 +12,7 @@
 }</style><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/element-ui@2.13.2/lib/theme-chalk/index.css"><link rel="stylesheet" href="https://echarts.apache.org/examples/css/example-bundle.css?_v_=4e03a5649f"><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.apache.org/zh/images/forie.png?_v_=20200710_1" 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 的官网 &nbsp;</p><a id="a1" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>访问官网</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><nav id="ec-example-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/zh/index.html" class="navbar-brand"><img src="https://echarts.apache.org/zh/images/logo.png?_v_=20200710_1" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/zh/index.html">首页</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">文档<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/feature.html">特性</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html">教程</a></li><li><a href="https://echarts.apache.org/zh/api.html">API</a></li><li><a href="https://echarts.apache.org/zh/option.html">配置项手册</a></li><li><a href="https://echarts.apache.org/zh/changelog.html">版本记录</a></li><li><a href="https://echarts.apache.org/zh/faq.html">常见问题</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html#ECharts%205%20升级指南">v5 升级指南<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">下载<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/download.html">下载</a></li><li><a href="https://echarts.apache.org/zh/download-theme.html">主题下载</a></li><li><a href="https://echarts.apache.org/zh/download-extension.html">扩展下载</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/zh/index.html">示例</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">资源<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/spreadsheet.html">表格工具</a></li><li><a href="https://echarts.apache.org/zh/theme-builder.html">主题构建工具</a></li><li><a href="https://echarts.apache.org/zh/cheat-sheet.html">术语速查手册</a></li><li><a href="https://echarts.apache.org/zh/resources.html">更多资源</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">社区<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/events.html">活动</a></li><li><a href="https://echarts.apache.org/zh/committers.html">贡献者列表</a></li><li><a href="https://echarts.apache.org/zh/maillist.html">邮件列表</a></li><li><a href="https://echarts.apache.org/zh/contributing.html">如何贡献</a></li><li><a href="https://echarts.apache.org/zh/dependencies.html">依赖项</a></li><li><a href="https://echarts.apache.org/zh/coding-standard.html">代码规范</a></li><li><a href="https://github.com/apache/echarts" target="_blank">源码(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/zh/security.html">安全</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">版权<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">活动<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">捐赠<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">鸣谢<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('en')">EN</a></li></ul></div></div></nav><div class="page-main"><div id="ec-example-main"></div><div id="v4-link" class="alert alert-info alert-dismissible"><a href="https://echarts.apache.org/v4/examples/">旧版本示例</a><button type="button" data-dismiss="alert" aria-label="Close" class="close"><span aria-hidden="true">&times;</span></button></div></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://echarts.apache.org/zh/js/common.js?_v_=b5b8944fb9"></script><script src="https://cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js"></script><script src="https://cdn.jsdelivr.net/npm/element-ui@2.13.2/lib/index.js"></script><script src="https://echarts.apache.org/examples/js/example-bundle.js?_v_=3020d4307e"></script><script type="text/javascript">document.getElementById('nav-examples').className = 'active';
 window.EC_WWW_CDN_PAY_ROOT = 'https://echarts.apache.org';
-</script><script type="text/javascript">window.globalArgsExtra.version = '1624430965835';
+</script><script type="text/javascript">window.globalArgsExtra.version = '1625800930981';
 window.globalArgsExtra.cdnRoot = EC_WWW_CDN_PAY_ROOT + '/examples';
 echartsExample.init('#ec-example-main', window.globalArgsExtra);</script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
 (function() {
diff --git a/zh/api.html b/zh/api.html
index d3fb9bc..14989ed 100644
--- a/zh/api.html
+++ b/zh/api.html
@@ -19,7 +19,7 @@
 };
 if (window.EC_WWW_CDN_PAY_ROOT) {
     window.globalArgsExtra.cdnRoot = window.EC_WWW_CDN_PAY_ROOT + '/zh/' + window.globalArgsExtra.baseUrl
-}</script><script type="text/javascript">window.globalArgsExtra.version = 'afc0a98992';
+}</script><script type="text/javascript">window.globalArgsExtra.version = '03f79426a6';
 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/zh/builder/echarts.html b/zh/builder/echarts.html
index 93209ea..75aa6ed 100644
--- a/zh/builder/echarts.html
+++ b/zh/builder/echarts.html
@@ -54,7 +54,7 @@
                 'rollup': 'lib/rollup.browser',
                 'transformDev': 'lib/transform-dev-bundle'
             },
-            urlArgs: 'v=1624430965835'
+            urlArgs: 'v=1625800930981'
         });
 
         require(['build']);
diff --git a/zh/committers.html b/zh/committers.html
index ee45525..76f5a34 100644
--- a/zh/committers.html
+++ b/zh/committers.html
@@ -7,7 +7,7 @@
     document.head.insertBefore(el, document.getElementById('font-hack'));
 }
 </script><title>Committers - Apache ECharts</title></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://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/forie.png?_v_=20200710_1" 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 的官网 &nbsp;</p><a id="a1" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>访问官网</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><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/zh/index.html" class="navbar-brand"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/logo.png?_v_=20200710_1" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/zh/index.html">首页</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">文档<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/feature.html">特性</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html">教程</a></li><li><a href="https://echarts.apache.org/zh/api.html">API</a></li><li><a href="https://echarts.apache.org/zh/option.html">配置项手册</a></li><li><a href="https://echarts.apache.org/zh/changelog.html">版本记录</a></li><li><a href="https://echarts.apache.org/zh/faq.html">常见问题</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html#ECharts%205%20升级指南">v5 升级指南<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">下载<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/download.html">下载</a></li><li><a href="https://echarts.apache.org/zh/download-theme.html">主题下载</a></li><li><a href="https://echarts.apache.org/zh/download-extension.html">扩展下载</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/zh/index.html">示例</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">资源<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/spreadsheet.html">表格工具</a></li><li><a href="https://echarts.apache.org/zh/theme-builder.html">主题构建工具</a></li><li><a href="https://echarts.apache.org/zh/cheat-sheet.html">术语速查手册</a></li><li><a href="https://echarts.apache.org/zh/resources.html">更多资源</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">社区<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/events.html">活动</a></li><li><a href="https://echarts.apache.org/zh/committers.html">贡献者列表</a></li><li><a href="https://echarts.apache.org/zh/maillist.html">邮件列表</a></li><li><a href="https://echarts.apache.org/zh/contributing.html">如何贡献</a></li><li><a href="https://echarts.apache.org/zh/dependencies.html">依赖项</a></li><li><a href="https://echarts.apache.org/zh/coding-standard.html">代码规范</a></li><li><a href="https://github.com/apache/echarts" target="_blank">源码(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/zh/security.html">安全</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">版权<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">活动<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">捐赠<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">鸣谢<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('en')">EN</a></li></ul></div></div></nav><div class="page-main"><div class="page-info"><h1>贡献者列表</h1><p>ECharts 的发展离不开其背后很多人的卓越贡献,他们有着不同的技能,甚至来自不同的岗位和公司</p><p>感谢每一个人的帮助与支持,更希望以后能有更多的人助力 ECharts 的成长</p><p class="page-info-echarts">Apache ECharts<sup>TM</sup></p></div><div id="about-page"><section class="container contributor"><h4 class="group pmc">PMC</h4><div class="row"><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/pissang" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/沈毅.jpg?_v_=20200710_1"></a><h5 class="about-name">沈毅</h5><div class="about-desc">百度</div><div class="about-desc">中国 · 上海</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/100pah" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/宿爽.jpg?_v_=20200710_1"></a><h5 class="about-name">宿爽</h5><div class="about-desc">百度</div><div class="about-desc">中国 · 北京</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/Ovilia" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/羡辙.jpg?_v_=20200710_1"></a><h5 class="about-name">羡辙</h5><div class="about-desc">百度</div><div class="about-desc">中国 · 上海</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://www.behance.net/wjtjiayouac8aa" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/王俊婷.jpg"></a><h5 class="about-name">王俊婷</h5><div class="about-desc">百度</div><div class="about-desc">中国 · 上海</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/plainheart" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/plainheart.jpg?_v_=20200710_1"></a><h5 class="about-name">王忠祥</h5><div class="about-desc">中国 · 河南</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/susiwen8" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/苏思文.jpg?_v_=20200710_1"></a><h5 class="about-name">苏思文</h5><div class="about-desc">蚂蚁集团</div><div class="about-desc">中国 · 杭州</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/wf123537200" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/zakwu.jpg?_v_=20200710_1"></a><h5 class="about-name">巫枫</h5><div class="about-desc">腾讯</div><div class="about-desc">中国 · 深圳</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/kener" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/林峰.jpg?_v_=20200710_1"></a><h5 class="about-name">林峰</h5><div class="about-desc">阿里巴巴</div><div class="about-desc">中国 · 杭州</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/deqingli" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/德清.jpg?_v_=20200710_1"></a><h5 class="about-name">德清</h5><div class="about-desc">阿里巴巴</div><div class="about-desc">中国 · 杭州</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/dave.jpg?_v_=20200710_1"><h5 class="about-name">Dave Fisher</h5><div class="about-desc">美国 · 旧金山</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/kevin.jpg?_v_=20200710_1"><h5 class="about-name">Kevin A. McGrail</h5><div class="about-desc">美国 · 华盛顿</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/shengwu.jpg?_v_=20200710_1"><h5 class="about-name">吴晟</h5><div class="about-desc">中国 · 北京</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/erik168" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/erik.jpg?_v_=20200710_1"></a><h5 class="about-name">董睿</h5><div class="about-desc">百度</div><div class="about-desc">中国 · 北京</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/chriswong" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/大佛.jpg?_v_=20200710_1"></a><h5 class="about-name">黄后锦</h5><div class="about-desc">跟谁学</div><div class="about-desc">中国 · 北京</div></div></div></div><h4 class="group committer">Committers</h4><div class="row"><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/yufeng04" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/禹峰.jpg?_v_=20200710_1"></a><h5 class="about-name">禹峰</h5><div class="about-desc">百度</div><div class="about-desc">中国 · 上海</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/cuijian-dexter" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/崔健.jpg?_v_=20200710_1"></a><h5 class="about-name">崔健</h5><div class="about-desc">百度</div><div class="about-desc">中国 · 北京</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/quillblue" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/qiansheng.jpg?_v_=20200710_1"></a><h5 class="about-name">钱晟</h5><div class="about-desc">陶氏化学</div><div class="about-desc">中国 · 上海</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/chfw" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/chfw.jpg?_v_=20200710_1"></a><h5 class="about-name">chfw</h5><div class="about-desc">英国</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/alex2wong" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/黄益修.jpg?_v_=20200710_1"></a><h5 class="about-name">黄益修</h5><div class="about-desc">字节跳动</div><div class="about-desc">中国 · 上海</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/SnailSword" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/韩天.jpg?_v_=20200710_1"></a><h5 class="about-name">韩天</h5><div class="about-desc">Merico</div><div class="about-desc">中国 · 北京</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/ClemMakesApps" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/clement.jpg?_v_=20200710_1"></a><h5 class="about-name">Clement Ho</h5><div class="about-desc">MURAL</div><div class="about-desc">美国 · 得克萨斯州</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/tedliu.jpg?_v_=20200710_1"><h5 class="about-name">Ted Liu</h5><div class="about-desc">中国 · 北京</div></div></div></div><h4 class="group contributor">Contributors</h4><div class="row"><p></p><p>在 <a href="https://github.com/apache/echarts/graphs/contributors">ECharts 贡献者列表</a>中,记录了更多为 ECharts 做出过贡献的人 。</p><p>感谢所有贡献者,一起助力 ECharts 更好地成长。</p></div></section></div><footer><div class="container"><div class="row"><div class="col-md-9"><p>Copyright © 2017-2021, The Apache Software Foundation Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.</p><div class="icon-panel"><a href="mailto:dev@echarts.apache.org?body=%28Thanks%20for%20using%20ECharts.%20Email%20us%20if%20you%20have%20non-technical%20problems%20using%20ECharts.%20For%20technical%20support%2C%20please%20go%20to%20https%3A//github.com/apache/echarts/issues%20.%29" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-email.png?_v_=20200710_1"></a><a href="https://twitter.com/ApacheECharts" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-twitter.png?_v_=20200710_1"></a><a href="https://weibo.com/echarts" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-weibo.png?_v_=20200710_1"></a><a href="https://github.com/apache/echarts" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-github.png?_v_=20200710_1"></a></div></div><div id="footer-icon-panel" class="col-md-3"><a href="https://www.apache.org"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/asf_logo.svg?_v_=20200710_1" class="footer-apache-logo"></a></div></div></div></footer></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/js/common.js?_v_=b5b8944fb9"></script><script type="text/javascript">document.getElementById('nav-contribute').className = 'active';
+<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>请访问 Apache ECharts 的官网 &nbsp;</p><a id="a1" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>访问官网</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><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/zh/index.html" class="navbar-brand"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/logo.png?_v_=20200710_1" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/zh/index.html">首页</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">文档<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/feature.html">特性</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html">教程</a></li><li><a href="https://echarts.apache.org/zh/api.html">API</a></li><li><a href="https://echarts.apache.org/zh/option.html">配置项手册</a></li><li><a href="https://echarts.apache.org/zh/changelog.html">版本记录</a></li><li><a href="https://echarts.apache.org/zh/faq.html">常见问题</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html#ECharts%205%20升级指南">v5 升级指南<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">下载<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/download.html">下载</a></li><li><a href="https://echarts.apache.org/zh/download-theme.html">主题下载</a></li><li><a href="https://echarts.apache.org/zh/download-extension.html">扩展下载</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/zh/index.html">示例</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">资源<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/spreadsheet.html">表格工具</a></li><li><a href="https://echarts.apache.org/zh/theme-builder.html">主题构建工具</a></li><li><a href="https://echarts.apache.org/zh/cheat-sheet.html">术语速查手册</a></li><li><a href="https://echarts.apache.org/zh/resources.html">更多资源</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">社区<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/events.html">活动</a></li><li><a href="https://echarts.apache.org/zh/committers.html">贡献者列表</a></li><li><a href="https://echarts.apache.org/zh/maillist.html">邮件列表</a></li><li><a href="https://echarts.apache.org/zh/contributing.html">如何贡献</a></li><li><a href="https://echarts.apache.org/zh/dependencies.html">依赖项</a></li><li><a href="https://echarts.apache.org/zh/coding-standard.html">代码规范</a></li><li><a href="https://github.com/apache/echarts" target="_blank">源码(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/zh/security.html">安全</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">版权<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">活动<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">捐赠<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">鸣谢<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('en')">EN</a></li></ul></div></div></nav><div class="page-main"><div class="page-info"><h1>贡献者列表</h1><p>ECharts 的发展离不开其背后很多人的卓越贡献,他们有着不同的技能,甚至来自不同的岗位和公司</p><p>感谢每一个人的帮助与支持,更希望以后能有更多的人助力 ECharts 的成长</p><p class="page-info-echarts">Apache ECharts<sup>TM</sup></p></div><div id="about-page"><section class="container contributor"><h4 class="group pmc">PMC</h4><div class="row"><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/pissang" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/沈毅.jpg?_v_=20200710_1"></a><h5 class="about-name">沈毅</h5><div class="about-desc">百度</div><div class="about-desc">中国 · 上海</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/100pah" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/宿爽.jpg?_v_=20200710_1"></a><h5 class="about-name">宿爽</h5><div class="about-desc">百度</div><div class="about-desc">中国 · 北京</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/Ovilia" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/羡辙.jpg?_v_=20200710_1"></a><h5 class="about-name">羡辙</h5><div class="about-desc">百度</div><div class="about-desc">中国 · 上海</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://www.behance.net/wjtjiayouac8aa" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/王俊婷.jpg"></a><h5 class="about-name">王俊婷</h5><div class="about-desc">百度</div><div class="about-desc">中国 · 上海</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/plainheart" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/plainheart.jpg?_v_=20200710_1"></a><h5 class="about-name">王忠祥</h5><div class="about-desc">中国 · 河南</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/susiwen8" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/苏思文.jpg?_v_=20200710_1"></a><h5 class="about-name">苏思文</h5><div class="about-desc">蚂蚁集团</div><div class="about-desc">中国 · 杭州</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/wf123537200" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/zakwu.jpg?_v_=20200710_1"></a><h5 class="about-name">巫枫</h5><div class="about-desc">腾讯</div><div class="about-desc">中国 · 深圳</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/kener" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/林峰.jpg?_v_=20200710_1"></a><h5 class="about-name">林峰</h5><div class="about-desc">阿里巴巴</div><div class="about-desc">中国 · 杭州</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/deqingli" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/德清.jpg?_v_=20200710_1"></a><h5 class="about-name">德清</h5><div class="about-desc">阿里巴巴</div><div class="about-desc">中国 · 杭州</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/dave.jpg?_v_=20200710_1"><h5 class="about-name">Dave Fisher</h5><div class="about-desc">美国 · 旧金山</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/kevin.jpg?_v_=20200710_1"><h5 class="about-name">Kevin A. McGrail</h5><div class="about-desc">美国 · 华盛顿</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/shengwu.jpg?_v_=20200710_1"><h5 class="about-name">吴晟</h5><div class="about-desc">中国 · 北京</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/erik168" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/erik.jpg?_v_=20200710_1"></a><h5 class="about-name">董睿</h5><div class="about-desc">百度</div><div class="about-desc">中国 · 北京</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/chriswong" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/大佛.jpg?_v_=20200710_1"></a><h5 class="about-name">黄后锦</h5><div class="about-desc">跟谁学</div><div class="about-desc">中国 · 北京</div></div></div></div><h4 class="group committer">Committers</h4><div class="row"><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/yufeng04" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/禹峰.jpg?_v_=20200710_1"></a><h5 class="about-name">禹峰</h5><div class="about-desc">百度</div><div class="about-desc">中国 · 上海</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/cuijian-dexter" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/崔健.jpg?_v_=20200710_1"></a><h5 class="about-name">崔健</h5><div class="about-desc">百度</div><div class="about-desc">中国 · 北京</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/quillblue" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/qiansheng.jpg?_v_=20200710_1"></a><h5 class="about-name">钱晟</h5><div class="about-desc">陶氏化学</div><div class="about-desc">中国 · 上海</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/chfw" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/chfw.jpg?_v_=20200710_1"></a><h5 class="about-name">chfw</h5><div class="about-desc">英国</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/alex2wong" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/黄益修.jpg?_v_=20200710_1"></a><h5 class="about-name">黄益修</h5><div class="about-desc">字节跳动</div><div class="about-desc">中国 · 上海</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/SnailSword" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/韩天.jpg?_v_=20200710_1"></a><h5 class="about-name">韩天</h5><div class="about-desc">Merico</div><div class="about-desc">中国 · 北京</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/nick.jpg?_v_=20200710_1"><h5 class="about-name">何亚雄</h5><div class="about-desc">中国 · 深圳</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><a href="https://github.com/ClemMakesApps" target="_blank"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/clement.jpg?_v_=20200710_1"></a><h5 class="about-name">Clement Ho</h5><div class="about-desc">MURAL</div><div class="about-desc">美国 · 得克萨斯州</div></div></div><div class="col-md-3 col-sm-4 col-xs-6"><div class="about-person"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/people/tedliu.jpg?_v_=20200710_1"><h5 class="about-name">Ted Liu</h5><div class="about-desc">中国 · 北京</div></div></div></div><h4 class="group contributor">Contributors</h4><div class="row"><p></p><p>在 <a href="https://github.com/apache/echarts/graphs/contributors">ECharts 贡献者列表</a>中,记录了更多为 ECharts 做出过贡献的人 。</p><p>感谢所有贡献者,一起助力 ECharts 更好地成长。</p></div></section></div><footer><div class="container"><div class="row"><div class="col-md-9"><p>Copyright © 2017-2021, The Apache Software Foundation Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.</p><div class="icon-panel"><a href="mailto:dev@echarts.apache.org?body=%28Thanks%20for%20using%20ECharts.%20Email%20us%20if%20you%20have%20non-technical%20problems%20using%20ECharts.%20For%20technical%20support%2C%20please%20go%20to%20https%3A//github.com/apache/echarts/issues%20.%29" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-email.png?_v_=20200710_1"></a><a href="https://twitter.com/ApacheECharts" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-twitter.png?_v_=20200710_1"></a><a href="https://weibo.com/echarts" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-weibo.png?_v_=20200710_1"></a><a href="https://github.com/apache/echarts" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-github.png?_v_=20200710_1"></a></div></div><div id="footer-icon-panel" class="col-md-3"><a href="https://www.apache.org"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/asf_logo.svg?_v_=20200710_1" class="footer-apache-logo"></a></div></div></div></footer></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/js/common.js?_v_=b5b8944fb9"></script><script type="text/javascript">document.getElementById('nav-contribute').className = 'active';
 
 var recommendId = 3;
 setInterval(function () {
diff --git a/zh/css/only_for_cdn_ready_check.css b/zh/css/only_for_cdn_ready_check.css
index 7dbbafd..ce0836f 100644
--- a/zh/css/only_for_cdn_ready_check.css
+++ b/zh/css/only_for_cdn_ready_check.css
@@ -1 +1 @@
-/* 1624430965835 OK */
\ No newline at end of file
+/* 1625800930981 OK */
\ No newline at end of file
diff --git a/zh/documents/tutorial-parts/tutorial.js b/zh/documents/tutorial-parts/tutorial.js
index 093fdb8..99180d2 100644
--- a/zh/documents/tutorial-parts/tutorial.js
+++ b/zh/documents/tutorial-parts/tutorial.js
@@ -60,7 +60,7 @@
     "desc": "<p>在许多地方(如图、轴的标签等)都可以使用富文本标签。例如:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=pie-rich-text&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=treemap-obama&edit=1&reset=1\" width=\"800\" height=\"550\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=bar-rich-text&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<p><br></p>\n<p>其他一些例子:\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=map-labels&amp;edit=1&amp;reset=1\" target=\"_blank\">Map Labels</a>,\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=pie-nest&amp;edit=1&amp;reset=1\" target=\"_blank\">Pie Labels</a>,\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=gauge-car&amp;edit=1&amp;reset=1\" target=\"_blank\">Gauge</a>.</p>\n<p><br></p>\n<p>原先 Apache ECharts<sup>TM</sup> 中的文本标签,只能对整块统一进行样式设置,并且仅仅支持颜色和字体的设置,从而导致不易于制作表达能力更强的文字描述信息。</p>\n<p>echarts v3.7 以后,支持了富文本标签,能够:</p>\n<ul>\n<li>定制文本块整体的样式(如背景、边框、阴影等)、位置、旋转等。</li>\n<li>对文本块中个别片段定义样式(如颜色、字体、高宽、背景、阴影等)、对齐方式等。</li>\n<li>在文本中使用图片做小图标或者背景。</li>\n<li>特定组合以上的规则,可以做出简单表格、分割线等效果。</li>\n</ul>\n<p>开始下面的介绍之前,先说明一下下面会使用的两个名词的含义:</p>\n<ul>\n<li>文本块(Text Block):文本标签块整体。</li>\n<li>文本片段(Text fragment):文本标签块中的部分文本。</li>\n</ul>\n<p>如下图示例:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/text-block-fragment&edit=1&reset=1\" width=\"340\" height=\"240\" ></iframe>\n\n\n\n<h2 id=\"-\">文本样式相关的配置项</h2>\n<p>echarts 提供了丰富的文本标签配置项,包括:</p>\n<ul>\n<li>字体基本样式设置:<code class=\"codespan\">fontStyle</code>、<code class=\"codespan\">fontWeight</code>、<code class=\"codespan\">fontSize</code>、<code class=\"codespan\">fontFamily</code>。</li>\n<li>文字颜色:<code class=\"codespan\">color</code>。</li>\n<li>文字描边:<code class=\"codespan\">textBorderColor</code>、<code class=\"codespan\">textBorderWidth</code>。</li>\n<li>文字阴影:<code class=\"codespan\">textShadowColor</code>、<code class=\"codespan\">textShadowBlur</code>、<code class=\"codespan\">textShadowOffsetX</code>、<code class=\"codespan\">textShadowOffsetY</code>。</li>\n<li>文本块或文本片段大小:<code class=\"codespan\">lineHeight</code>、<code class=\"codespan\">width</code>、<code class=\"codespan\">height</code>、<code class=\"codespan\">padding</code>。</li>\n<li>文本块或文本片段的对齐:<code class=\"codespan\">align</code>、<code class=\"codespan\">verticalAlign</code>。</li>\n<li>文本块或文本片段的边框、背景(颜色或图片):<code class=\"codespan\">backgroundColor</code>、<code class=\"codespan\">borderColor</code>、<code class=\"codespan\">borderWidth</code>、<code class=\"codespan\">borderRadius</code>。</li>\n<li>文本块或文本片段的阴影:<code class=\"codespan\">shadowColor</code>、<code class=\"codespan\">shadowBlur</code>、<code class=\"codespan\">shadowOffsetX</code>、<code class=\"codespan\">shadowOffsetY</code>。</li>\n<li>文本块的位置和旋转:<code class=\"codespan\">position</code>、<code class=\"codespan\">distance</code>、<code class=\"codespan\">rotate</code>。</li>\n</ul>\n<p>可以在各处的 <code class=\"codespan\">rich</code> 属性中定义文本片段样式。例如 <a href=\"option.html#series-bar.label.rich\" target=\"_blank\">series-bar.label.rich</a></p>\n<p>例如:</p>\n<pre><code class=\"lang-js\">label: {\n    // 在文本中,可以对部分文本采用 rich 中定义样式。\n    // 这里需要在文本中使用标记符号:\n    // `{styleName|text content text content}` 标记样式名。\n    // 注意,换行仍是使用 &#39;\\n&#39;。\n    formatter: [\n        &#39;{a|这段文本采用样式a}&#39;,\n        &#39;{b|这段文本采用样式b}这段用默认样式{x|这段用样式x}&#39;\n    ].join(&#39;\\n&#39;),\n\n    // 这里是文本块的样式设置:\n    color: &#39;#333&#39;,\n    fontSize: 5,\n    fontFamily: &#39;Arial&#39;,\n    borderWidth: 3,\n    backgroundColor: &#39;#984455&#39;,\n    padding: [3, 10, 10, 5],\n    lineHeight: 20,\n\n    // rich 里是文本片段的样式设置:\n    rich: {\n        a: {\n            color: &#39;red&#39;,\n            lineHeight: 10\n        },\n        b: {\n            backgroundColor: {\n                image: &#39;xxx/xxx.jpg&#39;\n            },\n            height: 40\n        },\n        x: {\n            fontSize: 18,\n            fontFamily: &#39;Microsoft YaHei&#39;,\n            borderColor: &#39;#449933&#39;,\n            borderRadius: 4\n        },\n        ...\n    }\n}\n</code></pre>\n<blockquote>\n<p>注意:如果不定义 <code class=\"codespan\">rich</code>,不能指定文字块的 <code class=\"codespan\">width</code> 和 <code class=\"codespan\">height</code>。</p>\n</blockquote>\n<h2 id=\"-\">文本、文本框、文本片段的基本样式和装饰</h2>\n<p>每个文本可以设置基本的字体样式:<code class=\"codespan\">fontStyle</code>、<code class=\"codespan\">fontWeight</code>、<code class=\"codespan\">fontSize</code>、<code class=\"codespan\">fontFamily</code>。</p>\n<p>可以设置文字的颜色 <code class=\"codespan\">color</code> 和边框的颜色 <code class=\"codespan\">textBorderColor</code>、<code class=\"codespan\">textBorderWidth</code>。</p>\n<p>文本框可以设置边框和背景的样式:<code class=\"codespan\">borderColor</code>、<code class=\"codespan\">borderWidth</code>、<code class=\"codespan\">backgroundColor</code>、<code class=\"codespan\">padding</code>。</p>\n<p>文本片段也可以设置边框和背景的样式:<code class=\"codespan\">borderColor</code>、<code class=\"codespan\">borderWidth</code>、<code class=\"codespan\">backgroundColor</code>、<code class=\"codespan\">padding</code>。</p>\n<p>例如:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/text-options&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n\n<h2 id=\"-\">标签的位置</h2>\n<p>对于折线图、柱状图、散点图等,均可以使用 <code class=\"codespan\">label</code> 来设置标签。标签的相对于图形元素的位置,一般使用 <a href=\"option.html#series-scatter.label.position\" target=\"_blank\">label.position</a>、<a href=\"option.html#series-scatter.label.distance\" target=\"_blank\">label.distance</a> 来配置。</p>\n<p>例如:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/label-position&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<blockquote>\n<p>注意:<code class=\"codespan\">position</code> 在不同的图中可取值有所不同。<code class=\"codespan\">distance</code> 并不是在每个图中都支持。详情请参见 <a href=\"option.html\" target=\"_blank\">option 文档</a>。</p>\n</blockquote>\n<h2 id=\"-\">标签的旋转</h2>\n<p>某些图中,为了能有足够长的空间来显示标签,需要对标签进行旋转。例如:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=bar-label-rotation&edit=1&reset=1\" width=\"900\" height=\"500\" ></iframe>\n\n\n<p>这种场景下,可以结合 <a href=\"option.html#series-bar.label.align\" target=\"_blank\">align</a> 和 <a href=\"option.html#series-bar.label.verticalAlign\" target=\"_blank\">verticalAlign</a> 来调整标签位置。</p>\n<p>注意,逻辑是,先使用 <code class=\"codespan\">align</code> 和 <code class=\"codespan\">verticalAlign</code> 定位,再旋转。</p>\n<h2 id=\"-\">文本片段的排版和对齐</h2>\n<p>关于排版方式,每个文本片段,可以想象成 CSS 中的 <code class=\"codespan\">inline-block</code>,在文档流中按行放置。</p>\n<p>每个文本片段的内容盒尺寸(<code class=\"codespan\">content box size</code>),默认是根据文字大小决定的。但是,也可以设置 <code class=\"codespan\">width</code>、<code class=\"codespan\">height</code> 来强制指定,虽然一般不会这么做(参见下文)。文本片段的边框盒尺寸(<code class=\"codespan\">border box size</code>),由上述本身尺寸,加上文本片段的 <code class=\"codespan\">padding</code> 来得到。</p>\n<p>只有 <code class=\"codespan\">&#39;\\n&#39;</code> 是换行符,能导致换行。</p>\n<p>一行内,会有多个文本片段。每行的实际高度,由 <code class=\"codespan\">lineHeight</code> 最大的文本片段决定。文本片段的 <code class=\"codespan\">lineHeight</code> 可直接在 <code class=\"codespan\">rich</code> 中指定,也可以在 <code class=\"codespan\">rich</code> 的父层级中统一指定而采用到 <code class=\"codespan\">rich</code> 的所有项中,如果都不指定,则取文本片段的边框盒尺寸(<code class=\"codespan\">border box size</code>)。</p>\n<p>在一行的 <code class=\"codespan\">lineHeight</code> 被决定后,一行内,文本片段的竖直位置,由文本片段的 <code class=\"codespan\">verticalAlign</code> 来指定(这里和 CSS 中的规则稍有不同):</p>\n<ul>\n<li><code class=\"codespan\">&#39;bottom&#39;</code>:文本片段的盒的底边贴住行底。</li>\n<li><code class=\"codespan\">&#39;top&#39;</code>:文本片段的盒的顶边贴住行顶。</li>\n<li><code class=\"codespan\">&#39;middle&#39;</code>:居行中。</li>\n</ul>\n<p>文本块的宽度,可以直接由文本块的 <code class=\"codespan\">width</code> 指定,否则,由最长的行决定。宽度决定后,在一行中进行文本片段的放置。文本片段的 <code class=\"codespan\">align</code> 决定了文本片段在行中的水平位置:</p>\n<ul>\n<li>首先,从左向右连续紧靠放置 <code class=\"codespan\">align</code> 为 <code class=\"codespan\">&#39;left&#39;</code> 的文本片段盒。</li>\n<li>然后,从右向左连续紧靠放置 <code class=\"codespan\">align</code> 为 <code class=\"codespan\">&#39;right&#39;</code> 的文本片段盒。</li>\n<li>最后,剩余的没处理的文本片段盒,紧贴着,在中间剩余的区域中居中放置。</li>\n</ul>\n<p>关于文字在文本片段盒中的位置:</p>\n<ul>\n<li>如果 <code class=\"codespan\">align</code> 为 <code class=\"codespan\">&#39;center&#39;</code>,则文字在文本片段盒中是居中的。</li>\n<li>如果 <code class=\"codespan\">align</code> 为 <code class=\"codespan\">&#39;left&#39;</code>,则文字在文本片段盒中是居左的。</li>\n<li>如果 <code class=\"codespan\">align</code> 为 <code class=\"codespan\">&#39;right&#39;</code>,则文字在文本片段盒中是居右的。</li>\n</ul>\n<p>例如:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/text-fragment-align&edit=1&reset=1\" width=\"800\" height=\"220\" ></iframe>\n\n\n\n<h2 id=\"-\">特殊效果:图标、分割线、标题块、简单表格</h2>\n<p>看下面的例子:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/title-block&edit=1&reset=1\" width=\"600\" height=\"400\" ></iframe>\n\n\n<p>文本片段的 <code class=\"codespan\">backgroundColor</code> 可以指定为图片后,就可以在文本中使用图标了:</p>\n<pre><code class=\"lang-js\">rich: {\n    Sunny: {\n        // 这样设定 backgroundColor 就可以是图片了。\n        backgroundColor: {\n            image: &#39;./data/asset/img/weather/sunny_128.png&#39;\n        },\n        // 可以只指定图片的高度,从而图片的宽度根据图片的长宽比自动得到。\n        height: 30\n    }\n}\n</code></pre>\n<p>分割线实际是用 border 实现的:</p>\n<pre><code class=\"lang-js\">rich: {\n    hr: {\n        borderColor: &#39;#777&#39;,\n        // 这里把 width 设置为 &#39;100%&#39;,表示分割线的长度充满文本块。\n        // 注意,这里是文本块内容盒(content box)的 100%,而不包含 padding。\n        // 虽然这和 CSS 相关的定义有所不同,但是在这类场景中更加方便。\n        width: &#39;100%&#39;,\n        borderWidth: 0.5,\n        height: 0\n    }\n}\n</code></pre>\n<p>标题块是使用 <code class=\"codespan\">backgroundColor</code> 实现的:</p>\n<pre><code class=\"lang-js\">// 标题文字居左\nformatter: &#39;{titleBg|Left Title}&#39;,\nrich: {\n    titleBg: {\n        backgroundColor: &#39;#000&#39;,\n        height: 30,\n        borderRadius: [5, 5, 0, 0],\n        padding: [0, 10, 0, 10],\n        width: &#39;100%&#39;,\n        color: &#39;#eee&#39;\n    }\n}\n\n// 标题文字居中。\n// 这个实现有些 tricky,但是,能够不引入更复杂的排版规则而实现这个效果。\nformatter: &#39;{tc|Center Title}{titleBg|}&#39;,\nrich: {\n    titleBg: {\n        align: &#39;right&#39;,\n        backgroundColor: &#39;#000&#39;,\n        height: 30,\n        borderRadius: [5, 5, 0, 0],\n        padding: [0, 10, 0, 10],\n        width: &#39;100%&#39;,\n        color: &#39;#eee&#39;\n    }\n}\n</code></pre>\n<p>简单表格的设定,其实就是给不同行上纵向对应的文本片段设定同样的宽度就可以了。参见本文最开始的 <a href=\"https://echarts.apache.org/examples/zh/view.html?c=pie-rich-text&amp;edit=1&amp;reset=1\" target=\"_blank\">例子</a>。</p>\n"
   },
   "服务端渲染": {
-    "desc": "<p>Apache ECharts<sup>TM</sup> 可以在服务端进行渲染。例如 <a href=\"https://echarts.apache.org/examples/zh/index.html\" target=\"_blank\">官方示例</a> 里的一个个小截图,就是在服务端预生成出来的。</p>\n<p>服务端渲染可以使用流行的 headless 环境,例如 <a href=\"https://github.com/GoogleChrome/puppeteer\" target=\"_blank\">puppeteer</a>、<a href=\"https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md\" target=\"_blank\">headless chrome</a>、<a href=\"https://github.com/Automattic/node-canvas\" target=\"_blank\">node-canvas</a>、<a href=\"https://github.com/jsdom/jsdom\" target=\"_blank\">jsdom</a>、<a href=\"http://phantomjs.org/\" target=\"_blank\">PhantomJS</a> 等。</p>\n<p>这是一些社区贡献的 echarts 服务端渲染方案:</p>\n<ul>\n<li><a href=\"https://github.com/hellosean1025/node-echarts\" target=\"_blank\">https://github.com/hellosean1025/node-echarts</a></li>\n<li><a href=\"https://github.com/chfw/echarts-scrappeteer\" target=\"_blank\">https://github.com/chfw/echarts-scrappeteer</a></li>\n<li><a href=\"https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js\" target=\"_blank\">https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js</a></li>\n<li><a href=\"https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73\" target=\"_blank\">https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73</a></li>\n</ul>\n"
+    "desc": "<p>Apache ECharts<sup>TM</sup> 可以在服务端进行渲染。例如 <a href=\"https://echarts.apache.org/examples/zh/index.html\" target=\"_blank\">官方示例</a> 里的一个个小截图,就是在服务端预生成出来的。</p>\n<p>服务端渲染可以使用流行的 headless 环境,例如 <a href=\"https://github.com/GoogleChrome/puppeteer\" target=\"_blank\">puppeteer</a>、<a href=\"https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md\" target=\"_blank\">headless chrome</a>、<a href=\"https://github.com/Automattic/node-canvas\" target=\"_blank\">node-canvas</a>、<a href=\"https://github.com/jsdom/jsdom\" target=\"_blank\">jsdom</a>、<a href=\"http://phantomjs.org/\" target=\"_blank\">PhantomJS</a> 等。</p>\n<p>这是一些社区贡献的 echarts 服务端渲染方案:</p>\n<ul>\n<li><a href=\"https://github.com/hellosean1025/node-echarts\" target=\"_blank\">https://github.com/hellosean1025/node-echarts</a></li>\n<li><a href=\"https://github.com/chfw/echarts-scrappeteer\" target=\"_blank\">https://github.com/chfw/echarts-scrappeteer</a></li>\n<li><a href=\"https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js\" target=\"_blank\">https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js</a></li>\n<li><a href=\"https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73\" target=\"_blank\">https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73</a></li>\n</ul>\n<p>注意:如果发现 server 端渲染结果和浏览器渲染结果不一致,请将 <a href=\"option.html#animation\" target=\"_blank\">animation</a> 设置为 <code class=\"codespan\">false</code> 再尝试一下。</p>\n"
   },
   "使用 Canvas 或者 SVG 渲染": {
     "desc": "<p>浏览器端图表库大多会选择 SVG 或者 Canvas 进行渲染。对于绘制图表来说,这两种技术往往是可替换的,效果相近。但是在一些场景中,他们的表现和能力又有一定差异。于是,对它们的选择取舍,就成为了一个一直存在的不易有标准答案的话题。</p>\n<p>Apache ECharts<sup>TM</sup> 从初始一直使用 Canvas 绘制图表(除了对 IE8- 使用 VML)。而 <a href=\"https://github.com/apache/echarts/releases\" target=\"_blank\">ECharts v4.0</a> 发布了 SVG 渲染器,从而提供了一种新的选择。只须在初始化一个图表实例时,设置 <a href=\"api.html#echarts.init\" target=\"_blank\">renderer 参数</a> 为 <code class=\"codespan\">&#39;canvas&#39;</code> 或 <code class=\"codespan\">&#39;svg&#39;</code> 即可指定渲染器,比较方便。</p>\n<blockquote>\n<p>SVG 和 Canvas 这两种使用方式差异很大的技术,能够做到同时被透明支持,主要归功于 ECharts 底层库 <a href=\"https://github.com/ecomfe/zrender\" target=\"_blank\">ZRender</a> 的抽象和实现,形成可互换的 SVG 渲染器和 Canvas 渲染器。</p>\n</blockquote>\n<h2 id=\"-\">选择哪种渲染器</h2>\n<p>一般来说,Canvas 更适合绘制图形元素数量非常大(这一般是由数据量大导致)的图表(如热力图、地理坐标系或平行坐标系上的大规模线图或散点图等),也利于实现某些视觉 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=lines-bmap-effect\" target=\"_blank\">特效</a>。但是,在不少场景中,SVG 具有重要的优势:它的内存占用更低(这对移动端尤其重要)、渲染性能略高、并且用户使用浏览器内置的缩放功能时不会模糊。</p>\n<p>选择哪种渲染器,我们可以根据软硬件环境、数据量、功能需求综合考虑。</p>\n<ul>\n<li>在软硬件环境较好,数据量不大的场景下(例如 PC 端做商务报表),两种渲染器都可以适用,并不需要太多纠结。</li>\n<li>在环境较差,出现性能问题需要优化的场景下,可以通过试验来确定使用哪种渲染器。比如有这些经验:<ul>\n<li>在须要创建很多 ECharts 实例且浏览器易崩溃的情况下(可能是因为 Canvas 数量多导致内存占用超出手机承受能力),可以使用 SVG 渲染器来进行改善。大略得说,如果图表运行在低端安卓机,或者我们在使用一些特定图表如 <a href=\"https://ecomfe.github.io/echarts-liquidfill/example/\" target=\"_blank\">水球图</a> 等,SVG 渲染器可能效果更好。</li>\n<li>数据量很大、较多交互时,可以选用 Canvas 渲染器。</li>\n</ul>\n</li>\n</ul>\n<p>我们强烈欢迎开发者们 <a href=\"https://github.com/apache/echarts/issues/new\" target=\"_blank\">反馈</a> 给我们使用的体验和场景,帮助我们更好的做优化。</p>\n<p>注:除了某些特殊的渲染可能依赖 Canvas:如<a href=\"option.html#series-lines.effect\" target=\"_blank\">炫光尾迹特效</a>、<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=heatmap-bmap\" target=\"_blank\">带有混合效果的热力图</a>等,绝大部分功能 SVG 都是支持的。</p>\n<h2 id=\"-\">如何使用渲染器</h2>\n<p>ECharts 默认使用 Canvas 渲染。如果想使用 SVG 渲染,ECharts 代码中须包括有 SVG 渲染器模块。</p>\n<ul>\n<li>ECharts 的 <a href=\"https://www.jsdelivr.com/package/npm/echarts\" target=\"_blank\">预构建文件</a> 中,<a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.common.min.js\" target=\"_blank\">常用版</a> 和 <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js\" target=\"_blank\">完整版</a> 已经包含了 SVG 渲染器,可直接使用。而 <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.simple.min.js\" target=\"_blank\">精简版</a> 没有包括。</li>\n<li>如果 <a href=\"https://echarts.apache.org/zh/builder.html\" target=\"_blank\">在线自定义构建 ECharts</a>,则需要勾上页面下方的 “SVG 渲染”。</li>\n<li>如果 <a href=\"tutorial.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E6%9E%84%E5%BB%BA%20ECharts\" target=\"_blank\">线下自定义构建 ECharts</a>,则须引入 SVG 渲染器模块,即:</li>\n</ul>\n<pre><code class=\"lang-js\">import &#39;zrender/lib/svg/svg&#39;;\n</code></pre>\n<p>然后,我们就可以在代码中,初始化图表实例时,<a href=\"api.html#echarts.init\" target=\"_blank\">传入参数</a> 选择渲染器类型:</p>\n<pre><code class=\"lang-js\">// 使用 Canvas 渲染器(默认)\nvar chart = echarts.init(containerDom, null, {renderer: &#39;canvas&#39;});\n// 等价于:\nvar chart = echarts.init(containerDom);\n\n// 使用 SVG 渲染器\nvar chart = echarts.init(containerDom, null, {renderer: &#39;svg&#39;});\n</code></pre>\n"
diff --git a/zh/documents/tutorial-parts/tutorial.json b/zh/documents/tutorial-parts/tutorial.json
index 63ac6f4..4a60937 100644
--- a/zh/documents/tutorial-parts/tutorial.json
+++ b/zh/documents/tutorial-parts/tutorial.json
@@ -60,7 +60,7 @@
     "desc": "<p>在许多地方(如图、轴的标签等)都可以使用富文本标签。例如:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=pie-rich-text&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=treemap-obama&edit=1&reset=1\" width=\"800\" height=\"550\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=bar-rich-text&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<p><br></p>\n<p>其他一些例子:\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=map-labels&amp;edit=1&amp;reset=1\" target=\"_blank\">Map Labels</a>,\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=pie-nest&amp;edit=1&amp;reset=1\" target=\"_blank\">Pie Labels</a>,\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=gauge-car&amp;edit=1&amp;reset=1\" target=\"_blank\">Gauge</a>.</p>\n<p><br></p>\n<p>原先 Apache ECharts<sup>TM</sup> 中的文本标签,只能对整块统一进行样式设置,并且仅仅支持颜色和字体的设置,从而导致不易于制作表达能力更强的文字描述信息。</p>\n<p>echarts v3.7 以后,支持了富文本标签,能够:</p>\n<ul>\n<li>定制文本块整体的样式(如背景、边框、阴影等)、位置、旋转等。</li>\n<li>对文本块中个别片段定义样式(如颜色、字体、高宽、背景、阴影等)、对齐方式等。</li>\n<li>在文本中使用图片做小图标或者背景。</li>\n<li>特定组合以上的规则,可以做出简单表格、分割线等效果。</li>\n</ul>\n<p>开始下面的介绍之前,先说明一下下面会使用的两个名词的含义:</p>\n<ul>\n<li>文本块(Text Block):文本标签块整体。</li>\n<li>文本片段(Text fragment):文本标签块中的部分文本。</li>\n</ul>\n<p>如下图示例:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/text-block-fragment&edit=1&reset=1\" width=\"340\" height=\"240\" ></iframe>\n\n\n\n<h2 id=\"-\">文本样式相关的配置项</h2>\n<p>echarts 提供了丰富的文本标签配置项,包括:</p>\n<ul>\n<li>字体基本样式设置:<code class=\"codespan\">fontStyle</code>、<code class=\"codespan\">fontWeight</code>、<code class=\"codespan\">fontSize</code>、<code class=\"codespan\">fontFamily</code>。</li>\n<li>文字颜色:<code class=\"codespan\">color</code>。</li>\n<li>文字描边:<code class=\"codespan\">textBorderColor</code>、<code class=\"codespan\">textBorderWidth</code>。</li>\n<li>文字阴影:<code class=\"codespan\">textShadowColor</code>、<code class=\"codespan\">textShadowBlur</code>、<code class=\"codespan\">textShadowOffsetX</code>、<code class=\"codespan\">textShadowOffsetY</code>。</li>\n<li>文本块或文本片段大小:<code class=\"codespan\">lineHeight</code>、<code class=\"codespan\">width</code>、<code class=\"codespan\">height</code>、<code class=\"codespan\">padding</code>。</li>\n<li>文本块或文本片段的对齐:<code class=\"codespan\">align</code>、<code class=\"codespan\">verticalAlign</code>。</li>\n<li>文本块或文本片段的边框、背景(颜色或图片):<code class=\"codespan\">backgroundColor</code>、<code class=\"codespan\">borderColor</code>、<code class=\"codespan\">borderWidth</code>、<code class=\"codespan\">borderRadius</code>。</li>\n<li>文本块或文本片段的阴影:<code class=\"codespan\">shadowColor</code>、<code class=\"codespan\">shadowBlur</code>、<code class=\"codespan\">shadowOffsetX</code>、<code class=\"codespan\">shadowOffsetY</code>。</li>\n<li>文本块的位置和旋转:<code class=\"codespan\">position</code>、<code class=\"codespan\">distance</code>、<code class=\"codespan\">rotate</code>。</li>\n</ul>\n<p>可以在各处的 <code class=\"codespan\">rich</code> 属性中定义文本片段样式。例如 <a href=\"option.html#series-bar.label.rich\" target=\"_blank\">series-bar.label.rich</a></p>\n<p>例如:</p>\n<pre><code class=\"lang-js\">label: {\n    // 在文本中,可以对部分文本采用 rich 中定义样式。\n    // 这里需要在文本中使用标记符号:\n    // `{styleName|text content text content}` 标记样式名。\n    // 注意,换行仍是使用 &#39;\\n&#39;。\n    formatter: [\n        &#39;{a|这段文本采用样式a}&#39;,\n        &#39;{b|这段文本采用样式b}这段用默认样式{x|这段用样式x}&#39;\n    ].join(&#39;\\n&#39;),\n\n    // 这里是文本块的样式设置:\n    color: &#39;#333&#39;,\n    fontSize: 5,\n    fontFamily: &#39;Arial&#39;,\n    borderWidth: 3,\n    backgroundColor: &#39;#984455&#39;,\n    padding: [3, 10, 10, 5],\n    lineHeight: 20,\n\n    // rich 里是文本片段的样式设置:\n    rich: {\n        a: {\n            color: &#39;red&#39;,\n            lineHeight: 10\n        },\n        b: {\n            backgroundColor: {\n                image: &#39;xxx/xxx.jpg&#39;\n            },\n            height: 40\n        },\n        x: {\n            fontSize: 18,\n            fontFamily: &#39;Microsoft YaHei&#39;,\n            borderColor: &#39;#449933&#39;,\n            borderRadius: 4\n        },\n        ...\n    }\n}\n</code></pre>\n<blockquote>\n<p>注意:如果不定义 <code class=\"codespan\">rich</code>,不能指定文字块的 <code class=\"codespan\">width</code> 和 <code class=\"codespan\">height</code>。</p>\n</blockquote>\n<h2 id=\"-\">文本、文本框、文本片段的基本样式和装饰</h2>\n<p>每个文本可以设置基本的字体样式:<code class=\"codespan\">fontStyle</code>、<code class=\"codespan\">fontWeight</code>、<code class=\"codespan\">fontSize</code>、<code class=\"codespan\">fontFamily</code>。</p>\n<p>可以设置文字的颜色 <code class=\"codespan\">color</code> 和边框的颜色 <code class=\"codespan\">textBorderColor</code>、<code class=\"codespan\">textBorderWidth</code>。</p>\n<p>文本框可以设置边框和背景的样式:<code class=\"codespan\">borderColor</code>、<code class=\"codespan\">borderWidth</code>、<code class=\"codespan\">backgroundColor</code>、<code class=\"codespan\">padding</code>。</p>\n<p>文本片段也可以设置边框和背景的样式:<code class=\"codespan\">borderColor</code>、<code class=\"codespan\">borderWidth</code>、<code class=\"codespan\">backgroundColor</code>、<code class=\"codespan\">padding</code>。</p>\n<p>例如:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/text-options&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n\n<h2 id=\"-\">标签的位置</h2>\n<p>对于折线图、柱状图、散点图等,均可以使用 <code class=\"codespan\">label</code> 来设置标签。标签的相对于图形元素的位置,一般使用 <a href=\"option.html#series-scatter.label.position\" target=\"_blank\">label.position</a>、<a href=\"option.html#series-scatter.label.distance\" target=\"_blank\">label.distance</a> 来配置。</p>\n<p>例如:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/label-position&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<blockquote>\n<p>注意:<code class=\"codespan\">position</code> 在不同的图中可取值有所不同。<code class=\"codespan\">distance</code> 并不是在每个图中都支持。详情请参见 <a href=\"option.html\" target=\"_blank\">option 文档</a>。</p>\n</blockquote>\n<h2 id=\"-\">标签的旋转</h2>\n<p>某些图中,为了能有足够长的空间来显示标签,需要对标签进行旋转。例如:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=bar-label-rotation&edit=1&reset=1\" width=\"900\" height=\"500\" ></iframe>\n\n\n<p>这种场景下,可以结合 <a href=\"option.html#series-bar.label.align\" target=\"_blank\">align</a> 和 <a href=\"option.html#series-bar.label.verticalAlign\" target=\"_blank\">verticalAlign</a> 来调整标签位置。</p>\n<p>注意,逻辑是,先使用 <code class=\"codespan\">align</code> 和 <code class=\"codespan\">verticalAlign</code> 定位,再旋转。</p>\n<h2 id=\"-\">文本片段的排版和对齐</h2>\n<p>关于排版方式,每个文本片段,可以想象成 CSS 中的 <code class=\"codespan\">inline-block</code>,在文档流中按行放置。</p>\n<p>每个文本片段的内容盒尺寸(<code class=\"codespan\">content box size</code>),默认是根据文字大小决定的。但是,也可以设置 <code class=\"codespan\">width</code>、<code class=\"codespan\">height</code> 来强制指定,虽然一般不会这么做(参见下文)。文本片段的边框盒尺寸(<code class=\"codespan\">border box size</code>),由上述本身尺寸,加上文本片段的 <code class=\"codespan\">padding</code> 来得到。</p>\n<p>只有 <code class=\"codespan\">&#39;\\n&#39;</code> 是换行符,能导致换行。</p>\n<p>一行内,会有多个文本片段。每行的实际高度,由 <code class=\"codespan\">lineHeight</code> 最大的文本片段决定。文本片段的 <code class=\"codespan\">lineHeight</code> 可直接在 <code class=\"codespan\">rich</code> 中指定,也可以在 <code class=\"codespan\">rich</code> 的父层级中统一指定而采用到 <code class=\"codespan\">rich</code> 的所有项中,如果都不指定,则取文本片段的边框盒尺寸(<code class=\"codespan\">border box size</code>)。</p>\n<p>在一行的 <code class=\"codespan\">lineHeight</code> 被决定后,一行内,文本片段的竖直位置,由文本片段的 <code class=\"codespan\">verticalAlign</code> 来指定(这里和 CSS 中的规则稍有不同):</p>\n<ul>\n<li><code class=\"codespan\">&#39;bottom&#39;</code>:文本片段的盒的底边贴住行底。</li>\n<li><code class=\"codespan\">&#39;top&#39;</code>:文本片段的盒的顶边贴住行顶。</li>\n<li><code class=\"codespan\">&#39;middle&#39;</code>:居行中。</li>\n</ul>\n<p>文本块的宽度,可以直接由文本块的 <code class=\"codespan\">width</code> 指定,否则,由最长的行决定。宽度决定后,在一行中进行文本片段的放置。文本片段的 <code class=\"codespan\">align</code> 决定了文本片段在行中的水平位置:</p>\n<ul>\n<li>首先,从左向右连续紧靠放置 <code class=\"codespan\">align</code> 为 <code class=\"codespan\">&#39;left&#39;</code> 的文本片段盒。</li>\n<li>然后,从右向左连续紧靠放置 <code class=\"codespan\">align</code> 为 <code class=\"codespan\">&#39;right&#39;</code> 的文本片段盒。</li>\n<li>最后,剩余的没处理的文本片段盒,紧贴着,在中间剩余的区域中居中放置。</li>\n</ul>\n<p>关于文字在文本片段盒中的位置:</p>\n<ul>\n<li>如果 <code class=\"codespan\">align</code> 为 <code class=\"codespan\">&#39;center&#39;</code>,则文字在文本片段盒中是居中的。</li>\n<li>如果 <code class=\"codespan\">align</code> 为 <code class=\"codespan\">&#39;left&#39;</code>,则文字在文本片段盒中是居左的。</li>\n<li>如果 <code class=\"codespan\">align</code> 为 <code class=\"codespan\">&#39;right&#39;</code>,则文字在文本片段盒中是居右的。</li>\n</ul>\n<p>例如:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/text-fragment-align&edit=1&reset=1\" width=\"800\" height=\"220\" ></iframe>\n\n\n\n<h2 id=\"-\">特殊效果:图标、分割线、标题块、简单表格</h2>\n<p>看下面的例子:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/title-block&edit=1&reset=1\" width=\"600\" height=\"400\" ></iframe>\n\n\n<p>文本片段的 <code class=\"codespan\">backgroundColor</code> 可以指定为图片后,就可以在文本中使用图标了:</p>\n<pre><code class=\"lang-js\">rich: {\n    Sunny: {\n        // 这样设定 backgroundColor 就可以是图片了。\n        backgroundColor: {\n            image: &#39;./data/asset/img/weather/sunny_128.png&#39;\n        },\n        // 可以只指定图片的高度,从而图片的宽度根据图片的长宽比自动得到。\n        height: 30\n    }\n}\n</code></pre>\n<p>分割线实际是用 border 实现的:</p>\n<pre><code class=\"lang-js\">rich: {\n    hr: {\n        borderColor: &#39;#777&#39;,\n        // 这里把 width 设置为 &#39;100%&#39;,表示分割线的长度充满文本块。\n        // 注意,这里是文本块内容盒(content box)的 100%,而不包含 padding。\n        // 虽然这和 CSS 相关的定义有所不同,但是在这类场景中更加方便。\n        width: &#39;100%&#39;,\n        borderWidth: 0.5,\n        height: 0\n    }\n}\n</code></pre>\n<p>标题块是使用 <code class=\"codespan\">backgroundColor</code> 实现的:</p>\n<pre><code class=\"lang-js\">// 标题文字居左\nformatter: &#39;{titleBg|Left Title}&#39;,\nrich: {\n    titleBg: {\n        backgroundColor: &#39;#000&#39;,\n        height: 30,\n        borderRadius: [5, 5, 0, 0],\n        padding: [0, 10, 0, 10],\n        width: &#39;100%&#39;,\n        color: &#39;#eee&#39;\n    }\n}\n\n// 标题文字居中。\n// 这个实现有些 tricky,但是,能够不引入更复杂的排版规则而实现这个效果。\nformatter: &#39;{tc|Center Title}{titleBg|}&#39;,\nrich: {\n    titleBg: {\n        align: &#39;right&#39;,\n        backgroundColor: &#39;#000&#39;,\n        height: 30,\n        borderRadius: [5, 5, 0, 0],\n        padding: [0, 10, 0, 10],\n        width: &#39;100%&#39;,\n        color: &#39;#eee&#39;\n    }\n}\n</code></pre>\n<p>简单表格的设定,其实就是给不同行上纵向对应的文本片段设定同样的宽度就可以了。参见本文最开始的 <a href=\"https://echarts.apache.org/examples/zh/view.html?c=pie-rich-text&amp;edit=1&amp;reset=1\" target=\"_blank\">例子</a>。</p>\n"
   },
   "服务端渲染": {
-    "desc": "<p>Apache ECharts<sup>TM</sup> 可以在服务端进行渲染。例如 <a href=\"https://echarts.apache.org/examples/zh/index.html\" target=\"_blank\">官方示例</a> 里的一个个小截图,就是在服务端预生成出来的。</p>\n<p>服务端渲染可以使用流行的 headless 环境,例如 <a href=\"https://github.com/GoogleChrome/puppeteer\" target=\"_blank\">puppeteer</a>、<a href=\"https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md\" target=\"_blank\">headless chrome</a>、<a href=\"https://github.com/Automattic/node-canvas\" target=\"_blank\">node-canvas</a>、<a href=\"https://github.com/jsdom/jsdom\" target=\"_blank\">jsdom</a>、<a href=\"http://phantomjs.org/\" target=\"_blank\">PhantomJS</a> 等。</p>\n<p>这是一些社区贡献的 echarts 服务端渲染方案:</p>\n<ul>\n<li><a href=\"https://github.com/hellosean1025/node-echarts\" target=\"_blank\">https://github.com/hellosean1025/node-echarts</a></li>\n<li><a href=\"https://github.com/chfw/echarts-scrappeteer\" target=\"_blank\">https://github.com/chfw/echarts-scrappeteer</a></li>\n<li><a href=\"https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js\" target=\"_blank\">https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js</a></li>\n<li><a href=\"https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73\" target=\"_blank\">https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73</a></li>\n</ul>\n"
+    "desc": "<p>Apache ECharts<sup>TM</sup> 可以在服务端进行渲染。例如 <a href=\"https://echarts.apache.org/examples/zh/index.html\" target=\"_blank\">官方示例</a> 里的一个个小截图,就是在服务端预生成出来的。</p>\n<p>服务端渲染可以使用流行的 headless 环境,例如 <a href=\"https://github.com/GoogleChrome/puppeteer\" target=\"_blank\">puppeteer</a>、<a href=\"https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md\" target=\"_blank\">headless chrome</a>、<a href=\"https://github.com/Automattic/node-canvas\" target=\"_blank\">node-canvas</a>、<a href=\"https://github.com/jsdom/jsdom\" target=\"_blank\">jsdom</a>、<a href=\"http://phantomjs.org/\" target=\"_blank\">PhantomJS</a> 等。</p>\n<p>这是一些社区贡献的 echarts 服务端渲染方案:</p>\n<ul>\n<li><a href=\"https://github.com/hellosean1025/node-echarts\" target=\"_blank\">https://github.com/hellosean1025/node-echarts</a></li>\n<li><a href=\"https://github.com/chfw/echarts-scrappeteer\" target=\"_blank\">https://github.com/chfw/echarts-scrappeteer</a></li>\n<li><a href=\"https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js\" target=\"_blank\">https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js</a></li>\n<li><a href=\"https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73\" target=\"_blank\">https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73</a></li>\n</ul>\n<p>注意:如果发现 server 端渲染结果和浏览器渲染结果不一致,请将 <a href=\"option.html#animation\" target=\"_blank\">animation</a> 设置为 <code class=\"codespan\">false</code> 再尝试一下。</p>\n"
   },
   "使用 Canvas 或者 SVG 渲染": {
     "desc": "<p>浏览器端图表库大多会选择 SVG 或者 Canvas 进行渲染。对于绘制图表来说,这两种技术往往是可替换的,效果相近。但是在一些场景中,他们的表现和能力又有一定差异。于是,对它们的选择取舍,就成为了一个一直存在的不易有标准答案的话题。</p>\n<p>Apache ECharts<sup>TM</sup> 从初始一直使用 Canvas 绘制图表(除了对 IE8- 使用 VML)。而 <a href=\"https://github.com/apache/echarts/releases\" target=\"_blank\">ECharts v4.0</a> 发布了 SVG 渲染器,从而提供了一种新的选择。只须在初始化一个图表实例时,设置 <a href=\"api.html#echarts.init\" target=\"_blank\">renderer 参数</a> 为 <code class=\"codespan\">&#39;canvas&#39;</code> 或 <code class=\"codespan\">&#39;svg&#39;</code> 即可指定渲染器,比较方便。</p>\n<blockquote>\n<p>SVG 和 Canvas 这两种使用方式差异很大的技术,能够做到同时被透明支持,主要归功于 ECharts 底层库 <a href=\"https://github.com/ecomfe/zrender\" target=\"_blank\">ZRender</a> 的抽象和实现,形成可互换的 SVG 渲染器和 Canvas 渲染器。</p>\n</blockquote>\n<h2 id=\"-\">选择哪种渲染器</h2>\n<p>一般来说,Canvas 更适合绘制图形元素数量非常大(这一般是由数据量大导致)的图表(如热力图、地理坐标系或平行坐标系上的大规模线图或散点图等),也利于实现某些视觉 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=lines-bmap-effect\" target=\"_blank\">特效</a>。但是,在不少场景中,SVG 具有重要的优势:它的内存占用更低(这对移动端尤其重要)、渲染性能略高、并且用户使用浏览器内置的缩放功能时不会模糊。</p>\n<p>选择哪种渲染器,我们可以根据软硬件环境、数据量、功能需求综合考虑。</p>\n<ul>\n<li>在软硬件环境较好,数据量不大的场景下(例如 PC 端做商务报表),两种渲染器都可以适用,并不需要太多纠结。</li>\n<li>在环境较差,出现性能问题需要优化的场景下,可以通过试验来确定使用哪种渲染器。比如有这些经验:<ul>\n<li>在须要创建很多 ECharts 实例且浏览器易崩溃的情况下(可能是因为 Canvas 数量多导致内存占用超出手机承受能力),可以使用 SVG 渲染器来进行改善。大略得说,如果图表运行在低端安卓机,或者我们在使用一些特定图表如 <a href=\"https://ecomfe.github.io/echarts-liquidfill/example/\" target=\"_blank\">水球图</a> 等,SVG 渲染器可能效果更好。</li>\n<li>数据量很大、较多交互时,可以选用 Canvas 渲染器。</li>\n</ul>\n</li>\n</ul>\n<p>我们强烈欢迎开发者们 <a href=\"https://github.com/apache/echarts/issues/new\" target=\"_blank\">反馈</a> 给我们使用的体验和场景,帮助我们更好的做优化。</p>\n<p>注:除了某些特殊的渲染可能依赖 Canvas:如<a href=\"option.html#series-lines.effect\" target=\"_blank\">炫光尾迹特效</a>、<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=heatmap-bmap\" target=\"_blank\">带有混合效果的热力图</a>等,绝大部分功能 SVG 都是支持的。</p>\n<h2 id=\"-\">如何使用渲染器</h2>\n<p>ECharts 默认使用 Canvas 渲染。如果想使用 SVG 渲染,ECharts 代码中须包括有 SVG 渲染器模块。</p>\n<ul>\n<li>ECharts 的 <a href=\"https://www.jsdelivr.com/package/npm/echarts\" target=\"_blank\">预构建文件</a> 中,<a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.common.min.js\" target=\"_blank\">常用版</a> 和 <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js\" target=\"_blank\">完整版</a> 已经包含了 SVG 渲染器,可直接使用。而 <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.simple.min.js\" target=\"_blank\">精简版</a> 没有包括。</li>\n<li>如果 <a href=\"https://echarts.apache.org/zh/builder.html\" target=\"_blank\">在线自定义构建 ECharts</a>,则需要勾上页面下方的 “SVG 渲染”。</li>\n<li>如果 <a href=\"tutorial.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E6%9E%84%E5%BB%BA%20ECharts\" target=\"_blank\">线下自定义构建 ECharts</a>,则须引入 SVG 渲染器模块,即:</li>\n</ul>\n<pre><code class=\"lang-js\">import &#39;zrender/lib/svg/svg&#39;;\n</code></pre>\n<p>然后,我们就可以在代码中,初始化图表实例时,<a href=\"api.html#echarts.init\" target=\"_blank\">传入参数</a> 选择渲染器类型:</p>\n<pre><code class=\"lang-js\">// 使用 Canvas 渲染器(默认)\nvar chart = echarts.init(containerDom, null, {renderer: &#39;canvas&#39;});\n// 等价于:\nvar chart = echarts.init(containerDom);\n\n// 使用 SVG 渲染器\nvar chart = echarts.init(containerDom, null, {renderer: &#39;svg&#39;});\n</code></pre>\n"
diff --git a/zh/documents/tutorial.json b/zh/documents/tutorial.json
index 8f12432..47b9003 100644
--- a/zh/documents/tutorial.json
+++ b/zh/documents/tutorial.json
@@ -1 +1 @@
-{"$schema":"https://echarts.apache.org/doc/json-schem","option":{"type":"Object","properties":{"5 分钟上手 ECharts":{"type":["*"],"description":"<h2 id=\"-echarts\">获取 ECharts</h2>\n<p>你可以通过以下几种方式获取 Apache ECharts<sup>TM</sup>。</p>\n<ul>\n<li><p>从 <a href=\"https://echarts.apache.org/zh/download.html\" target=\"_blank\">Apache ECharts 官网下载界面</a> 获取官方源码包后构建。</p>\n</li>\n<li><p>在 ECharts 的 <a href=\"https://github.com/apache/echarts/releases\" target=\"_blank\">GitHub</a> 获取。</p>\n</li>\n<li><p>通过 npm 获取 echarts,<code class=\"codespan\">npm install echarts --save</code>,详见“<a href=\"tutorial.html#%E5%9C%A8%20webpack%20%E4%B8%AD%E4%BD%BF%E7%94%A8%20ECharts\" target=\"_blank\">在 webpack 中使用 echarts</a>”</p>\n</li>\n<li><p>通过 <a href=\"https://www.jsdelivr.com/package/npm/echarts\" target=\"_blank\">jsDelivr</a> 等 CDN 引入</p>\n</li>\n</ul>\n<h2 id=\"-echarts\">引入 ECharts</h2>\n<p>通过标签方式直接引入构建好的 echarts 文件</p>\n<pre><code class=\"lang-html\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n    &lt;meta charset=&quot;utf-8&quot;&gt;\n    &lt;!-- 引入 ECharts 文件 --&gt;\n    &lt;script src=&quot;echarts.min.js&quot;&gt;&lt;/script&gt;\n&lt;/head&gt;\n&lt;/html&gt;\n</code></pre>\n<h2 id=\"-\">绘制一个简单的图表</h2>\n<p>在绘图前我们需要为 ECharts 准备一个具备高宽的 DOM 容器。</p>\n<pre><code>&lt;body&gt;\n    &lt;!-- 为 ECharts 准备一个具备大小(宽高)的 DOM --&gt;\n    &lt;div id=&quot;main&quot; style=&quot;width: 600px;height:400px;&quot;&gt;&lt;/div&gt;\n&lt;/body&gt;\n</code></pre><p>然后就可以通过 <a href=\"api.html#echarts.init\" target=\"_blank\">echarts.init</a> 方法初始化一个 echarts 实例并通过 <a href=\"api.html#echartsInstance.setOption\" target=\"_blank\">setOption</a> 方法生成一个简单的柱状图,下面是完整代码。</p>\n<pre><code class=\"lang-html\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n    &lt;meta charset=&quot;utf-8&quot;&gt;\n    &lt;title&gt;ECharts&lt;/title&gt;\n    &lt;!-- 引入 echarts.js --&gt;\n    &lt;script src=&quot;echarts.min.js&quot;&gt;&lt;/script&gt;\n&lt;/head&gt;\n&lt;body&gt;\n    &lt;!-- 为ECharts准备一个具备大小(宽高)的Dom --&gt;\n    &lt;div id=&quot;main&quot; style=&quot;width: 600px;height:400px;&quot;&gt;&lt;/div&gt;\n    &lt;script type=&quot;text/javascript&quot;&gt;\n        // 基于准备好的dom,初始化echarts实例\n        var myChart = echarts.init(document.getElementById(&#39;main&#39;));\n\n        // 指定图表的配置项和数据\n        var option = {\n            title: {\n                text: &#39;ECharts 入门示例&#39;\n            },\n            tooltip: {},\n            legend: {\n                data:[&#39;销量&#39;]\n            },\n            xAxis: {\n                data: [&quot;衬衫&quot;,&quot;羊毛衫&quot;,&quot;雪纺衫&quot;,&quot;裤子&quot;,&quot;高跟鞋&quot;,&quot;袜子&quot;]\n            },\n            yAxis: {},\n            series: [{\n                name: &#39;销量&#39;,\n                type: &#39;bar&#39;,\n                data: [5, 20, 36, 10, 10, 20]\n            }]\n        };\n\n        // 使用刚指定的配置项和数据显示图表。\n        myChart.setOption(option);\n    &lt;/script&gt;\n&lt;/body&gt;\n&lt;/html&gt;\n</code></pre>\n<p>这样你的第一个图表就诞生了!</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/getting-started&reset=1&edit=1\" width=\"600\" height=\"300\" ></iframe>\n\n\n<p>你也可以直接进入 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=doc-example/getting-started\" target=\"_blank\">ECharts Gallery</a> 中查看编辑示例</p>\n"},"ECharts 5 新特性":{"type":["*"],"description":"<p>数据可视化在过去的几年中得到了长足的发展。开发者对于可视化产品的期待不再是简单的图表创建工具,而在交互、性能、数据处理等方面有了更高级的需求。</p>\n<p>Apache ECharts 始终致力于让开发者以更方便的方式创造灵活丰富的可视化作品。在最新推出的 Apache ECharts 5,我们着力加强了图表的叙事能力,让开发者可以以更简单的方式,讲述数据背后的故事。</p>\n<p><img src=\"documents/asset/img/feature-v5/echarts-5.png\" width=\"800px\" /></p>\n<p>“表·达”是 Apache ECharts 5 的核心,通过五大模块、十五项特性的全面升级,围绕可视化作品的叙事表达能力,让图“表”更能传“达”数据背后的故事,帮助开发者更轻松地创造满足各种场景需求的可视化作品。</p>\n<h2 id=\"-\">动态叙事</h2>\n<p>动画对于人类认知的重要性不言而喻。在之前的作品中,我们会通过初始化动画和过渡动画帮助用户理解数据变换之间的联系,让图表的出现和变换显得不那么生硬。这次,我们更是大幅度增强了我们的动画叙事能力,。希望能够进一步发挥动画对于用户认知的帮助作用,借助图表的动态叙事功能,帮助用户更容易理解图表背后表达的故事。</p>\n<h4 id=\"-\">动态排序图</h4>\n<p>Apache ECharts 5 新增支持动态排序柱状图(bar-racing)以及动态排序折线图(line-racing),帮助开发者方便地创建带有时序性的图表,展现数据随着时间维度上的变化,讲述数据的演变过程。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=bar-race-country&edit=1&reset=1\" width=\"700\" height=\"400\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=line-race&edit=1&reset=1\" width=\"700\" height=\"400\" ></iframe>\n\n\n<p>动态排序图展现了不同的类目随着时间在排名上的衍变。而开发者只需要通过几行简单的配置项就可以在 ECharts 中开启这样的效果。</p>\n<h4 id=\"-\">自定义系列动画</h4>\n<p>除了动态排序图,Apache ECharts 5 在自定义系列中提供了更加丰富强大的动画效果,支持标签数值文本的插值动画,图形的形变(morph)、分裂(separate)、合并(combine)等效果的过渡动画。</p>\n<p>想象一下,用这些动态效果,你可以创造出多么令人称奇的可视化作品!</p>\n<h2 id=\"-\">视觉设计</h2>\n<p>视觉设计的作用并不仅仅是为了让图表更好看,更重要的是,符合可视化原理的设计可以帮用户更快速地理解图表想表达的内容,并且尽可能消除不良设计带来的误解。</p>\n<h4 id=\"-\">默认设计</h4>\n<p>我们发现,有很大一部分开发者使用了 ECharts 默认的主题样式,因而设计优雅、符合可视化原理的默认主题设计是非常重要的。在 Apache ECharts 5 中,我们重新设计了默认的主题样式,针对不同的系列和组件分别做了优化调整。以主题色为例,我们考量了颜色之间的区分度、与背景色的对比度、相邻颜色的和谐度等因素,并且确保色觉辨识障碍人士也能清楚地区分数据。</p>\n<p><img src=\"documents/asset/img/feature-v5/theme-color.png\" width=\"400px\" /></p>\n<p>我们以最常用的柱状图为例,来看看新版本浅色主题和深色主题的样式:</p>\n<p><img src=\"documents/asset/img/feature-v5/new-theme-light.png\" width=\"500px\" />\n<img src=\"documents/asset/img/feature-v5/new-theme-dark.png\" width=\"500px\" /></p>\n<p>对于数据区域缩放,时间轴等交互组件,我们也设计了全新的样式并且提供了更好的交互体验:</p>\n<p><img src=\"documents/asset/img/feature-v5/dataZoom.png\" width=\"500px\" /></p>\n<p><img src=\"documents/asset/img/feature-v5/timeline.png\" width=\"500px\" /></p>\n<h4 id=\"-\">标签</h4>\n<p>标签是图表中的核心元素之一,清晰而明确的标签可以帮助用户对数据有更准确的理解。Apache ECharts 5 提供了多种新的标签功能,让密集的标签能清晰显示、准确表意。</p>\n<p>Apache ECharts 5 可以通过一个配置项开启自动隐藏重叠的标签。对于超出显示区域的标签,可以选择自动截断或者换行。密集的饼图标签,现在有了更美观的自动排布。</p>\n<p>这些功能可以帮助避免文字过于密集影响可读性。并且,无需开发者编写额外的代码就能默认生效,大大简化了开发者的开发成本。</p>\n<p>我们也提供了多个配置项来让开发者主动控制标签的布局策略,例如标签拖动、整体显示在画布边缘,用引导线和图形元素连接,并且仍可联动高亮表达关联关系。</p>\n<p>新的标签功能可以让你在移动端这样局限的空间内也可以有很优雅的标签展示:</p>\n<p><img src=\"documents/asset/img/feature-v5/pie-label.png\" height=\"150px\" />\n<img src=\"documents/asset/img/feature-v5/pie-label-2.png\" height=\"150px\" /></p>\n<h4 id=\"-\">时间轴</h4>\n<p>Apache ECharts 5 带来了适于表达时间标签刻度的时间轴。时间轴的默认设计更突出重要的信息,并且提供了更灵活的定制化能力,让开发者根据不同的需求定制时间轴的标签内容。</p>\n<p>首先,时间轴不再如之前般绝对平均分割,而是选取年、月、日、整点这类更有意义的点来展示,并且能同时显示不同层级的刻度。标签的 <code class=\"codespan\">formatter</code> 支持了时间模版(例如 <code class=\"codespan\">{yyyy}-{MM}-{dd}</code>),并且可以为不同时间粒度的标签指定不同的 <code class=\"codespan\">formatter</code>,结合已有的富文本标签,可以定制出醒目而多样的时间效果。</p>\n<p>不同的 dataZoom 粒度下时间刻度的显示:</p>\n<p><img src=\"documents/asset/img/feature-v5/time-axis.png\" width=\"600px\" /></p>\n<p><img src=\"documents/asset/img/feature-v5/time-axis-2.png\" width=\"600px\" /></p>\n<h4 id=\"-\">提示框</h4>\n<p>提示框(Tooltip)是一种最常用的可视化组件,可以帮助用户交互式地了解数据的详细信息。在 Apache ECharts 5 中,我们对提示框的样式进行了优化,通过对字体样式,颜色的调整,指向图形的箭头,跟随图形颜色的边框色等功能,让提示框的默认展示优雅又清晰。并且改进了富文本的渲染逻辑,确保显示效果与 HTML 方式一致,让用户在不同场景下可以选择不同的技术方案实现同样的效果。</p>\n<p><img src=\"documents/asset/img/feature-v5/new-tooltip.png\" height=\"200px\" />\n<img src=\"documents/asset/img/feature-v5/new-tooltip-2.png\" height=\"200px\" /></p>\n<p>除此之外,我们这次也加上了提示框内的列表按照数值大小或者类目顺序排序的功能。</p>\n<h4 id=\"-\">仪表盘</h4>\n<p>我们看到社区用户创建了很多酷炫的仪表盘图表,但是他们的配置方式往往比较复杂而取巧。因此,我们对仪表盘的功能作了全面升级,支持了图片或者矢量路径绘制指针、也支持了锚点(anchor)配置项、进度条(progress)、圆角效果等等配置项。</p>\n<p>不同样式的仪表盘指针:</p>\n<p><img src=\"documents/asset/img/feature-v5/gauge-pointer.png\" width=\"600px\" /></p>\n<p>这些升级,不仅可以让开发者用更简单的配置项实现酷炫的效果,而且带来了更丰富的定制能力。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=gauge-clock&edit=1&reset=1\" width=\"600\" height=\"600\" ></iframe>\n\n\n<h4 id=\"-\">扇形圆角</h4>\n<p>圆角可以带来更美观而柔和的视觉,也能够赋予更多的创造力。Apache ECharts 5 支持了饼图、旭日图、矩形树图的扇形圆角。可不要小看了简单的圆角配置项,合理地搭配其他的效果,就可以形成更具个性的的可视化作品。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=sunburst-borderRadius&edit=1&reset=1\" width=\"400\" height=\"400\" ></iframe>\n\n\n\n\n<h2 id=\"-\">交互能力</h2>\n<p>可视化作品的交互能力帮助用户探索了解作品,加深对于图表主旨的理解。</p>\n<h4 id=\"-\">状态管理</h4>\n<p>在 ECharts 4 中有高亮(emphasis)和普通(normal)两个交互的状态,在鼠标移到图形上的时候会进入高亮状态以区分该数据,开发者可以分别设置这两个状态的颜色,阴影等样式。</p>\n<p>这次在 Apache ECharts 5 中,我们在原先的鼠标 hover 高亮的基础上,新增加了<strong>淡出</strong>其它非相关元素的效果,从而可以达到聚焦目标数据的目的。</p>\n<p>比如在这个<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=bar-y-category-stack\" target=\"_blank\">柱状图</a>的例子中,鼠标移到一个系列上的时候,其它非相关的系列就会淡出,从而可以更清晰的突出聚焦系列中数据的对比。在关系图,树图,旭日图,桑基等更复杂数据结构的图上,也可以通过淡出非相关元素来观察数据之间的联系。而且颜色,阴影等在高亮(emphasis)中可以设置的样式,现在也可以在淡出(blur)状态中设置了。</p>\n<p>除此之外,我们为所有系列还添加了<strong>点击选中</strong>这个之前只有在饼图、地图等少数系列中才能开启的交互,开发者可以设置为单选或多选模式,并且通过监听 <code class=\"codespan\">selectchanged</code> 事件获取到选中的所有图形然后进行更进一步的处理。与高亮和淡出一样,选中的样式也可以在 <code class=\"codespan\">select</code> 中配置。</p>\n<h4 id=\"-\">性能提升</h4>\n<h5 id=\"-\">脏矩形渲染</h5>\n<p>Apache ECharts 5 新支持了脏矩形渲染,解决只有局部变化的场景下的性能瓶颈。在使用 Canvas 渲染器时,脏矩形渲染技术探测并只更新视图变化的部分,而不是任何变动都引起画布完全重绘。这能在一些特殊场景下帮助提高渲染帧率,例如在图形很多时候,鼠标频繁触发一些图形高亮的场景。以往这类场景,会使用额外的 Canvas 层以优化性能,但是这种方式不是所有场景都通用,而且对于复杂的样式的效果并不理想。脏矩形渲染很好地同时满足了性能和显示正确。</p>\n<p>脏矩形的可视化演示,红色框选部分为该帧重绘区域:</p>\n<p><img src=\"documents/asset/img/feature-v5/dirty-rect.gif\" width=\"500px\" /></p>\n<p>大家在新的示例页面选择开启脏矩形优化就可以看到该效果。</p>\n<h5 id=\"-\">实时时序数据的折线图性能优化</h5>\n<p>除此之外,海量数据下折线图的性能也有了大幅度的性能提升。我们经常碰到大量的实时时序数据的高性能绘制的需求,这些数据可能需要几百或者几十毫秒更新一次。</p>\n<p>Apache ECharts 5 对这些场景下的 CPU 消耗、内存占用、初始化时间都进行了深度的优化,使得百万量级的数据也能做到实时的更新(每次更新耗时少于 30ms),甚至对于千万级的数据,也可以在 1s 内渲染完,并且保持很小的内存占用以及流畅的提示框(tooltip)等交互。</p>\n<h2 id=\"-\">开发体验</h2>\n<p>我们希望如此强大的可视化工具可以被更多开发者以更简单的方式使用,因而开发者的开发体验也是我们非常关注的方面。</p>\n<h4 id=\"-\">数据集</h4>\n<p>ECharts 5 加强了数据集的数据转换能力,让开发者可以使用简单的方式实现常用的数据处理,如:数据过滤(filter)、排序(sort)、聚合(aggregate)、直方图(histogram)、简单聚类(clustering)、回归线计算(regression)等。开发者可以用统一的声明式方式来使用这些功能,可以方便地实现常用的数据操作。</p>\n<h4 id=\"-\">国际化</h4>\n<p>ECharts 原有的国际化方案,采用的是根据不同的语言参数打包出不同的部署文件的形式。​这种方式,使动态的语言和静态的代码包绑定在一起,使用的时候只能通过重新加载不同语言版本的 ECharts 代码来达到切换语言的目的。</p>\n<p>因此,从 Apache ECharts 5 开始,动态的语言包和静态的代码包分离开。切换语言的时候,只需要加载相应语言包​,通过类似挂载主题的方式,使用 <code class=\"codespan\">registerLocale</code> 函数挂载语言包对象​,重新初始化后就完成了语言的切换​。</p>\n<pre><code class=\"lang-js\">// import the lang object and set when init​\necharts.registerLocale(&#39;DE&#39;, lang);​\necharts.init(DomElement, null, {​\n   locale: &#39;DE&#39;​\n});\n</code></pre>\n<h4 id=\"typescript-\">TypeScript 重构</h4>\n<p>在近 8 年的时间里,Apache ECharts 已经发展成一个非常复杂的可视化库了,为了续可以更安全高效的进行重构和新功能的开发,我们在 Apache ECharts 5 的开发之初,使用 TypeScript 对代码进行了重写,TypeScript 所带来的强类型让我们更有信心地在 ECharts 5 开发的时候对代码进行大刀阔斧的重构以实现更多令人激动人心的特性。</p>\n<p>对于开发者,我们也可以从 TypeScript 代码直接生成更好更符合代码的<code class=\"codespan\">DTS</code>类型描述文件。在此之前,ECharts 的类型描述文件一直是由社区开发者帮我们维护并发布到<a href=\"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/echarts\" target=\"_blank\">DefinityTyped</a>,这个有着不小的工作量,非常感谢大家的贡献。</p>\n<p>除此之外,如果开发者的组件是按需引入的,我们还提供了一个 <code class=\"codespan\">ComposeOption</code> 类型方法,可以组合出一个只包含了引入组件的配置项类型,可以带来更严格的类型检查,帮助你提前检测到未引入的组件类型。</p>\n<h2 id=\"-\">可访问性</h2>\n<p>Apache ECharts 一直非常重视无障碍设计,我们希望让视觉障碍人士也能平等了解图表传递的信息。并且也希望图表的开发者能以极低的开发成本实现这一点,因而有利于让开发者更愿意为视觉障碍人士提供支持。</p>\n<p>在上一个大版本中,我们支持了根据不同的图表类型和数据自动一键智能生成图表描述的功能,帮助开发者非常方便地支持图表的 DOM 描述信息。在 ECharts 5 中,我们也做了更多提高可访问性的设计,帮助视觉障碍人士更好地理解图表内容。</p>\n<h4 id=\"-\">主题配色</h4>\n<p>我们在设计新版默认主题样式的时候,将无障碍设计作为一个重要的考量依据,对颜色的明度和色值都进行反复测试,帮助视觉辨识障碍用户清楚地识别图表数据。​</p>\n<p>并且,针对有更进一步无障碍需求的开发者,我们还提供了特殊的高对比度主题,以更高对比度颜色的主题将数据作进一步区分。</p>\n<h4 id=\"-\">贴花图案</h4>\n<p>ECharts 5 还新增提供了贴花的功能,用图案辅助颜色表达,进一步帮助用户区分数据。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/aria-decal-simple&edit=1&reset=1\" width=\"600\" height=\"350\" ></iframe>\n\n\n<p>此外,贴花图案还能在一些其他的场景下提供帮助,比如:在报纸、书籍之类只有单色或者非常少的颜色的印刷品中,帮助更好地区分数据;用图形元素方便用户对数据产生更直观的理解等。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/aria-decal-newspaper&edit=1&reset=1\" width=\"600\" height=\"350\" ></iframe>\n\n\n\n\n<h2 id=\"-\">小结</h2>\n<p>除了以上介绍的功能,Apache ECharts 还在非常多的细节中做了改进,帮助开发者更轻松地创建默认好用、配置灵活的图表,用图表讲述数据背后的故事。</p>\n<p>感谢所有使用过 ECharts,甚至参与过社区贡献的开发者,正是你们才使得 Apache ECharts 5 成为可能。我们会以更大的热情投入到未来的开发中,Apache ECharts 也会以更大的诚意和大家在 6 相见!</p>\n"},"ECharts 5 升级指南":{"type":["*"],"description":"<p>本指南面向那些希望将 echarts 4.x(以下简称 <code class=\"codespan\">v4</code>)升级到 echarts 5.x(以下简称 <code class=\"codespan\">v5</code>)的用户。大家可以在 <a href=\"tutorial.html#ECharts%205%20新特性\" target=\"_blank\">ECharts 5 新特性</a> 中了解这次<code class=\"codespan\">v5</code>带来了哪些值得升级的新特性。在绝大多数情况下,开发者用不着为这个升级做什么额外的事,因为 echarts 一直尽可能地保持 API 的稳定和向后兼容。但是,<code class=\"codespan\">v5</code> 仍然带来了一些非兼容改动,需要特别关注。此外,在一些情况下,<code class=\"codespan\">v5</code> 提供了更好的 API 用来取代之前的 API,这些被取代的 API 将不再被推荐使用(当然,我们尽量兼容了这些改动)。我们会在这篇文档里尽量详尽得解释这些改动。</p>\n<p>因为我们在 <code class=\"codespan\">v5.0.1</code> 增加了新的<a href=\"tutorial.html#%E5%9C%A8%E6%89%93%E5%8C%85%E7%8E%AF%E5%A2%83%E4%B8%AD%E4%BD%BF%E7%94%A8%20ECharts\" target=\"_blank\">按需引入接口</a>,所以本文档基于 <code class=\"codespan\">v5.0.1</code> 或者更高的版本。</p>\n<h2 id=\"-\">非兼容性改变</h2>\n<h4 id=\"-theme-\">默认主题(theme)</h4>\n<p>首先是默认主题的改动,<code class=\"codespan\">v5</code> 在配色等主题设计上做了很多的优化来达到更好的视觉效果。如果大家依旧想保留旧版本的颜色,可以手动声明颜色,如下:</p>\n<pre><code class=\"lang-js\">chart.setOption({\n    color: [\n        &#39;#c23531&#39;, &#39;#2f4554&#39;, &#39;#61a0a8&#39;, &#39;#d48265&#39;, &#39;#91c7ae&#39;, &#39;#749f83&#39;,\n        &#39;#ca8622&#39;, &#39;#bda29a&#39;, &#39;#6e7074&#39;, &#39;#546570&#39;, &#39;#c4ccd3&#39;\n    ],\n    // ...\n});\n</code></pre>\n<p>或者,做一个简单的 <code class=\"codespan\">v4</code> 主题:</p>\n<pre><code class=\"lang-js\">var themeEC4 = {\n    color: [\n        &#39;#c23531&#39;, &#39;#2f4554&#39;, &#39;#61a0a8&#39;, &#39;#d48265&#39;, &#39;#91c7ae&#39;, &#39;#749f83&#39;,\n        &#39;#ca8622&#39;, &#39;#bda29a&#39;, &#39;#6e7074&#39;, &#39;#546570&#39;, &#39;#c4ccd3&#39;\n    ]\n};\nvar chart = echarts.init(dom, themeEC4);\nchart.setOption(/* ... */);\n</code></pre>\n<h4 id=\"-echarts\">引用 ECharts</h4>\n<h5 id=\"-default-exports-\">去除 default exports 的支持</h5>\n<p>如果使用者在 <code class=\"codespan\">v4</code> 中这样引用了 echarts:</p>\n<pre><code class=\"lang-js\">import echarts from &#39;echarts&#39;;\n// 或者按需引入\nimport echarts from &#39;echarts/lib/echarts&#39;;\n</code></pre>\n<p>这两种方式,<code class=\"codespan\">v5</code> 中不再支持了。</p>\n<p>使用者需要如下更改代码解决这个问题:</p>\n<pre><code class=\"lang-js\">import * as echarts from &#39;echarts&#39;;\n// 按需引入\nimport * as echarts from &#39;echarts/lib/echarts&#39;;\n</code></pre>\n<h5 id=\"-\">按需引入</h5>\n<p>在 5.0.1 中,我们引入了新的<a href=\"tutorial.html#%E5%9C%A8%E6%89%93%E5%8C%85%E7%8E%AF%E5%A2%83%E4%B8%AD%E4%BD%BF%E7%94%A8%20ECharts\" target=\"_blank\">按需引入接口</a></p>\n<pre><code class=\"lang-js\">import * as echarts from &#39;echarts/core&#39;;\nimport { BarChart } from &#39;echarts/charts&#39;;\nimport { GridComponent } from &#39;echarts/components&#39;;\n// 注意,新的接口中默认不再包含 Canvas 渲染器,需要显示引入,如果需要使用 SVG 渲染模式则使用 SVGRenderer\nimport { CanvasRenderer } from &#39;echarts/renderers&#39;;\n\necharts.use([BarChart, GridComponent, CanvasRenderer]);\n</code></pre>\n<p>如果之前是使用<code class=\"codespan\">import &#39;echarts/lib/chart/bar&#39;</code>引入,新的接口对应的是<code class=\"codespan\">import {BarChart} from &#39;echarts/charts&#39;</code>;</p>\n<p>为了方便大家了解自己的配置项需要引入哪些模块,我们新的示例编辑页面添加了生成按需引入代码的功能,大家可以在示例编辑页的<code class=\"codespan\">完整代码</code>标签下选中按需引入后查看需要引入的模块以及相关代码。</p>\n<p>在大部分情况下,我们都推荐大家尽可能用这套新的按需引入接口,它可以最大程度的利用打包工具 tree-shaking 的能力,并且可以有效解决命名空间冲突的问题而且防止了内部结构的暴露。如果你依旧在使用 CommonJS 的模块写法,之前的方式我们也依旧是支持的:</p>\n<pre><code class=\"lang-js\">const echarts = require(&#39;echarts/lib/echarts&#39;);\nrequire(&#39;echarts/lib/chart/bar&#39;);\nrequire(&#39;echarts/lib/component/grid&#39;);\n</code></pre>\n<p>其次,因为我们的源代码已使用 TypeScript 重写,<code class=\"codespan\">v5</code> 将不再支持从 <code class=\"codespan\">echarts/src</code> 引用文件,需要改为从<code class=\"codespan\">echarts/lib</code>引入。</p>\n<h5 id=\"-\">依赖调整</h5>\n<blockquote>\n<p>注意:该部分只针对为了保证较小的打包体积而是用按需引入接口的开发者,如果是全量引入的不需要关注</p>\n</blockquote>\n<p>为了保证 tree-shaking 后的体积足够小,我们去除了一些之前会默认被打包进来的依赖。比如前面提到的在使用新的按需引入接口的时候,<code class=\"codespan\">CanvasRenderer</code>将不再被默认引入,这样可以保证只需要使用 SVG 渲染模式的时候不会把不需要的 Canvas 渲染代码也一起打包进来,除此之外,还有下面这些依赖的改动:</p>\n<ul>\n<li>在使用折线图,柱状图中不再默认引入直角坐标系组件,因此之前使用下面的引入方式<pre><code class=\"lang-js\">const echarts = require(&#39;echarts/lib/echarts&#39;);\nrequire(&#39;echarts/lib/chart/bar&#39;);\nrequire(&#39;echarts/lib/chart/line&#39;);\n</code></pre>\n需要再单独引入<code class=\"codespan\">grid</code>组件<pre><code class=\"lang-js\">require(&#39;echarts/lib/component/grid&#39;);\n</code></pre>\n</li>\n</ul>\n<p>参考 issue:<a href=\"https://github.com/apache/echarts/issues/14080\" target=\"_blank\">#14080</a>, <a href=\"https://github.com/apache/echarts/issues/13764\" target=\"_blank\">#13764</a></p>\n<ul>\n<li>默认不再引入<code class=\"codespan\">aria</code>组件,如果需要的话可以手动引入。<pre><code class=\"lang-js\">import { AriaComponent } from &#39;echarts/components&#39;;\necharts.use(AriaComponent);\n</code></pre>\n或者:<pre><code class=\"lang-js\">require(&#39;echarts/lib/component/aria&#39;);\n</code></pre>\n</li>\n</ul>\n<h4 id=\"-geojson\">去除内置的 geoJSON</h4>\n<p><code class=\"codespan\">v5</code> 移除了内置的 geoJSON(原先在 <code class=\"codespan\">echarts/map</code> 文件夹下)。这些 geoJSON 文件本就一直来源于第三方。如果使用者仍然需要他们,可以去从老版本中得到,或者自己寻找更合适的数据然后通过 registerMap 接口注册到 ECharts 中。</p>\n<h4 id=\"-\">浏览器兼容性</h4>\n<p><code class=\"codespan\">v5</code> 不再支持 IE8 浏览器。我们不再继续维护和升级之前的 <a href=\"https://github.com/ecomfe/zrender/tree/4.3.2/src/vml\" target=\"_blank\">VML 渲染器</a> 来着实现 IE8 的兼容。如果使用者确实有很强的需求,那么欢迎提 pull request 来升级 VML 渲染器,或者单独维护一个第三方 VML 渲染器,我们从 <code class=\"codespan\">v5.0.1</code> 开始支持注册独立的渲染器了。</p>\n<h4 id=\"echarts-\">ECharts 配置项调整</h4>\n<h5 id=\"-\">视觉样式设置的优先级改变</h5>\n<p><code class=\"codespan\">v5</code> 对调了 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap 组件</a> 和 <a href=\"option.html#series-scatter.itemStyle\" target=\"_blank\">itemStyle</a> | <a href=\"option.html#series-scatter.lineStyle\" target=\"_blank\">lineStyle</a> | <a href=\"option.html#series-scatter.areaStyle\" target=\"_blank\">areaStyle</a> 的视觉样式优先级。</p>\n<p>具体来说,<code class=\"codespan\">v4</code> 中,<a href=\"option.html#visualMap\" target=\"_blank\">visualMap 组件</a> 中生成的视觉样式(如,颜色、图形类型、图形尺寸等)的优先级,比开发者在 <a href=\"option.html#series-scatter.itemStyle\" target=\"_blank\">itemStyle</a> | <a href=\"option.html#series-scatter.lineStyle\" target=\"_blank\">lineStyle</a> | <a href=\"option.html#series-scatter.areaStyle\" target=\"_blank\">areaStyle</a> 中设置的样式的优先级高,也就是说如果他们同时设置的话,前者会生效而后者不会生效。这带来了些麻烦:假如使用者在使用 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap 组件</a> 时,又想针对某个数据项对应的图形,设置 <a href=\"option.html#series-scatter.itemStyle\" target=\"_blank\">itemStyle</a> 样式,则做不到。<code class=\"codespan\">v5</code> 中于是提高了 <a href=\"option.html#series-scatter.itemStyle\" target=\"_blank\">itemStyle</a> | <a href=\"option.html#series-scatter.lineStyle\" target=\"_blank\">lineStyle</a> | <a href=\"option.html#series-scatter.areaStyle\" target=\"_blank\">areaStyle</a> 的优先级,使他们能生效。</p>\n<p>在绝大多处情况下,这个变化并不会带来什么影响。但是为保险起见,使用者在升级 <code class=\"codespan\">v4</code> 到 <code class=\"codespan\">v5</code> 时,还是可以检查下,是否有同时使用 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a> 和 <a href=\"option.html#series-scatter.itemStyle\" target=\"_blank\">itemStyle</a> | <a href=\"option.html#series-scatter.lineStyle\" target=\"_blank\">lineStyle</a> | <a href=\"option.html#series-scatter.areaStyle\" target=\"_blank\">areaStyle</a> 的情况。</p>\n<h5 id=\"-padding\">富文本的 <code class=\"codespan\">padding</code></h5>\n<p><code class=\"codespan\">v5</code> 调整了 <a href=\"option.html#series-scatter.label.rich.&lt;style_name&gt;.padding\" target=\"_blank\">rich.?.padding</a> 的格式使其更符合 CSS 的规范。<code class=\"codespan\">v4</code> 里,例如 <code class=\"codespan\">rich.?.padding: [11, 22, 33, 44]</code> 表示 <code class=\"codespan\">padding-top</code> 是 <code class=\"codespan\">33</code> 且 <code class=\"codespan\">padding-bottom</code> 是 <code class=\"codespan\">11</code>。在 <code class=\"codespan\">v5</code> 中调整了上下的位置,<code class=\"codespan\">rich.?.padding: [11, 22, 33, 44]</code> 表示  <code class=\"codespan\">padding-top</code> 是 <code class=\"codespan\">11</code> 且 <code class=\"codespan\">padding-bottom</code> 是 <code class=\"codespan\">33</code>。</p>\n<p>如果使用者有在使用 <a href=\"option.html#series-scatter.label.rich.&lt;style_name&gt;.padding\" target=\"_blank\">rich.?.padding</a>,需要注意调整下这个顺序。</p>\n<h2 id=\"echarts-\">ECharts 的相关扩展</h2>\n<p>如果想要升级到 <code class=\"codespan\">v5</code> ,下面这些扩展需要升级到最新的版本实现兼容。</p>\n<ul>\n<li><a href=\"https://github.com/ecomfe/echarts-gl\" target=\"_blank\">echarts-gl</a></li>\n<li><a href=\"https://github.com/ecomfe/echarts-wordcloud\" target=\"_blank\">echarts-wordcloud</a></li>\n<li><a href=\"https://github.com/ecomfe/echarts-liquidfill\" target=\"_blank\">echarts-liquidfill</a></li>\n</ul>\n<h2 id=\"-api\">不再推荐使用的 API</h2>\n<p>一些 API(包括接口调用,事件监听和配置项)在 <code class=\"codespan\">v5</code> 中不再推荐使用。当然,使用者仍然可以用他们,只是会在 dev 模式下,在 console 中打印一些 warning,并不会影响功能。但是从长远维护考虑,我们还是推荐升级成新的 API。</p>\n<p>下面是不再推荐使用的 API 以及推荐的新 API:</p>\n<ul>\n<li>图形元素 transform 相关的属性被改变了:<ul>\n<li>变更点:<ul>\n<li><code class=\"codespan\">position: [number, number]</code> 改为 <code class=\"codespan\">x: number</code> / <code class=\"codespan\">y: number</code>。</li>\n<li><code class=\"codespan\">scale: [number, number]</code> 改为 <code class=\"codespan\">scaleX: number</code> / <code class=\"codespan\">scaleY: number</code>。</li>\n<li><code class=\"codespan\">origin: [number, number]</code> 改为 <code class=\"codespan\">originX: number</code> / <code class=\"codespan\">originY: number</code>。</li>\n</ul>\n</li>\n<li><code class=\"codespan\">position</code>、<code class=\"codespan\">scale</code> 和 <code class=\"codespan\">origin</code> 仍然支持,但已不推荐使用。</li>\n<li>它影响到这些地方:<ul>\n<li>在<code class=\"codespan\">graphic</code>组件中:每个元素的声明。</li>\n<li>在 <code class=\"codespan\">custom series</code> 中:<code class=\"codespan\">renderItem</code> 返回的每个元素的声明。</li>\n<li>直接使用 zrender 图形元素时。</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Text 相关的属性被改变:<ul>\n<li>变更点:<ul>\n<li>图形元素附带的文本的声明方式被改变:<ul>\n<li>除了 <code class=\"codespan\">Text</code> 元素之外,其他元素中的属性 <code class=\"codespan\">style.text</code> 都不推荐使用了。取而代之的是新属性 <code class=\"codespan\">textContent</code> 和 <code class=\"codespan\">textConfig</code>,他们能带来更丰富的功能。</li>\n<li>其中,下面左边部分的这些属性已不推荐使用或废弃。请使用下面的右边部分的属性:<ul>\n<li>textPosition =&gt; textConfig.position</li>\n<li>textOffset =&gt; textConfig.offset</li>\n<li>textRotation =&gt; textConfig.rotation</li>\n<li>textDistance =&gt; textConfig.distance</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>下面左边部分的属性在 <code class=\"codespan\">style</code> 和 <code class=\"codespan\">style.rich.?</code> 中已不推荐使用或废弃。请使用下面右边的属性:<ul>\n<li>textFill =&gt; fill</li>\n<li>textStroke =&gt; stroke</li>\n<li>textFont =&gt; font</li>\n<li>textStrokeWidth =&gt; lineWidth</li>\n<li>textAlign =&gt; align</li>\n<li>textVerticalAlign =&gt; verticalAlign</li>\n<li>textLineHeight =&gt;</li>\n<li>textWidth =&gt; width</li>\n<li>textHeight =&gt; hight</li>\n<li>textBackgroundColor =&gt; backgroundColor</li>\n<li>textPadding =&gt; padding</li>\n<li>textBorderColor =&gt; borderColor</li>\n<li>textBorderWidth =&gt; borderWidth</li>\n<li>textBorderRadius =&gt; borderRadius</li>\n<li>textBoxShadowColor =&gt; shadowColor</li>\n<li>textBoxShadowBlur =&gt; shadowBlur</li>\n<li>textBoxShadowOffsetX =&gt; shadowOffsetX</li>\n<li>textBoxShadowOffsetY =&gt; shadowOffsetY</li>\n</ul>\n</li>\n<li>注:这些属性并没有变化:<ul>\n<li>textShadowColor</li>\n<li>textShadowBlur</li>\n<li>textShadowOffsetX</li>\n<li>textShadowOffsetY</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>它影响到这些地方:<ul>\n<li>在 <code class=\"codespan\">graphic</code> 组件中:每个元素的声明。(原来的写法仍兼容,但在一些很复杂的情况下,可能效果不完全一致。)</li>\n<li>在自定义系列(<code class=\"codespan\">custom series</code>)中:<code class=\"codespan\">renderItem</code> 返回中的每个元素的声明。(原来的写法仍兼容,但在一些很复杂的情况下,可能效果不完全一致。)</li>\n<li>直接使用 zrender API 创建图形元素。(不再兼容,原写法被废弃。)</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>图表实例上的 API:<ul>\n<li><code class=\"codespan\">chart.one(...)</code> 已不推荐使用。</li>\n</ul>\n</li>\n<li><code class=\"codespan\">label</code>。<ul>\n<li>属性 <code class=\"codespan\">color</code>、<code class=\"codespan\">textBorderColor</code>、<code class=\"codespan\">backgroundColor</code>、<code class=\"codespan\">borderColor</code> 中,值 <code class=\"codespan\">auto</code> 已不推荐使用,而推荐使用 <code class=\"codespan\">&#39;inherit&#39;</code> 代替。</li>\n</ul>\n</li>\n<li><code class=\"codespan\">hoverAnimation</code>:<ul>\n<li>选项 <code class=\"codespan\">series.hoverAnimation</code> 已不推荐使用,使用 <code class=\"codespan\">series.emphasis.scale</code> 代替之。</li>\n</ul>\n</li>\n<li>折线图(<code class=\"codespan\">line series</code>):<ul>\n<li>选项 <code class=\"codespan\">series.clipOverflow</code> 已不推荐使用,使用 <code class=\"codespan\">series.clip</code> 代替之。</li>\n</ul>\n</li>\n<li>自定义系列(<code class=\"codespan\">custom series</code>)。<ul>\n<li>在 <code class=\"codespan\">renderItem</code> 中,<code class=\"codespan\">api.style(...)</code> 和 <code class=\"codespan\">api.styleEmphasis(...)</code> 已不推荐使用。因为这两个接口其实并不真正必要,也很难保证向后兼容。用户可以通过 <code class=\"codespan\">api.visual(...)</code> 获取系统自动分配的视觉信息。</li>\n</ul>\n</li>\n<li>旭日图(<code class=\"codespan\">sunburst</code>):<ul>\n<li>动作类型 <code class=\"codespan\">highlight</code> 已被弃用,请使用 <code class=\"codespan\">sunburstHighlight</code> 代替。</li>\n<li>动作类型 <code class=\"codespan\">downplay</code> 已被弃用,请使用 <code class=\"codespan\">sunburstUnhighlight</code> 代替。</li>\n<li>选项 <code class=\"codespan\">series.downplay</code> 已被弃用,请使用 <code class=\"codespan\">series.blur</code> 代替。</li>\n<li>选项 <code class=\"codespan\">series.highlightPolicy</code> 已不适用,请使用 <code class=\"codespan\">series.emphasis.focus</code> 代替。</li>\n</ul>\n</li>\n<li>饼图(<code class=\"codespan\">pie</code>):<ul>\n<li>下面左边部分的 action 名已经不推荐使用。请使用右边的 action 名。<ul>\n<li><code class=\"codespan\">pieToggleSelect</code> =&gt; <code class=\"codespan\">toggleSelect</code>。</li>\n<li><code class=\"codespan\">pieSelect</code> =&gt; <code class=\"codespan\">select</code>。</li>\n<li><code class=\"codespan\">pieUnSelect</code> =&gt; <code class=\"codespan\">unselect</code>。</li>\n</ul>\n</li>\n<li>下面左边部分的事件名已经不推荐使用。请使用右边的事件名。<ul>\n<li><code class=\"codespan\">pieselectchanged</code> =&gt; <code class=\"codespan\">selectchanged</code>。</li>\n<li><code class=\"codespan\">pieselected</code> =&gt; <code class=\"codespan\">selected</code>。</li>\n<li><code class=\"codespan\">pieunselected</code> =&gt; <code class=\"codespan\">unselected</code>。</li>\n</ul>\n</li>\n<li>选项 <code class=\"codespan\">series.label.margin</code> 已经不推荐使用。使用 <code class=\"codespan\">series.label.edgeDistance</code> 代替。</li>\n<li>选项 <code class=\"codespan\">series.clockWise</code> 已经不推荐使用。使用 <code class=\"codespan\">series.clockwise</code> 代替。</li>\n<li>选项 <code class=\"codespan\">series.hoverOffset</code> 已经不推荐使用。使用 <code class=\"codespan\">series.emphasis.scaleSize</code> 代替。</li>\n</ul>\n</li>\n<li>地图(<code class=\"codespan\">map series</code>):<ul>\n<li>下文左边部分的 action 名已经不推荐使用。请使用右边的 action 名。<ul>\n<li><code class=\"codespan\">mapToggleSelect</code> =&gt; <code class=\"codespan\">toggleSelect</code>。</li>\n<li><code class=\"codespan\">mapSelect</code> =&gt; <code class=\"codespan\">select</code>。</li>\n<li><code class=\"codespan\">mapUnSelect</code> =&gt; <code class=\"codespan\">unselect</code>。</li>\n</ul>\n</li>\n<li>下面左边部分的事件名已经不推荐使用。请使用右边的事件名。<ul>\n<li><code class=\"codespan\">mapselectchanged</code> =&gt; <code class=\"codespan\">selectchanged</code>。</li>\n<li><code class=\"codespan\">mapselected</code> =&gt; <code class=\"codespan\">selected</code>。</li>\n<li><code class=\"codespan\">mapunselected</code> =&gt; <code class=\"codespan\">unselected</code>。</li>\n</ul>\n</li>\n<li>选项 <code class=\"codespan\">series.mapType</code> 已经不推荐使用。使用 <code class=\"codespan\">series.map</code> 代替。</li>\n<li>选项 <code class=\"codespan\">series.mapLocation</code> 已经不推荐使用。</li>\n</ul>\n</li>\n<li>关系图(<code class=\"codespan\">graph series</code>):<ul>\n<li>选项 <code class=\"codespan\">series.focusNodeAdjacency</code> 已经不推荐使用。使用 <code class=\"codespan\">series.emphasis: { focus: &#39;adjacency&#39;}</code> 代替。</li>\n</ul>\n</li>\n<li>仪表盘(<code class=\"codespan\">gauge series</code>):<ul>\n<li>选项 <code class=\"codespan\">series.clockWise</code> 已经不推荐使用。使用 <code class=\"codespan\">series.clockwise</code> 代替。</li>\n<li>选项 <code class=\"codespan\">series.hoverOffset</code> 已经不推荐使用。使用 <code class=\"codespan\">series.emphasis.scaleSize</code> 代替。</li>\n</ul>\n</li>\n<li><code class=\"codespan\">dataZoom</code> 组件:<ul>\n<li>选项 <code class=\"codespan\">dataZoom.handleIcon</code> 如果使用 <code class=\"codespan\">SVGPath</code>,需要前缀 <code class=\"codespan\">path://</code>。</li>\n</ul>\n</li>\n<li>雷达图(<code class=\"codespan\">radar</code>):<ul>\n<li>选项 <code class=\"codespan\">radar.name</code> 已经不推荐使用。使用 <code class=\"codespan\">radar.axisName</code> 代替。</li>\n<li>选项 <code class=\"codespan\">radar.nameGap</code> 已经不推荐使用。使用 <code class=\"codespan\">radar.axisNameGap</code> 代替。</li>\n</ul>\n</li>\n<li>Parse and format:<ul>\n<li><code class=\"codespan\">echarts.format.formatTime</code> 已经不推荐使用。使用 <code class=\"codespan\">echarts.time.format</code> 代替。</li>\n<li><code class=\"codespan\">echarts.number.parseDate</code> 已经不推荐使用。使用 <code class=\"codespan\">echarts.time.parse</code> 代替。</li>\n<li><code class=\"codespan\">echarts.format.getTextRect</code> 已经不推荐使用。</li>\n</ul>\n</li>\n</ul>\n"},"在打包环境中使用 ECharts":{"type":["*"],"description":"<p>假如你的开发环境使用了<code class=\"codespan\">npm</code>或者<code class=\"codespan\">yarn</code>等包管理工具,并且使用 Webpack 等打包工具进行构建,本文将会介绍如何引入 Apache ECharts<sup>TM</sup> 并通过 treeshaking 只打包需要的模块。</p>\n<h2 id=\"npm-echarts\">NPM 安装 ECharts</h2>\n<p>你可以使用如下命令通过 npm 安装 ECharts</p>\n<pre><code class=\"lang-shell\">npm install echarts --save\n</code></pre>\n<h2 id=\"-echarts\">引入 ECharts</h2>\n<pre><code class=\"lang-js\">import * as echarts from &#39;echarts&#39;;\n\n// 基于准备好的dom,初始化echarts实例\nvar myChart = echarts.init(document.getElementById(&#39;main&#39;));\n// 绘制图表\nmyChart.setOption({\n    title: {\n        text: &#39;ECharts 入门示例&#39;\n    },\n    tooltip: {},\n    xAxis: {\n        data: [&#39;衬衫&#39;, &#39;羊毛衫&#39;, &#39;雪纺衫&#39;, &#39;裤子&#39;, &#39;高跟鞋&#39;, &#39;袜子&#39;]\n    },\n    yAxis: {},\n    series: [{\n        name: &#39;销量&#39;,\n        type: &#39;bar&#39;,\n        data: [5, 20, 36, 10, 10, 20]\n    }]\n});\n</code></pre>\n<h2 id=\"-echarts-\">按需引入 ECharts 图表和组件</h2>\n<p>上面的代码会引入所有 ECharts 中所有的图表和组件,但是假如你不想引入所有组件,也可以使用 ECharts 提供的按需引入的接口来打包必须的组件。</p>\n<pre><code class=\"lang-js\">// 引入 echarts 核心模块,核心模块提供了 echarts 使用必须要的接口。\nimport * as echarts from &#39;echarts/core&#39;;\n// 引入柱状图图表,图表后缀都为 Chart\nimport {\n    BarChart\n} from &#39;echarts/charts&#39;;\n// 引入提示框,标题,直角坐标系组件,组件后缀都为 Component\nimport {\n    TitleComponent,\n    TooltipComponent,\n    GridComponent\n} from &#39;echarts/components&#39;;\n// 引入 Canvas 渲染器,注意引入 CanvasRenderer 或者 SVGRenderer 是必须的一步\nimport {\n    CanvasRenderer\n} from &#39;echarts/renderers&#39;;\n\n// 注册必须的组件\necharts.use(\n    [TitleComponent, TooltipComponent, GridComponent, BarChart, CanvasRenderer]\n);\n\n// 接下来的使用就跟之前一样,初始化图表,设置配置项\nvar myChart = echarts.init(document.getElementById(&#39;main&#39;));\nmyChart.setOption({\n    ...\n});\n</code></pre>\n<blockquote>\n<p>需要注意的是注意为了保证打包的体积是最小的,ECharts 按需引入的时候不再提供任何渲染器,所以需要选择引入<code class=\"codespan\">CanvasRenderer</code>或者<code class=\"codespan\">SVGRenderer</code>作为渲染器。这样的好处是假如你只需要使用 svg 渲染模式,打包的结果中就不会再包含无需使用的<code class=\"codespan\">CanvasRenderer</code>模块。</p>\n</blockquote>\n<p>我们在示例编辑页的“完整代码”标签提供了非常方便的生成按需引入代码的功能。这个功能会根据当前的配置项动态生成最小的按需引入的代码。你可以直接在你的项目中使用。</p>\n<h2 id=\"-typescript-\">在 TypeScript 中按需引入</h2>\n<p>对于使用了 TypeScript 来开发 ECharts 的开发者,我们提供了类型接口来组合出最小的<code class=\"codespan\">EChartsOption</code>类型。这个更严格的类型可以有效帮助你检查出是否少加载了组件或者图表。</p>\n<pre><code class=\"lang-ts\">import * as echarts from &#39;echarts/core&#39;;\nimport {\n    BarChart,\n    // 系列类型的定义后缀都为 SeriesOption\n    BarSeriesOption,\n    LineChart,\n    LineSeriesOption\n} from &#39;echarts/charts&#39;;\nimport {\n    TitleComponent,\n    // 组件类型的定义后缀都为 ComponentOption\n    TitleComponentOption,\n    GridComponent,\n    GridComponentOption\n} from &#39;echarts/components&#39;;\nimport {\n    CanvasRenderer\n} from &#39;echarts/renderers&#39;;\n\n// 通过 ComposeOption 来组合出一个只有必须组件和图表的 Option 类型\ntype ECOption = echarts.ComposeOption&lt;\n  BarSeriesOption | LineSeriesOption | TitleComponentOption | GridComponentOption\n&gt;;\n\n// 注册必须的组件\necharts.use(\n    [TitleComponent, TooltipComponent, GridComponent, BarChart, CanvasRenderer]\n);\n\nvar option: ECOption = {\n    ...\n}\n</code></pre>\n"},"ECharts 基础概念概览":{"type":["*"],"description":"<p>本文介绍 Apache ECharts<sup>TM</sup> 最基本的名词和概念。</p>\n<h2 id=\"echarts-\">echarts 实例</h2>\n<p>一个网页中可以创建多个 <code class=\"codespan\">echarts 实例</code>。每个 <code class=\"codespan\">echarts 实例</code> 中可以创建多个图表和坐标系等等(用 <code class=\"codespan\">option</code> 来描述)。准备一个 DOM 节点(作为 echarts 的渲染容器),就可以在上面创建一个 echarts 实例。每个 echarts 实例独占一个 DOM 节点。</p>\n<p><br></p>\n<p><img width=\"500\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/multiple-ec-instance.jpg\"></p>\n<h2 id=\"-series-\">系列(series)</h2>\n<p><code class=\"codespan\">系列</code>(<a href=\"option.html#series\" target=\"_blank\">series</a>)是很常见的名词。在 echarts 里,<code class=\"codespan\">系列</code>(<a href=\"option.html#series\" target=\"_blank\">series</a>)是指:一组数值以及他们映射成的图。“系列”这个词原本可能来源于“一系列的数据”,而在 echarts 中取其扩展的概念,不仅表示数据,也表示数据映射成为的图。所以,一个 <code class=\"codespan\">系列</code> 包含的要素至少有:一组数值、图表类型(<code class=\"codespan\">series.type</code>)、以及其他的关于这些数据如何映射成图的参数。</p>\n<p>echarts 里系列类型(<code class=\"codespan\">series.type</code>)就是图表类型。系列类型(<code class=\"codespan\">series.type</code>)至少有:<a href=\"option.html#series-line\" target=\"_blank\">line</a>(折线图)、<a href=\"option.html#series-bar\" target=\"_blank\">bar</a>(柱状图)、<a href=\"option.html#series-pie\" target=\"_blank\">pie</a>(饼图)、<a href=\"option.html#series-scatter\" target=\"_blank\">scatter</a>(散点图)、<a href=\"option.html#series-graph\" target=\"_blank\">graph</a>(关系图)、<a href=\"option.html#series-tree\" target=\"_blank\">tree</a>(树图)、...</p>\n<p>如下图,右侧的 <code class=\"codespan\">option</code> 中声明了三个 <code class=\"codespan\">系列</code>(<a href=\"option.html#series\" target=\"_blank\">series</a>):<a href=\"option.html#series-pie\" target=\"_blank\">pie</a>(饼图系列)、<a href=\"option.html#series-line\" target=\"_blank\">line</a>(折线图系列)、<a href=\"option.html#series-bar\" target=\"_blank\">bar</a>(柱状图系列),每个系列中有他所需要的数据(<a href=\"option.html#series.data\" target=\"_blank\">series.data</a>)。</p>\n<p><br></p>\n<p><img width=\"700\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/series-all-a.jpg\"></p>\n<p><br></p>\n<p>类同地,下图中是另一种配置方式,系列的数据从 <a href=\"option.html#dataset\" target=\"_blank\">dataset</a> 中取:</p>\n<p><br></p>\n<p><img width=\"600\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/series-all-b.jpg\"></p>\n<h2 id=\"-component-\">组件(component)</h2>\n<p>在系列之上,echarts 中各种内容,被抽象为“组件”。例如,echarts 中至少有这些组件:<a href=\"option.html#xAxis\" target=\"_blank\">xAxis</a>(直角坐标系 X 轴)、<a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a>(直角坐标系 Y 轴)、<a href=\"option.html#grid\" target=\"_blank\">grid</a>(直角坐标系底板)、<a href=\"option.html#angleAxis\" target=\"_blank\">angleAxis</a>(极坐标系角度轴)、<a href=\"option.html#radiusAxis\" target=\"_blank\">radiusAxis</a>(极坐标系半径轴)、<a href=\"option.html#polar\" target=\"_blank\">polar</a>(极坐标系底板)、<a href=\"option.html#geo\" target=\"_blank\">geo</a>(地理坐标系)、<a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a>(数据区缩放组件)、<a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a>(视觉映射组件)、<a href=\"option.html#tooltip\" target=\"_blank\">tooltip</a>(提示框组件)、<a href=\"option.html#toolbox\" target=\"_blank\">toolbox</a>(工具栏组件)、<a href=\"option.html#series\" target=\"_blank\">series</a>(系列)、...</p>\n<p>我们注意到,其实系列(<a href=\"option.html#series\" target=\"_blank\">series</a>)也是一种组件,可以理解为:系列是专门绘制“图”的组件。</p>\n<p>如下图,右侧的 <code class=\"codespan\">option</code> 中声明了各个组件(包括系列),各个组件就出现在图中。</p>\n<p><br></p>\n<p><img width=\"800\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/components.jpg\"></p>\n<p><br></p>\n<p>注:因为系列是一种特殊的组件,所以有时候也会出现 “组件和系列” 这样的描述,这种语境下的 “组件” 是指:除了 “系列” 以外的其他组件。</p>\n<h2 id=\"-option-\">用 option 描述图表</h2>\n<p>上面已经出现了 <code class=\"codespan\">option</code> 这个概念。echarts 的使用者,使用 <code class=\"codespan\">option</code> 来描述其对图表的各种需求,包括:有什么数据、要画什么图表、图表长什么样子、含有什么组件、组件能操作什么事情等等。简而言之,<code class=\"codespan\">option</code> 表述了:<code class=\"codespan\">数据</code>、<code class=\"codespan\">数据如何映射成图形</code>、<code class=\"codespan\">交互行为</code>。</p>\n<pre><code class=\"lang-js\">// 创建 echarts 实例。\nvar dom = document.getElementById(&#39;dom-id&#39;);\nvar chart = echarts.init(dom);\n\n// 用 option 描述 `数据`、`数据如何映射成图形`、`交互行为` 等。\n// option 是个大的 JavaScript 对象。\nvar option = {\n    // option 每个属性是一类组件。\n    legend: {...},\n    grid: {...},\n    tooltip: {...},\n    toolbox: {...},\n    dataZoom: {...},\n    visualMap: {...},\n    // 如果有多个同类组件,那么就是个数组。例如这里有三个 X 轴。\n    xAxis: [\n        // 数组每项表示一个组件实例,用 type 描述“子类型”。\n        {type: &#39;category&#39;, ...},\n        {type: &#39;category&#39;, ...},\n        {type: &#39;value&#39;, ...}\n    ],\n    yAxis: [{...}, {...}],\n    // 这里有多个系列,也是构成一个数组。\n    series: [\n        // 每个系列,也有 type 描述“子类型”,即“图表类型”。\n        {type: &#39;line&#39;, data: [[&#39;AA&#39;, 332], [&#39;CC&#39;, 124], [&#39;FF&#39;, 412], ... ]},\n        {type: &#39;line&#39;, data: [2231, 1234, 552, ... ]},\n        {type: &#39;line&#39;, data: [[4, 51], [8, 12], ... ]}\n    }]\n};\n\n// 调用 setOption 将 option 输入 echarts,然后 echarts 渲染图表。\nchart.setOption(option);\n</code></pre>\n<p>系列里的 <a href=\"option.html#series.data\" target=\"_blank\">series.data</a> 是本系列的数据。而另一种描述方式,系列数据从 <a href=\"option.html#dataset\" target=\"_blank\">dataset</a> 中取:</p>\n<pre><code class=\"lang-js\">var option = {\n    dataset: {\n        source: [\n            [121, &#39;XX&#39;, 442, 43.11],\n            [663, &#39;ZZ&#39;, 311, 91.14],\n            [913, &#39;ZZ&#39;, 312, 92.12],\n            ...\n        ]\n    },\n    xAxis: {},\n    yAxis: {},\n    series: [\n        // 数据从 dataset 中取,encode 中的数值是 dataset.source 的维度 index (即第几列)\n        {type: &#39;bar&#39;, encode: {x: 1, y: 0}},\n        {type: &#39;bar&#39;, encode: {x: 1, y: 2}},\n        {type: &#39;scatter&#39;, encode: {x: 1, y: 3}},\n        ...\n    ]\n};\n</code></pre>\n<h2 id=\"-\">组件的定位</h2>\n<p>不同的组件、系列,常有不同的定位方式。</p>\n<p><br></p>\n<p><strong>[类 CSS 的绝对定位]</strong></p>\n<p><br></p>\n<p>多数组件和系列,都能够基于 <code class=\"codespan\">top</code> / <code class=\"codespan\">right</code> / <code class=\"codespan\">down</code> / <code class=\"codespan\">left</code> / <code class=\"codespan\">width</code> / <code class=\"codespan\">height</code> 绝对定位。\n这种绝对定位的方式,类似于 <code class=\"codespan\">CSS</code> 的绝对定位(<code class=\"codespan\">position: absolute</code>)。绝对定位基于的是 echarts 容器 DOM 节点。</p>\n<p>其中,他们每个值都可以是:</p>\n<ul>\n<li>绝对数值(例如 <code class=\"codespan\">bottom: 54</code> 表示:距离 echarts 容器底边界 <code class=\"codespan\">54</code> 像素)。</li>\n<li>或者基于 echarts 容器高宽的百分比(例如 <code class=\"codespan\">right: &#39;20%&#39;</code> 表示:距离 echarts 容器右边界的距离是 echarts 容器宽度的 <code class=\"codespan\">20%</code>)。</li>\n</ul>\n<p>如下图的例子,对 <a href=\"option.html#grid\" target=\"_blank\">grid</a> 组件(也就是直角坐标系的底板)设置 <code class=\"codespan\">left</code>、<code class=\"codespan\">right</code>、<code class=\"codespan\">height</code>、<code class=\"codespan\">bottom</code> 达到的效果。</p>\n<p><br></p>\n<p><img width=\"800\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/locate.jpg\"></p>\n<p><br></p>\n<p>我们可以注意到,<code class=\"codespan\">left</code> <code class=\"codespan\">right</code> <code class=\"codespan\">width</code> 是一组(横向)、<code class=\"codespan\">top</code> <code class=\"codespan\">bottom</code> <code class=\"codespan\">height</code> 是另一组(纵向)。这两组没有什么关联。每组中,至多设置两项就可以了,第三项会被自动算出。例如,设置了 <code class=\"codespan\">left</code> 和 <code class=\"codespan\">right</code> 就可以了,<code class=\"codespan\">width</code> 会被自动算出。</p>\n<p><br></p>\n<p><strong>[中心半径定位]</strong></p>\n<p><br></p>\n<p>少数圆形的组件或系列,可以使用“中心半径定位”,例如,<a href=\"option.html#series-pie\" target=\"_blank\">pie</a>(饼图)、<a href=\"option.html#series-sunburst\" target=\"_blank\">sunburst</a>(旭日图)、<a href=\"option.html#polar\" target=\"_blank\">polar</a>(极坐标系)。</p>\n<p>中心半径定位,往往依据 <a href=\"option.html#series-pie.center\" target=\"_blank\">center</a>(中心)、<a href=\"option.html#series-pie.radius\" target=\"_blank\">radius</a>(半径)来决定位置。</p>\n<p><br></p>\n<p><strong>[其他定位]</strong></p>\n<p><br></p>\n<p>少数组件和系列可能有自己的特殊的定位方式。在他们的文档中会有说明。</p>\n<h2 id=\"-\">坐标系</h2>\n<p>很多系列,例如 <a href=\"option.html#series-line\" target=\"_blank\">line</a>(折线图)、<a href=\"option.html#series-bar\" target=\"_blank\">bar</a>(柱状图)、<a href=\"option.html#series-scatter\" target=\"_blank\">scatter</a>(散点图)、<a href=\"option.html#series-heatmap\" target=\"_blank\">heatmap</a>(热力图)等等,需要运行在 “坐标系” 上。坐标系用于布局这些图,以及显示数据的刻度等等。例如 echarts 中至少支持这些坐标系:<a href=\"option.html#grid\" target=\"_blank\">直角坐标系</a>、<a href=\"option.html#polar\" target=\"_blank\">极坐标系</a>、<a href=\"option.html#geo\" target=\"_blank\">地理坐标系(GEO)</a>、<a href=\"option.html#singleAxis\" target=\"_blank\">单轴坐标系</a>、<a href=\"option.html#calendar\" target=\"_blank\">日历坐标系</a> 等。其他一些系列,例如 <a href=\"option.html#series-pie\" target=\"_blank\">pie</a>(饼图)、<a href=\"option.html#series-tree\" target=\"_blank\">tree</a>(树图)等等,并不依赖坐标系,能独立存在。还有一些图,例如 <a href=\"option.html#series-graph\" target=\"_blank\">graph</a>(关系图)等,既能独立存在,也能布局在坐标系中,依据用户的设定而来。</p>\n<p>一个坐标系,可能由多个组件协作而成。我们以最常见的直角坐标系来举例。直角坐标系中,包括有 <a href=\"option.html#xAxis\" target=\"_blank\">xAxis</a>(直角坐标系 X 轴)、<a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a>(直角坐标系 Y 轴)、<a href=\"option.html#grid\" target=\"_blank\">grid</a>(直角坐标系底板)三种组件。<code class=\"codespan\">xAxis</code>、<code class=\"codespan\">yAxis</code> 被 <code class=\"codespan\">grid</code> 自动引用并组织起来,共同工作。</p>\n<p>我们来看下图,这是最简单的使用直角坐标系的方式:只声明了 <code class=\"codespan\">xAxis</code>、<code class=\"codespan\">yAxis</code> 和一个 <code class=\"codespan\">scatter</code>(散点图系列),echarts 暗自为他们创建了 <code class=\"codespan\">grid</code> 并关联起他们:</p>\n<p><br></p>\n<p><img width=\"450\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/coord-sys-0.jpg\"></p>\n<p><br></p>\n<p>再来看下图,两个 <code class=\"codespan\">yAxis</code>,共享了一个 <code class=\"codespan\">xAxis</code>。两个 <code class=\"codespan\">series</code>,也共享了这个 <code class=\"codespan\">xAxis</code>,但是分别使用不同的 <code class=\"codespan\">yAxis</code>,使用 <a href=\"option.html#series-line.yAxisIndex\" target=\"_blank\">yAxisIndex</a> 来指定它自己使用的是哪个 <code class=\"codespan\">yAxis</code>:</p>\n<p><br></p>\n<p><img width=\"600\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/coord-sys-1.jpg\"></p>\n<p><br></p>\n<p>再来看下图,一个 echarts 实例中,有多个 <code class=\"codespan\">grid</code>,每个 <code class=\"codespan\">grid</code> 分别有 <code class=\"codespan\">xAxis</code>、<code class=\"codespan\">yAxis</code>,他们使用 <code class=\"codespan\">xAxisIndex</code>、<code class=\"codespan\">yAxisIndex</code>、<code class=\"codespan\">gridIndex</code> 来指定引用关系:</p>\n<p><br></p>\n<p><img width=\"600\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/coord-sys-2.jpg\"></p>\n<p><br></p>\n<p>另外,一个系列,往往能运行在不同的坐标系中。例如,一个 <a href=\"option.html#series-scatter\" target=\"_blank\">scatter</a>(散点图)能运行在 <a href=\"option.html#grid\" target=\"_blank\">直角坐标系</a>、<a href=\"option.html#polar\" target=\"_blank\">极坐标系</a> 、<a href=\"option.html#geo\" target=\"_blank\">地理坐标系(GEO)</a> 等各种坐标系中。同样,一个坐标系,也能承载不同的系列,如上面出现的各种例子,<a href=\"option.html#grid\" target=\"_blank\">直角坐标系</a> 里承载了 <a href=\"option.html#series-line\" target=\"_blank\">line</a>(折线图)、<a href=\"option.html#series-bar\" target=\"_blank\">bar</a>(柱状图)等等。</p>\n"},"个性化图表的样式":{"type":["*"],"description":"<p>Apache ECharts<sup>TM</sup> 提供了丰富的自定义配置选项,并且能够从全局、系列、数据三个层级去设置数据图形的样式。下面我们来看如何使用 ECharts 实现下面这个南丁格尔图:</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=\"-\">绘制南丁格尔图</h2>\n<p><a href=\"#5%20%E5%88%86%E9%92%9F%E4%B8%8A%E6%89%8B%20ECharts\">5分钟上手ECharts</a> 中讲了如何绘制一个简单的柱状图,这次要画的是饼图,饼图主要是通过扇形的弧度表现不同类目的数据在总和中的占比,它的数据格式比柱状图更简单,只有一维的数值,不需要给类目。因为不在直角坐标系上,所以也不需要<code class=\"codespan\">xAxis</code>,<code class=\"codespan\">yAxis</code>。</p>\n<pre><code class=\"lang-js\">myChart.setOption({\n    series : [\n        {\n            name: &#39;访问来源&#39;,\n            type: &#39;pie&#39;,\n            radius: &#39;55%&#39;,\n            data:[\n                {value:235, name:&#39;视频广告&#39;},\n                {value:274, name:&#39;联盟广告&#39;},\n                {value:310, name:&#39;邮件营销&#39;},\n                {value:335, name:&#39;直接访问&#39;},\n                {value:400, name:&#39;搜索引擎&#39;}\n            ]\n        }\n    ]\n})\n</code></pre>\n<p>上面代码就能画出一个简单的饼图:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/tutorial-styling-step0&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<p>这里<code class=\"codespan\">data</code>属性值不像入门教程里那样每一项都是单个数值,而是一个包含 <code class=\"codespan\">name</code> 和 <code class=\"codespan\">value</code> 属性的对象,ECharts 中的数据项都是既可以只设成数值,也可以设成一个包含有名称、该数据图形的样式配置、标签配置的对象,具体见 <a href=\"option.html#series-pie.data\" target=\"_blank\">data</a> 文档。</p>\n<p>ECharts 中的<a href=\"option.html#series-pie\" target=\"_blank\">饼图</a>也支持通过设置 <a href=\"option.html#series-pie.roseType\" target=\"_blank\">roseType</a> 显示成南丁格尔图。</p>\n<pre><code class=\"lang-js\">roseType: &#39;angle&#39;\n</code></pre>\n<p>南丁格尔图会通过半径表示数据的大小。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/tutorial-styling-step1&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<h2 id=\"-\">阴影的配置</h2>\n<p>ECharts 中有一些通用的样式,诸如阴影、透明度、颜色、边框颜色、边框宽度等,这些样式一般都会在系列的 <a href=\"#series-pie.itemStyle\">itemStyle</a> 里设置。例如阴影的样式可以通过下面几个配置项设置:</p>\n<pre><code class=\"lang-js\">itemStyle: {\n    // 阴影的大小\n    shadowBlur: 200,\n    // 阴影水平方向上的偏移\n    shadowOffsetX: 0,\n    // 阴影垂直方向上的偏移\n    shadowOffsetY: 0,\n    // 阴影颜色\n    shadowColor: &#39;rgba(0, 0, 0, 0.5)&#39;\n}\n</code></pre>\n<p>加上阴影后的效果:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/tutorial-styling-step2&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<p><code class=\"codespan\">itemStyle</code>的<code class=\"codespan\">emphasis</code>是鼠标 hover 时候的高亮样式。这个示例里是正常的样式下加阴影,但是可能更多的时候是 hover 的时候通过阴影突出。</p>\n<pre><code class=\"lang-js\">itemStyle: {\n    emphasis: {\n        shadowBlur: 200,\n        shadowColor: &#39;rgba(0, 0, 0, 0.5)&#39;\n    }\n}\n</code></pre>\n<h2 id=\"-\">深色背景和浅色标签</h2>\n<p>现在我们需要把整个主题改成开始的示例中那样的深色主题,这就需要改背景色和文本颜色。</p>\n<p>背景色是全局的,所以直接在 option 下设置 <a href=\"option.html#backgroundColor\" target=\"_blank\">backgroundColor</a></p>\n<pre><code class=\"lang-js\">setOption({\n    backgroundColor: &#39;#2c343c&#39;\n})\n</code></pre>\n<p>文本的样式可以设置全局的 <a href=\"option.html#textStyle\" target=\"_blank\">textStyle</a>。</p>\n<pre><code class=\"lang-js\">setOption({\n    textStyle: {\n        color: &#39;rgba(255, 255, 255, 0.3)&#39;\n    }\n})\n</code></pre>\n<p>也可以每个系列分别设置,每个系列的文本设置在 <a href=\"option.html#series-pie.label.textStyle\" target=\"_blank\">label.textStyle</a>。</p>\n<pre><code class=\"lang-js\">label: {\n    textStyle: {\n        color: &#39;rgba(255, 255, 255, 0.3)&#39;\n    }\n}\n</code></pre>\n<p>饼图的话还要将标签的视觉引导线的颜色设为浅色。</p>\n<pre><code class=\"lang-js\">labelLine: {\n    lineStyle: {\n        color: &#39;rgba(255, 255, 255, 0.3)&#39;\n    }\n}\n</code></pre>\n<p>如下:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/tutorial-styling-step3&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<p>跟<code class=\"codespan\">itemStyle</code>一样,<code class=\"codespan\">label</code>和<code class=\"codespan\">labelLine</code>的样式也有<code class=\"codespan\">emphasis</code>状态。</p>\n<h2 id=\"-\">设置扇形的颜色</h2>\n<p>扇形的颜色也是在 itemStyle 中设置:</p>\n<pre><code class=\"lang-js\">itemStyle: {\n    // 设置扇形的颜色\n    color: &#39;#c23531&#39;,\n    shadowBlur: 200,\n    shadowColor: &#39;rgba(0, 0, 0, 0.5)&#39;\n}\n</code></pre>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/tutorial-styling-step4&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<p>跟我们要实现的效果已经挺像了,除了每个扇形的颜色,效果中阴影下面的扇形颜色更深,有种光线被遮住的感觉,从而会出现层次感和空间感。</p>\n<p>ECharts 中每个扇形颜色的可以通过分别设置 data 下的数据项实现。</p>\n<pre><code class=\"lang-js\">data: [{\n    value:400,\n    name:&#39;搜索引擎&#39;,\n    itemStyle: {\n        color: &#39;#c23531&#39;\n    }\n}, ...]\n</code></pre>\n<p>但是这次因为只有明暗度的变化,所以有一种更快捷的方式是通过 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a> 组件将数值的大小映射到明暗度。</p>\n<pre><code class=\"lang-js\">visualMap: {\n    // 不显示 visualMap 组件,只用于明暗度的映射\n    show: false,\n    // 映射的最小值为 80\n    min: 80,\n    // 映射的最大值为 600\n    max: 600,\n    inRange: {\n        // 明暗度的范围是 0 到 1\n        colorLightness: [0, 1]\n    }\n}\n</code></pre>\n<p>最终效果:</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\n\n\n"},"ECharts 中的样式简介":{"type":["*"],"description":"<p>本文主要是大略概述,用哪些方法,可以在 Apache ECharts<sup>TM</sup> 中设置样式,改变图形元素或者文字的颜色、明暗、大小等。</p>\n<blockquote>\n<p>之所以用“样式”这种可能不很符合数据可视化思维的词,是因为,比较通俗易懂。</p>\n</blockquote>\n<p>本文介绍这几种方式,他们的功能范畴可能会有交叉(即同一种细节的效果可能可以用不同的方式实现),但是他们各有各的场景偏好。</p>\n<ul>\n<li>颜色主题(Theme)</li>\n<li>调色盘</li>\n<li>直接样式设置(itemStyle、lineStyle、areaStyle、label、...)</li>\n<li>视觉映射(visualMap)</li>\n</ul>\n<p>其他关于样式的文章,参见:<a href=\"#%E4%B8%AA%E6%80%A7%E5%8C%96%E5%9B%BE%E8%A1%A8%E7%9A%84%E6%A0%B7%E5%BC%8F\">个性化图表的样式</a>,<a href=\"#%E6%95%B0%E6%8D%AE%E7%9A%84%E8%A7%86%E8%A7%89%E6%98%A0%E5%B0%84\">数据的视觉映射</a>。</p>\n<h2 id=\"-theme-\">颜色主题(Theme)</h2>\n<p>最简单的更改全局样式的方式,是直接采用颜色主题(theme)。例如,在 <a href=\"https://echarts.apache.org/examples/zh/index.html\" target=\"_blank\">示例集合</a> 中,可以选择 “Theme”,直接看到采用主题的效果。</p>\n<p>ECharts4 开始,除了一贯的默认主题外,新内置了两套主题,分别为 <code class=\"codespan\">&#39;light&#39;</code> 和 <code class=\"codespan\">&#39;dark&#39;</code>。可以这么来使用它们:</p>\n<pre><code class=\"lang-js\">var chart = echarts.init(dom, &#39;light&#39;);\n</code></pre>\n<p>或者</p>\n<pre><code class=\"lang-js\">var chart = echarts.init(dom, &#39;dark&#39;);\n</code></pre>\n<p>其他的主题,没有内置在 ECharts 中,需要自己加载。这些主题可以在 <a href=\"https://echarts.apache.org/zh/theme-builder.html\" target=\"_blank\">主题编辑器</a> 里访问到。也可以使用这个主题编辑器,自己编辑主题。下载下来的主题可以这样使用:</p>\n<p>如果主题保存为 JSON 文件,那么可以自行加载和注册,例如:</p>\n<pre><code class=\"lang-js\">// 假设主题名称是 &quot;vintage&quot;\n$.getJSON(&#39;xxx/xxx/vintage.json&#39;, function (themeJSON) {\n    echarts.registerTheme(&#39;vintage&#39;, JSON.parse(themeJSON))\n    var chart = echarts.init(dom, &#39;vintage&#39;);\n});\n</code></pre>\n<p>如果保存为 UMD 格式的 JS 文件,那么支持了自注册,直接引入 JS 文件即可:</p>\n<pre><code class=\"lang-js\">// HTML 引入 vintage.js 文件后(假设主题名称是 &quot;vintage&quot;)\nvar chart = echarts.init(dom, &#39;vintage&#39;);\n// ...\n</code></pre>\n<h2 id=\"-\">调色盘</h2>\n<p>调色盘,可以在 option 中设置。它给定了一组颜色,图形、系列会自动从其中选择颜色。\n可以设置全局的调色盘,也可以设置系列自己专属的调色盘。</p>\n<pre><code class=\"lang-js\">option = {\n    // 全局调色盘。\n    color: [&#39;#c23531&#39;,&#39;#2f4554&#39;, &#39;#61a0a8&#39;, &#39;#d48265&#39;, &#39;#91c7ae&#39;,&#39;#749f83&#39;,  &#39;#ca8622&#39;, &#39;#bda29a&#39;,&#39;#6e7074&#39;, &#39;#546570&#39;, &#39;#c4ccd3&#39;],\n\n    series: [{\n        type: &#39;bar&#39;,\n        // 此系列自己的调色盘。\n        color: [&#39;#dd6b66&#39;,&#39;#759aa0&#39;,&#39;#e69d87&#39;,&#39;#8dc1a9&#39;,&#39;#ea7e53&#39;,&#39;#eedd78&#39;,&#39;#73a373&#39;,&#39;#73b9bc&#39;,&#39;#7289ab&#39;, &#39;#91ca8c&#39;,&#39;#f49f42&#39;],\n        ...\n    }, {\n        type: &#39;pie&#39;,\n        // 此系列自己的调色盘。\n        color: [&#39;#37A2DA&#39;, &#39;#32C5E9&#39;, &#39;#67E0E3&#39;, &#39;#9FE6B8&#39;, &#39;#FFDB5C&#39;,&#39;#ff9f7f&#39;, &#39;#fb7293&#39;, &#39;#E062AE&#39;, &#39;#E690D1&#39;, &#39;#e7bcf3&#39;, &#39;#9d96f5&#39;, &#39;#8378EA&#39;, &#39;#96BFFF&#39;],\n        ...\n    }]\n}\n</code></pre>\n<h2 id=\"-itemstyle-linestyle-areastyle-label-\">直接的样式设置 itemStyle, lineStyle, areaStyle, label, ...</h2>\n<p>直接的样式设置是比较常用设置方式。纵观 ECharts 的 <a href=\"option.html\" target=\"_blank\">option</a> 中,很多地方可以设置 <a href=\"option.html#series.itemStyle\" target=\"_blank\">itemStyle</a>、<a href=\"option.html#series-line.lineStyle\" target=\"_blank\">lineStyle</a>、<a href=\"option.html#series-line.areaStyle\" target=\"_blank\">areaStyle</a>、<a href=\"option.html#series.label\" target=\"_blank\">label</a> 等等。这些的地方可以直接设置图形元素的颜色、线宽、点的大小、标签的文字、标签的样式等等。</p>\n<p>一般来说,ECharts 的各个系列和组件,都遵从这些命名习惯,虽然不同图表和组件中,<code class=\"codespan\">itemStyle</code>、<code class=\"codespan\">label</code> 等可能出现在不同的地方。</p>\n<p>直接样式设置的另一篇介绍,参见 <a href=\"#%E4%B8%AA%E6%80%A7%E5%8C%96%E5%9B%BE%E8%A1%A8%E7%9A%84%E6%A0%B7%E5%BC%8F\">个性化图表的样式</a>。</p>\n<h2 id=\"-emphasis\">高亮的样式:emphasis</h2>\n<p>在鼠标悬浮到图形元素上时,一般会出现高亮的样式。默认情况下,高亮的样式是根据普通样式自动生成的。但是高亮的样式也可以自己定义,主要是通过 <a href=\"option.html#series-scatter.emphasis\" target=\"_blank\">emphasis</a> 属性来定制。<a href=\"option.html#series-scatter.emphasis\" target=\"_blank\">emphsis</a> 中的结构,和普通样式的结构相同,例如:</p>\n<pre><code class=\"lang-js\">option = {\n    series: {\n        type: &#39;scatter&#39;,\n\n        // 普通样式。\n        itemStyle: {\n            // 点的颜色。\n            color: &#39;red&#39;\n        },\n        label: {\n            show: true,\n            // 标签的文字。\n            formatter: &#39;This is a normal label.&#39;\n        },\n\n        // 高亮样式。\n        emphasis: {\n            itemStyle: {\n                // 高亮时点的颜色。\n                color: &#39;blue&#39;\n            },\n            label: {\n                show: true,\n                // 高亮时标签的文字。\n                formatter: &#39;This is a emphasis label.&#39;\n            }\n        }\n    }\n}\n</code></pre>\n<p>注意:在 ECharts4 以前,高亮和普通样式的写法,是这样的:</p>\n<pre><code class=\"lang-js\">option = {\n    series: {\n        type: &#39;scatter&#39;,\n\n        itemStyle: {\n            // 普通样式。\n            normal: {\n                // 点的颜色。\n                color: &#39;red&#39;\n            },\n            // 高亮样式。\n            emphasis: {\n                // 高亮时点的颜色。\n                color: &#39;blue&#39;\n            }\n        },\n\n        label: {\n            // 普通样式。\n            normal: {\n                show: true,\n                // 标签的文字。\n                formatter: &#39;This is a normal label.&#39;\n            },\n            // 高亮样式。\n            emphasis: {\n                show: true,\n                // 高亮时标签的文字。\n                formatter: &#39;This is a emphasis label.&#39;\n            }\n        }\n    }\n}\n</code></pre>\n<p>这种写法 <strong>仍然被兼容</strong>,但是,不再推荐。事实上,多数情况下,使用者只会配置普通状态下的样式,而使用默认的高亮样式。所以在 ECharts4 中,支持不写 <code class=\"codespan\">normal</code> 的配置方法(即本文开头的那种写法),使得配置项更扁平简单。</p>\n<h2 id=\"-visualmap-\">通过 visualMap 组件设定样式</h2>\n<p><a href=\"option.html#visualMap\" target=\"_blank\">visualMap 组件</a> 能指定数据到颜色、图形尺寸的映射规则,详见 <a href=\"#%E6%95%B0%E6%8D%AE%E7%9A%84%E8%A7%86%E8%A7%89%E6%98%A0%E5%B0%84\">数据的视觉映射</a>。</p>\n"},"异步数据加载和更新":{"type":["*"],"description":"<h2 id=\"-\">异步加载</h2>\n<p><a href=\"#getting-started\">入门示例</a>中的数据是在初始化后 <code class=\"codespan\">setOption</code> 中直接填入的,但是很多时候可能数据需要异步加载后再填入。Apache ECharts<sup>TM</sup> 中实现异步数据的更新非常简单,在图表初始化后不管任何时候只要通过 jQuery 等工具异步获取数据后通过 <code class=\"codespan\">setOption</code> 填入数据和配置项就行。</p>\n<pre><code class=\"lang-js\">var myChart = echarts.init(document.getElementById(&#39;main&#39;));\n\n$.get(&#39;data.json&#39;).done(function (data) {\n    myChart.setOption({\n        title: {\n            text: &#39;异步数据加载示例&#39;\n        },\n        tooltip: {},\n        legend: {\n            data:[&#39;销量&#39;]\n        },\n        xAxis: {\n            data: data.categories\n        },\n        yAxis: {},\n        series: [{\n            name: &#39;销量&#39;,\n            type: &#39;bar&#39;,\n            data: data.data\n        }]\n    });\n});\n</code></pre>\n<p>或者先设置完其它的样式,显示一个空的直角坐标轴,然后获取数据后填入数据。</p>\n<pre><code class=\"lang-js\">var myChart = echarts.init(document.getElementById(&#39;main&#39;));\n// 显示标题,图例和空的坐标轴\nmyChart.setOption({\n    title: {\n        text: &#39;异步数据加载示例&#39;\n    },\n    tooltip: {},\n    legend: {\n        data:[&#39;销量&#39;]\n    },\n    xAxis: {\n        data: []\n    },\n    yAxis: {},\n    series: [{\n        name: &#39;销量&#39;,\n        type: &#39;bar&#39;,\n        data: []\n    }]\n});\n\n// 异步加载数据\n$.get(&#39;data.json&#39;).done(function (data) {\n    // 填入数据\n    myChart.setOption({\n        xAxis: {\n            data: data.categories\n        },\n        series: [{\n            // 根据名字对应到相应的系列\n            name: &#39;销量&#39;,\n            data: data.data\n        }]\n    });\n});\n</code></pre>\n<p>如下:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/tutorial-async&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<p>ECharts 中在更新数据的时候需要通过<code class=\"codespan\">name</code>属性对应到相应的系列,上面示例中如果<code class=\"codespan\">name</code>不存在也可以根据系列的顺序正常更新,但是更多时候推荐更新数据的时候加上系列的<code class=\"codespan\">name</code>数据。</p>\n<h2 id=\"loading-\">loading 动画</h2>\n<p>如果数据加载时间较长,一个空的坐标轴放在画布上也会让用户觉得是不是产生 bug 了,因此需要一个 loading 的动画来提示用户数据正在加载。</p>\n<p>ECharts 默认有提供了一个简单的加载动画。只需要调用 <a href=\"api.html#echartsInstance.showLoading\" target=\"_blank\">showLoading</a> 方法显示。数据加载完成后再调用 <a href=\"api.html#echartsInstance.hideLoading\" target=\"_blank\">hideLoading</a> 方法隐藏加载动画。</p>\n<pre><code class=\"lang-js\">myChart.showLoading();\n$.get(&#39;data.json&#39;).done(function (data) {\n    myChart.hideLoading();\n    myChart.setOption(...);\n});\n</code></pre>\n<p>效果如下:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/tutorial-loading&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<h2 id=\"-\">数据的动态更新</h2>\n<p>ECharts 由数据驱动,数据的改变驱动图表展现的改变,因此动态数据的实现也变得异常简单。</p>\n<p>所有数据的更新都通过 <a href=\"#api.html#echartsInstance.setOption\">setOption</a>实现,你只需要定时获取数据,<a href=\"#api.html#echartsInstance.setOption\">setOption</a> 填入数据,而不用考虑数据到底产生了那些变化,ECharts 会找到两组数据之间的差异然后通过合适的动画去表现数据的变化。</p>\n<blockquote>\n<p>ECharts 3 中移除了 ECharts 2 中的 addData 方法。如果只需要加入单个数据,可以先 data.push(value) 后 setOption</p>\n</blockquote>\n<p>具体可以看下面示例:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/tutorial-dynamic-data&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n\n"},"使用 dataset 管理数据":{"type":["*"],"description":"<p>Apache ECharts<sup>TM</sup> 4 开始支持了 <code class=\"codespan\">dataset</code> 组件用于单独的数据集声明,从而数据可以单独管理,被多个组件复用,并且可以基于数据指定数据到视觉的映射。这在不少场景下能带来使用上的方便。</p>\n<p>ECharts 4 以前,数据只能声明在各个“系列(series)”中,例如:</p>\n<pre><code class=\"lang-js\">option = {\n    xAxis: {\n        type: &#39;category&#39;,\n        data: [&#39;Matcha Latte&#39;, &#39;Milk Tea&#39;, &#39;Cheese Cocoa&#39;, &#39;Walnut Brownie&#39;]\n    },\n    yAxis: {},\n    series: [\n        {\n            type: &#39;bar&#39;,\n            name: &#39;2015&#39;,\n            data: [89.3, 92.1, 94.4, 85.4]\n        },\n        {\n            type: &#39;bar&#39;,\n            name: &#39;2016&#39;,\n            data: [95.8, 89.4, 91.2, 76.9]\n        },\n        {\n            type: &#39;bar&#39;,\n            name: &#39;2017&#39;,\n            data: [97.7, 83.1, 92.5, 78.1]\n        }\n    ]\n}\n</code></pre>\n<p>这种方式的优点是,直观易理解,以及适于对一些特殊图表类型进行一定的数据类型定制。但是缺点是,为匹配这种数据输入形式,常需要有数据处理的过程,把数据分割设置到各个系列(和类目轴)中。此外,不利于多个系列共享一份数据,也不利于基于原始数据进行图表类型、系列的映射安排。</p>\n<p>于是,ECharts 4 提供了 <code class=\"codespan\">数据集</code>(<code class=\"codespan\">dataset</code>)组件来单独声明数据,它带来了这些效果:</p>\n<ul>\n<li>能够贴近这样的数据可视化常见思维方式:(I) 提供数据,(II) 指定数据到视觉的映射,从而形成图表。</li>\n<li>数据和其他配置可以被分离开来。数据常变,其他配置常不变。分开易于分别管理。</li>\n<li>数据可以被多个系列或者组件复用,对于大数据量的场景,不必为每个系列创建一份数据。</li>\n<li>支持更多的数据的常用格式,例如二维数组、对象数组等,一定程度上避免使用者为了数据格式而进行转换。</li>\n</ul>\n<h2 id=\"-\">入门例子</h2>\n<p>下面是一个最简单的 <code class=\"codespan\">dataset</code> 的例子:</p>\n<pre><code class=\"lang-js\">option = {\n    legend: {},\n    tooltip: {},\n    dataset: {\n        // 提供一份数据。\n        source: [\n            [&#39;product&#39;, &#39;2015&#39;, &#39;2016&#39;, &#39;2017&#39;],\n            [&#39;Matcha Latte&#39;, 43.3, 85.8, 93.7],\n            [&#39;Milk Tea&#39;, 83.1, 73.4, 55.1],\n            [&#39;Cheese Cocoa&#39;, 86.4, 65.2, 82.5],\n            [&#39;Walnut Brownie&#39;, 72.4, 53.9, 39.1]\n        ]\n    },\n    // 声明一个 X 轴,类目轴(category)。默认情况下,类目轴对应到 dataset 第一列。\n    xAxis: {type: &#39;category&#39;},\n    // 声明一个 Y 轴,数值轴。\n    yAxis: {},\n    // 声明多个 bar 系列,默认情况下,每个系列会自动对应到 dataset 的每一列。\n    series: [\n        {type: &#39;bar&#39;},\n        {type: &#39;bar&#39;},\n        {type: &#39;bar&#39;}\n    ]\n}\n</code></pre>\n<p>效果如下:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=dataset-simple0&edit=1&reset=1\" width=\"500\" height=\"300\" ></iframe>\n\n\n<p>或者也可以使用常见的对象数组的格式:</p>\n<pre><code class=\"lang-js\">option = {\n    legend: {},\n    tooltip: {},\n    dataset: {\n        // 用 dimensions 指定了维度的顺序。直角坐标系中,\n        // 默认把第一个维度映射到 X 轴上,第二个维度映射到 Y 轴上。\n        // 如果不指定 dimensions,也可以通过指定 series.encode\n        // 完成映射,参见后文。\n        dimensions: [&#39;product&#39;, &#39;2015&#39;, &#39;2016&#39;, &#39;2017&#39;],\n        source: [\n            {product: &#39;Matcha Latte&#39;, &#39;2015&#39;: 43.3, &#39;2016&#39;: 85.8, &#39;2017&#39;: 93.7},\n            {product: &#39;Milk Tea&#39;, &#39;2015&#39;: 83.1, &#39;2016&#39;: 73.4, &#39;2017&#39;: 55.1},\n            {product: &#39;Cheese Cocoa&#39;, &#39;2015&#39;: 86.4, &#39;2016&#39;: 65.2, &#39;2017&#39;: 82.5},\n            {product: &#39;Walnut Brownie&#39;, &#39;2015&#39;: 72.4, &#39;2016&#39;: 53.9, &#39;2017&#39;: 39.1}\n        ]\n    },\n    xAxis: {type: &#39;category&#39;},\n    yAxis: {},\n    series: [\n        {type: &#39;bar&#39;},\n        {type: &#39;bar&#39;},\n        {type: &#39;bar&#39;}\n    ]\n};\n</code></pre>\n<h2 id=\"-\">数据到图形的映射</h2>\n<p>本篇里,我们制作数据可视化图表的逻辑是这样的:基于数据,在配置项中指定如何映射到图形。</p>\n<p>概略而言,可以进行这些映射:</p>\n<ul>\n<li>指定 dataset 的列(column)还是行(row)映射为图形系列(series)。这件事可以使用 <a href=\"option.html#series.seriesLayoutBy\" target=\"_blank\">series.seriesLayoutBy</a> 属性来配置。默认是按照列(column)来映射。</li>\n<li>指定维度映射的规则:如何从 dataset 的维度(一个“维度”的意思是一行/列)映射到坐标轴(如 X、Y 轴)、提示框(tooltip)、标签(label)、图形元素大小颜色等(visualMap)。这件事可以使用 <a href=\"option.html#series.encode\" target=\"_blank\">series.encode</a> 属性,以及 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a> 组件(如果有需要映射颜色大小等视觉维度的话)来配置。上面的例子中,没有给出这种映射配置,那么 ECharts 就按最常见的理解进行默认映射:X 坐标轴声明为类目轴,默认情况下会自动对应到 dataset.source 中的第一列;三个柱图系列,一一对应到 dataset.source 中后面每一列。</li>\n</ul>\n<p>下面详细解释。</p>\n<h2 id=\"-dataset-series-\">把数据集( dataset )的行或列映射为系列(series)</h2>\n<p>有了数据表之后,使用者可以灵活得配置:数据如何对应到轴和图形系列。</p>\n<p>用户可以使用 <code class=\"codespan\">seriesLayoutBy</code> 配置项,改变图表对于行列的理解。<code class=\"codespan\">seriesLayoutBy</code> 可取值:</p>\n<ul>\n<li>&#39;column&#39;: 默认值。系列被安放到 <code class=\"codespan\">dataset</code> 的列上面。</li>\n<li>&#39;row&#39;: 系列被安放到 <code class=\"codespan\">dataset</code> 的行上面。</li>\n</ul>\n<p>看这个例子:</p>\n<pre><code class=\"lang-js\">option = {\n    legend: {},\n    tooltip: {},\n    dataset: {\n        source: [\n            [&#39;product&#39;, &#39;2012&#39;, &#39;2013&#39;, &#39;2014&#39;, &#39;2015&#39;],\n            [&#39;Matcha Latte&#39;, 41.1, 30.4, 65.1, 53.3],\n            [&#39;Milk Tea&#39;, 86.5, 92.1, 85.7, 83.1],\n            [&#39;Cheese Cocoa&#39;, 24.1, 67.2, 79.5, 86.4]\n        ]\n    },\n    xAxis: [\n        {type: &#39;category&#39;, gridIndex: 0},\n        {type: &#39;category&#39;, gridIndex: 1}\n    ],\n    yAxis: [\n        {gridIndex: 0},\n        {gridIndex: 1}\n    ],\n    grid: [\n        {bottom: &#39;55%&#39;},\n        {top: &#39;55%&#39;}\n    ],\n    series: [\n        // 这几个系列会在第一个直角坐标系中,每个系列对应到 dataset 的每一行。\n        {type: &#39;bar&#39;, seriesLayoutBy: &#39;row&#39;},\n        {type: &#39;bar&#39;, seriesLayoutBy: &#39;row&#39;},\n        {type: &#39;bar&#39;, seriesLayoutBy: &#39;row&#39;},\n        // 这几个系列会在第二个直角坐标系中,每个系列对应到 dataset 的每一列。\n        {type: &#39;bar&#39;, xAxisIndex: 1, yAxisIndex: 1},\n        {type: &#39;bar&#39;, xAxisIndex: 1, yAxisIndex: 1},\n        {type: &#39;bar&#39;, xAxisIndex: 1, yAxisIndex: 1},\n        {type: &#39;bar&#39;, xAxisIndex: 1, yAxisIndex: 1}\n    ]\n}\n</code></pre>\n<p>效果如下:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=dataset-series-layout-by&edit=1&reset=1\" width=\"800\" height=\"600\" ></iframe>\n\n\n\n<h2 id=\"-dimension-\">维度(dimension)</h2>\n<p>介绍 <code class=\"codespan\">encode</code> 之前,首先要介绍“维度(dimension)”的概念。</p>\n<p>常用图表所描述的数据大部分是“二维表”结构,上述的例子中,我们都使用二维数组来容纳二维表。现在,当我们把系列(series)对应到“列”的时候,那么每一列就称为一个“维度(dimension)”,而每一行称为数据项(item)。反之,如果我们把系列(series)对应到表行,那么每一行就是“维度(dimension)”,每一列就是数据项(item)。</p>\n<p>维度可以有单独的名字,便于在图表中显示。维度名(dimension name)可以在定义在 dataset 的第一行(或者第一列)。例如上面的例子中,<code class=\"codespan\">&#39;score&#39;</code>、<code class=\"codespan\">&#39;amount&#39;</code>、<code class=\"codespan\">&#39;product&#39;</code> 就是维度名。从第二行开始,才是正式的数据。<code class=\"codespan\">dataset.source</code> 中第一行(列)到底包含不包含维度名,ECharts 默认会自动探测。当然也可以设置 <code class=\"codespan\">dataset.sourceHeader: true</code> 显示声明第一行(列)就是维度,或者 <code class=\"codespan\">dataset.sourceHeader: false</code> 表明第一行(列)开始就直接是数据。</p>\n<p>维度的定义,也可以使用单独的 <code class=\"codespan\">dataset.dimensions</code> 或者 <code class=\"codespan\">series.dimensions</code> 来定义,这样可以同时指定维度名,和维度的类型(dimension type):</p>\n<pre><code class=\"lang-js\">var option1 = {\n    dataset: {\n        dimensions: [\n            {name: &#39;score&#39;},\n            // 可以简写为 string,表示维度名。\n            &#39;amount&#39;,\n            // 可以在 type 中指定维度类型。\n            {name: &#39;product&#39;, type: &#39;ordinal&#39;}\n        ],\n        source: [...]\n    },\n    ...\n};\n\nvar option2 = {\n    dataset: {\n        source: [...]\n    },\n    series: {\n        type: &#39;line&#39;,\n        // 在系列中设置的 dimensions 会更优先采纳。\n        dimensions: [\n            null, // 可以设置为 null 表示不想设置维度名\n            &#39;amount&#39;,\n            {name: &#39;product&#39;, type: &#39;ordinal&#39;}\n        ]\n    },\n    ...\n};\n</code></pre>\n<p>大多数情况下,我们并不需要去设置维度类型,因为会自动判断。但是如果因为数据为空之类原因导致判断不足够准确时,可以手动设置维度类型。</p>\n<p>维度类型(dimension type)可以取这些值:</p>\n<ul>\n<li><code class=\"codespan\">&#39;number&#39;</code>: 默认,表示普通数据。</li>\n<li><code class=\"codespan\">&#39;ordinal&#39;</code>: 对于类目、文本这些 string 类型的数据,如果需要能在数轴上使用,须是 &#39;ordinal&#39; 类型。ECharts 默认会自动判断这个类型。但是自动判断也是不可能很完备的,所以使用者也可以手动强制指定。</li>\n<li><code class=\"codespan\">&#39;time&#39;</code>: 表示时间数据。设置成 <code class=\"codespan\">&#39;time&#39;</code> 则能支持自动解析数据成时间戳(timestamp),比如该维度的数据是 &#39;2017-05-10&#39;,会自动被解析。如果这个维度被用在时间数轴(<a href=\"option.html#xAxis.type\" target=\"_blank\">axis.type</a> 为 <code class=\"codespan\">&#39;time&#39;</code>)上,那么会被自动设置为 <code class=\"codespan\">&#39;time&#39;</code> 类型。时间类型的支持参见 <a href=\"option.html#series.data\" target=\"_blank\">data</a>。</li>\n<li><code class=\"codespan\">&#39;float&#39;</code>: 如果设置成 <code class=\"codespan\">&#39;float&#39;</code>,在存储时候会使用 <code class=\"codespan\">TypedArray</code>,对性能优化有好处。</li>\n<li><code class=\"codespan\">&#39;int&#39;</code>: 如果设置成 <code class=\"codespan\">&#39;int&#39;</code>,在存储时候会使用 <code class=\"codespan\">TypedArray</code>,对性能优化有好处。</li>\n</ul>\n<h2 id=\"-series-encode-\">数据到图形的映射( series.encode )</h2>\n<p>了解了维度的概念后,我们就可以使用 <a href=\"option.html#series.encode\" target=\"_blank\">encode</a> 来做映射。总体是这样的感觉:</p>\n<pre><code class=\"lang-js\">var option = {\n    dataset: {\n        source: [\n            [&#39;score&#39;, &#39;amount&#39;, &#39;product&#39;],\n            [89.3, 58212, &#39;Matcha Latte&#39;],\n            [57.1, 78254, &#39;Milk Tea&#39;],\n            [74.4, 41032, &#39;Cheese Cocoa&#39;],\n            [50.1, 12755, &#39;Cheese Brownie&#39;],\n            [89.7, 20145, &#39;Matcha Cocoa&#39;],\n            [68.1, 79146, &#39;Tea&#39;],\n            [19.6, 91852, &#39;Orange Juice&#39;],\n            [10.6, 101852, &#39;Lemon Juice&#39;],\n            [32.7, 20112, &#39;Walnut Brownie&#39;]\n        ]\n    },\n    xAxis: {},\n    yAxis: {type: &#39;category&#39;},\n    series: [\n        {\n            type: &#39;bar&#39;,\n            encode: {\n                // 将 &quot;amount&quot; 列映射到 X 轴。\n                x: &#39;amount&#39;,\n                // 将 &quot;product&quot; 列映射到 Y 轴。\n                y: &#39;product&#39;\n            }\n        }\n    ]\n};\n</code></pre>\n<p>效果如下:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/dataset-encode-simple0&edit=1&reset=1\" width=\"500\" height=\"300\" ></iframe>\n\n\n\n<p><code class=\"codespan\">series.encode</code> 声明的基本结构如下,其中冒号左边是坐标系、标签等特定名称,如 <code class=\"codespan\">&#39;x&#39;</code>, <code class=\"codespan\">&#39;y&#39;</code>, <code class=\"codespan\">&#39;tooltip&#39;</code> 等,冒号右边是数据中的维度名(string 格式)或者维度的序号(number 格式,从 0 开始计数),可以指定一个或多个维度(使用数组)。通常情况下,下面各种信息不需要所有的都写,按需写即可。</p>\n<p>下面是 <code class=\"codespan\">series.encode</code> 支持的属性:</p>\n<pre><code class=\"lang-js\">// 在任何坐标系和系列中,都支持:\nencode: {\n    // 使用 “名为 product 的维度” 和 “名为 score 的维度” 的值在 tooltip 中显示\n    tooltip: [&#39;product&#39;, &#39;score&#39;]\n    // 使用 “维度 1” 和 “维度 3” 的维度名连起来作为系列名。(有时候名字比较长,这可以避免在 series.name 重复输入这些名字)\n    seriesName: [1, 3],\n    // 表示使用 “维度2” 中的值作为 id。这在使用 setOption 动态更新数据时有用处,可以使新老数据用 id 对应起来,从而能够产生合适的数据更新动画。\n    itemId: 2,\n    // 指定数据项的名称使用 “维度3” 在饼图等图表中有用,可以使这个名字显示在图例(legend)中。\n    itemName: 3\n}\n\n// 直角坐标系(grid/cartesian)特有的属性:\nencode: {\n    // 把 “维度1”、“维度5”、“名为 score 的维度” 映射到 X 轴:\n    x: [1, 5, &#39;score&#39;],\n    // 把“维度0”映射到 Y 轴。\n    y: 0\n}\n\n// 单轴(singleAxis)特有的属性:\nencode: {\n    single: 3\n}\n\n// 极坐标系(polar)特有的属性:\nencode: {\n    radius: 3,\n    angle: 2\n}\n\n// 地理坐标系(geo)特有的属性:\nencode: {\n    lng: 3,\n    lat: 2\n}\n\n// 对于一些没有坐标系的图表,例如饼图、漏斗图等,可以是:\nencode: {\n    value: 3\n}\n</code></pre>\n<p>下面给出个更丰富的 <code class=\"codespan\">series.encode</code> 的示例:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=dataset-encode1&edit=1&reset=1\" width=\"800\" height=\"600\" ></iframe>\n\n\n\n<h2 id=\"-\">视觉通道(颜色、尺寸等)的映射</h2>\n<p>我们可以使用 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a> 组件进行视觉通道的映射。详见 <code class=\"codespan\">visualMap</code> 文档的介绍。这是一个示例:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=dataset-encode0&edit=1&reset=1\" width=\"500\" height=\"400\" ></iframe>\n\n\n\n<h2 id=\"-encode\">默认的 encode</h2>\n<p>值得一提的是,当 <code class=\"codespan\">series.encode</code> 并没有指定时,ECharts 针对最常见直角坐标系中的图表(折线图、柱状图、散点图、K线图等)、饼图、漏斗图,会采用一些默认的映射规则。默认的映射规则比较简单,大体是:</p>\n<ul>\n<li>在坐标系中(如直角坐标系、极坐标系等)<ul>\n<li>如果有类目轴(axis.type 为 &#39;category&#39;),则将第一列(行)映射到这个轴上,后续每一列(行)对应一个系列。</li>\n<li>如果没有类目轴,假如坐标系有两个轴(例如直角坐标系的 X Y 轴),则每两列对应一个系列,这两列分别映射到这两个轴上。</li>\n</ul>\n</li>\n<li>如果没有坐标系(如饼图)<ul>\n<li>取第一列(行)为名字,第二列(行)为数值(如果只有一列,则取第一列为数值)。</li>\n</ul>\n</li>\n</ul>\n<p>默认的规则不能满足要求时,就可以自己来配置 <code class=\"codespan\">encode</code>,也并不复杂。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=dataset-default&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n\n<h2 id=\"-series-encode-\">几个常见的 series.encode 设置方式举例</h2>\n<p>问:如何把第三列设置为 X 轴,第五列设置为 Y 轴?</p>\n<p>答:</p>\n<pre><code class=\"lang-js\">series: {\n    // 注意维度序号(dimensionIndex)从 0 开始计数,第三列是 dimensions[2]。\n    encode: {x: 2, y: 4},\n    ...\n}\n</code></pre>\n<p>问:如何把第三行设置为 X 轴,第五行设置为 Y 轴?</p>\n<p>答:</p>\n<pre><code class=\"lang-js\">series: {\n    encode: {x: 2, y: 4},\n    seriesLayoutBy: &#39;row&#39;,\n    ...\n}\n</code></pre>\n<p>问:如何把第二列设置为标签?</p>\n<p>答:\n关于标签的显示 <a href=\"option.html#series.label.formatter\" target=\"_blank\">label.formatter</a>,现在支持引用特定维度的值,例如:</p>\n<pre><code class=\"lang-js\">series: {\n    label: {\n        // `&#39;{@score}&#39;` 表示 “名为 score” 的维度里的值。\n        // `&#39;{@[4]}&#39;` 表示引用序号为 4 的维度里的值。\n        formatter: &#39;aaa{@product}bbb{@score}ccc{@[4]}ddd&#39;\n    }\n}\n</code></pre>\n<p>问:如何让第 2 列和第 3 列显示在提示框(tooltip)中?</p>\n<p>答:</p>\n<pre><code class=\"lang-js\">series: {\n    encode: {\n        tooltip: [1, 2]\n        ...\n    },\n    ...\n}\n</code></pre>\n<p>问:数据里没有维度名,那么怎么给出维度名?</p>\n<p>答:</p>\n<pre><code class=\"lang-js\">dataset: {\n    dimensions: [&#39;score&#39;, &#39;amount&#39;],\n    source: [\n        [89.3, 3371],\n        [92.1, 8123],\n        [94.4, 1954],\n        [85.4, 829]\n    ]\n}\n</code></pre>\n<p>问:如何把第三列映射为气泡图的点的大小?</p>\n<p>答:</p>\n<pre><code class=\"lang-js\">var option = {\n    dataset: {\n        source: [\n            [12, 323, 11.2],\n            [23, 167, 8.3],\n            [81, 284, 12],\n            [91, 413, 4.1],\n            [13, 287, 13.5]\n        ]\n    },\n    visualMap: {\n        show: false,\n        dimension: 2, // 指向第三列(列序号从 0 开始记,所以设置为 2)。\n        min: 2, // 需要给出数值范围,最小数值。\n        max: 15, // 需要给出数值范围,最大数值。\n        inRange: {\n            // 气泡尺寸:5 像素到 60 像素。\n            symbolSize: [5, 60]\n        }\n    },\n    xAxis: {},\n    yAxis: {},\n    series: {\n        type: &#39;scatter&#39;\n    }\n};\n</code></pre>\n<p>问:encode 里指定了映射,但是不管用?</p>\n<p>答:可以查查有没有拼错,比如,维度名是:<code class=\"codespan\">&#39;Life Expectancy&#39;</code>,encode 中拼成了 <code class=\"codespan\">&#39;Life Expectency&#39;</code>。</p>\n<h2 id=\"-\">数据的各种格式</h2>\n<p>多数常见图表中,数据适于用二维表的形式描述。广为使用的数据表格软件(如 MS Excel、Numbers)或者关系数据数据库都是二维表。他们的数据可以导出成 JSON 格式,输入到 <code class=\"codespan\">dataset.source</code> 中,在不少情况下可以免去一些数据处理的步骤。</p>\n<blockquote>\n<p>假如数据导出成 csv 文件,那么可以使用一些 csv 工具如 <a href=\"https://github.com/d3/d3-dsv\" target=\"_blank\">dsv</a> 或者 <a href=\"https://github.com/mholt/PapaParse\" target=\"_blank\">PapaParse</a> 将 csv 转成 JSON。</p>\n</blockquote>\n<p>在 JavaScript 常用的数据传输格式中,二维数组可以比较直观的存储二维表。前面的示例都是使用二维数组表示。</p>\n<p>除了二维数组以外,dataset 也支持例如下面 key-value 方式的数据格式,这类格式也非常常见。但是这类格式中,目前并不支持 <a href=\"option.html#series.seriesLayoutBy\" target=\"_blank\">seriesLayoutBy</a> 参数。</p>\n<pre><code class=\"lang-js\">dataset: [{\n    // 按行的 key-value 形式(对象数组),这是个比较常见的格式。\n    source: [\n        {product: &#39;Matcha Latte&#39;, count: 823, score: 95.8},\n        {product: &#39;Milk Tea&#39;, count: 235, score: 81.4},\n        {product: &#39;Cheese Cocoa&#39;, count: 1042, score: 91.2},\n        {product: &#39;Walnut Brownie&#39;, count: 988, score: 76.9}\n    ]\n}, {\n    // 按列的 key-value 形式。\n    source: {\n        &#39;product&#39;: [&#39;Matcha Latte&#39;, &#39;Milk Tea&#39;, &#39;Cheese Cocoa&#39;, &#39;Walnut Brownie&#39;],\n        &#39;count&#39;: [823, 235, 1042, 988],\n        &#39;score&#39;: [95.8, 81.4, 91.2, 76.9]\n    }\n}]\n</code></pre>\n<h2 id=\"-dataset-\">多个 dataset 以及如何引用他们</h2>\n<p>可以同时定义多个 dataset。系列可以通过 <a href=\"option.html#series.datasetIndex\" target=\"_blank\">series.datasetIndex</a> 来指定引用哪个 dataset。例如:</p>\n<pre><code class=\"lang-js\">var option = {\n    dataset: [{\n        // 序号为 0 的 dataset。\n        source: [...],\n    }, {\n        // 序号为 1 的 dataset。\n        source: [...]\n    }, {\n        // 序号为 2 的 dataset。\n        source: [...]\n    }],\n    series: [{\n        // 使用序号为 2 的 dataset。\n        datasetIndex: 2\n    }, {\n        // 使用序号为 1 的 dataset。\n        datasetIndex: 1\n    }]\n}\n</code></pre>\n<h2 id=\"echarts-3-series-data-\">ECharts 3 的数据设置方式(series.data)仍正常使用</h2>\n<p>ECharts 4 之前一直以来的数据声明方式仍然被正常支持,如果系列已经声明了 <a href=\"option.html#series.data\" target=\"_blank\">series.data</a>, 那么就会使用 <a href=\"option.html#series.data\" target=\"_blank\">series.data</a> 而非 <code class=\"codespan\">dataset</code>。</p>\n<pre><code class=\"lang-js\">{\n    xAxis: {\n        type: &#39;category&#39;\n        data: [&#39;Matcha Latte&#39;, &#39;Milk Tea&#39;, &#39;Cheese Cocoa&#39;, &#39;Walnut Brownie&#39;]\n    },\n    yAxis: {},\n    series: [{\n        type: &#39;bar&#39;,\n        name: &#39;2015&#39;,\n        data: [89.3, 92.1, 94.4, 85.4]\n    }, {\n        type: &#39;bar&#39;,\n        name: &#39;2016&#39;,\n        data: [95.8, 89.4, 91.2, 76.9]\n    }, {\n        type: &#39;bar&#39;,\n        name: &#39;2017&#39;,\n        data: [97.7, 83.1, 92.5, 78.1]\n    }]\n}\n</code></pre>\n<p>其实,<a href=\"option.html#series.data\" target=\"_blank\">series.data</a> 也是种会一直存在的重要设置方式。一些特殊的非 table 格式的图表,如 <a href=\"option.html#series-treemap\" target=\"_blank\">treemap</a>、<a href=\"option.html#series-graph\" target=\"_blank\">graph</a>、<a href=\"option.html#series-lines\" target=\"_blank\">lines</a> 等,现在仍不支持在 dataset 中设置,仍然需要使用 <a href=\"option.html#series.data\" target=\"_blank\">series.data</a>。另外,对于巨大数据量的渲染(如百万以上的数据量),需要使用 <a href=\"api.html#echartsInstance.appendData\" target=\"_blank\">appendData</a> 进行增量加载,这种情况不支持使用 <code class=\"codespan\">dataset</code>。</p>\n<h2 id=\"-data-transform-\">数据转换器( data transform )</h2>\n<p>参见 <a href=\"#%E4%BD%BF%E7%94%A8%20transform%20%E8%BF%9B%E8%A1%8C%E6%95%B0%E6%8D%AE%E8%BD%AC%E6%8D%A2\">data transform</a>。</p>\n<h2 id=\"-\">其他</h2>\n<p>目前并非所有图表都支持 dataset。支持 dataset 的图表有:\n<code class=\"codespan\">line</code>、<code class=\"codespan\">bar</code>、<code class=\"codespan\">pie</code>、<code class=\"codespan\">scatter</code>、<code class=\"codespan\">effectScatter</code>、<code class=\"codespan\">parallel</code>、<code class=\"codespan\">candlestick</code>、<code class=\"codespan\">map</code>、<code class=\"codespan\">funnel</code>、<code class=\"codespan\">custom</code>。\n后续会有更多的图表进行支持。</p>\n<p>最后,给出一个示例,多个图表共享一个 <code class=\"codespan\">dataset</code>,并带有联动交互:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=dataset-link&edit=1&reset=1\" width=\"800\" height=\"500\" ></iframe>\n\n\n\n\n"},"使用 transform 进行数据转换":{"type":["*"],"description":"<p>Apache ECharts<sup>TM</sup> 5 开始支持了“数据转换”( data transform )功能。在 echarts 中,“数据转换” 这个词指的是,给定一个已有的“数据集”(<a href=\"option.html#dataset\" target=\"_blank\">dataset</a>)和一个“转换方法”(<a href=\"option.html#dataset.transform\" target=\"_blank\">transform</a>),echarts 能生成一个新的“数据集”,然后可以使用这个新的“数据集”绘制图表。这些工作都可以声明式地完成。</p>\n<p>抽象地来说,数据转换是这样一种公式:<code class=\"codespan\">outData = f(inputData)</code>。<code class=\"codespan\">f</code> 是转换方法,例如:<code class=\"codespan\">filter</code>、<code class=\"codespan\">sort</code>、<code class=\"codespan\">regression</code>、<code class=\"codespan\">boxplot</code>、<code class=\"codespan\">cluster</code>、<code class=\"codespan\">aggregate</code>(todo) 等等。有了数据转换能力后,我们就至少可以做到这些事情:</p>\n<ul>\n<li>把数据分成多份用不同的饼图展现。</li>\n<li>进行一些数据统计运算,并展示结果。</li>\n<li>用某些数据可视化算法处理数据,并展示结果。</li>\n<li>数据排序。</li>\n<li>去除或直选择数据项。</li>\n<li>...</li>\n</ul>\n<h2 id=\"-\">数据转换基础使用</h2>\n<p>在 echarts 中,数据转换是依托于数据集(<a href=\"#dataset\">dataset</a>)来实现的. 我们可以设置 <a href=\"option.html#dataset.transform\" target=\"_blank\">dataset.transform</a> 来表示,此 dataset 的数据,来自于此 transform 的结果。例如。</p>\n<pre><code class=\"lang-js\">var option = {\n    dataset: [{\n        // 这个 dataset 的 index 是 `0`。\n        source: [\n            [&#39;Product&#39;, &#39;Sales&#39;, &#39;Price&#39;, &#39;Year&#39;],\n            [&#39;Cake&#39;, 123, 32, 2011],\n            [&#39;Cereal&#39;, 231, 14, 2011],\n            [&#39;Tofu&#39;, 235, 5, 2011],\n            [&#39;Dumpling&#39;, 341, 25, 2011],\n            [&#39;Biscuit&#39;, 122, 29, 2011],\n            [&#39;Cake&#39;, 143, 30, 2012],\n            [&#39;Cereal&#39;, 201, 19, 2012],\n            [&#39;Tofu&#39;, 255, 7, 2012],\n            [&#39;Dumpling&#39;, 241, 27, 2012],\n            [&#39;Biscuit&#39;, 102, 34, 2012],\n            [&#39;Cake&#39;, 153, 28, 2013],\n            [&#39;Cereal&#39;, 181, 21, 2013],\n            [&#39;Tofu&#39;, 395, 4, 2013],\n            [&#39;Dumpling&#39;, 281, 31, 2013],\n            [&#39;Biscuit&#39;, 92, 39, 2013],\n            [&#39;Cake&#39;, 223, 29, 2014],\n            [&#39;Cereal&#39;, 211, 17, 2014],\n            [&#39;Tofu&#39;, 345, 3, 2014],\n            [&#39;Dumpling&#39;, 211, 35, 2014],\n            [&#39;Biscuit&#39;, 72, 24, 2014],\n        ],\n        // id: &#39;a&#39;\n    }, {\n        // 这个 dataset 的 index 是 `1`。\n        // 这个 `transform` 配置,表示,此 dataset 的数据,来自于此 transform 的结果。\n        transform: {\n            type: &#39;filter&#39;,\n            config: { dimension: &#39;Year&#39;, value: 2011 }\n        },\n        // 我们还可以设置这些可选的属性: `fromDatasetIndex` 或 `fromDatasetId`。\n        // 这些属性,指定了,transform 的输入,来自于哪个 dataset。例如,\n        // `fromDatasetIndex: 0` 表示输入来自于 index 为 `0` 的 dataset 。又例如,\n        // `fromDatasetId: &#39;a&#39;` 表示输入来自于 `id: &#39;a&#39;` 的 dataset。\n        // 当这些属性都不指定时,默认认为,输入来自于 index 为 `0` 的 dataset 。\n    }, {\n        // 这个 dataset 的 index 是 `2`。\n        // 同样,这里因为 `fromDatasetIndex` 和 `fromDatasetId` 都没有被指定,\n        // 那么输入默认来自于 index 为 `0` 的 dataset 。\n        transform: {\n            // 这个类型为 &quot;filter&quot; 的 transform 能够遍历并筛选出满足条件的数据项。\n            type: &#39;filter&#39;,\n            // 每个 transform 如果需要有配置参数的话,都须配置在 `config` 里。\n            // 在这个 &quot;filter&quot; transform 中,`config` 用于指定筛选条件。\n            // 下面这个筛选条件是:选出维度( dimension )&#39;Year&#39; 中值为 2012 的所有\n            // 数据项。\n            config: { dimension: &#39;Year&#39;, value: 2012 }\n        }\n    }, {\n        // 这个 dataset 的 index 是 `3`。\n        transform: {\n            type: &#39;filter&#39;,\n            config: { dimension: &#39;Year&#39;, value: 2013 }\n        }\n    }],\n    series: [{\n        type: &#39;pie&#39;, radius: 50, center: [&#39;25%&#39;, &#39;50%&#39;],\n        // 这个饼图系列,引用了 index 为 `1` 的 dataset 。也就是,引用了上述\n        // 2011 年那个 &quot;filter&quot; transform 的结果。\n        datasetIndex: 1\n    }, {\n        type: &#39;pie&#39;, radius: 50, center: [&#39;50%&#39;, &#39;50%&#39;],\n        datasetIndex: 2\n    }, {\n        type: &#39;pie&#39;, radius: 50, center: [&#39;75%&#39;, &#39;50%&#39;],\n        datasetIndex: 3\n    }]\n};\n</code></pre>\n<p>下面是上述例子的效果,三个饼图分别显示了 2011、2012、2013 年的数据。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=data-transform-multiple-pie&reset=1&edit=1\" width=\"800\" height=\"300\" ></iframe>\n\n\n<p>现在我们简单总结下,使用 transform 时的几个要点:</p>\n<ul>\n<li>在一个空的 dataset 中声明 <code class=\"codespan\">transform</code>, <code class=\"codespan\">fromDatasetIndex</code>/<code class=\"codespan\">fromDatasetId</code> 来表示我们要生成新的数据。</li>\n<li>系列引用这个 dataset 。</li>\n</ul>\n<h2 id=\"-\">数据转换的进阶使用</h2>\n<h4 id=\"-transform\">链式声明 transform</h4>\n<p><code class=\"codespan\">transform</code> 可以被链式声明,这是一个语法糖。</p>\n<pre><code class=\"lang-js\">option: {\n    dataset: [{\n        source: [ ... ] // 原始数据\n    }, {\n        // 几个 transform 被声明成 array ,他们构成了一个链,\n        // 前一个 transform 的输出是后一个 transform 的输入。\n        transform: [{\n            type: &#39;filter&#39;,\n            config: { dimension: &#39;Product&#39;, value: &#39;Tofu&#39; }\n        }, {\n            type: &#39;sort&#39;,\n            config: { dimension: &#39;Year&#39;, order: &#39;desc&#39; }\n        }]\n    }],\n    series: {\n        type: &#39;pie&#39;,\n        // 这个系列引用上述 transform 的结果。\n        datasetIndex: 1\n    }\n}\n</code></pre>\n<blockquote>\n<p>注意:理论上,任何 transform 都可能有多个输入或多个输出。但是,如果一个 transform 被链式声明,它只能获取前一个 transform 的第一个输出作为输入(第一个 transform 除外),以及它只能把自己的第一个输出给到后一个 transform (最后一个 transform 除外)。</p>\n</blockquote>\n<h4 id=\"-transform-data\">一个 transform 输出多个 data</h4>\n<p>在大多数场景下,transform 只需输出一个 data 。但是也有一些场景,需要输出多个 data ,每个 data 可以被不同的 series 或者 dataset 所使用。</p>\n<p>例如,在内置的 &quot;boxplot&quot; transform 中,除了 boxplot 系列所需要的 data 外,离群点( outlier )也会被生成,并且可以用例如散点图系列显示出来。例如,<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=boxplot-light-velocity&amp;edit=1&amp;reset=1\" target=\"_blank\">example</a>。</p>\n<p>我们提供配置 <a href=\"option.html#dataset.fromTransformResult\" target=\"_blank\">dataset.fromTransformResult</a> 来满足这种情况,例如:</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        // 这个 dataset 的 index 为 `0`。\n        source: [...] // 原始数据\n    }, {\n        // 这个 dataset 的 index 为 `1`。\n        transform: {\n            type: &#39;boxplot&#39;\n        }\n        // 这个 &quot;boxplot&quot; transform 生成了两个数据:\n        // result[0]: boxplot series 所需的数据。\n        // result[1]: 离群点数据。\n        // 当其他 series 或者 dataset 引用这个 dataset 时,他们默认只能得到\n        // result[0] 。\n        // 如果想要他们得到 result[1] ,需要额外声明如下这样一个 dataset :\n    }, {\n        // 这个 dataset 的 index 为 `2`。\n        // 这个额外的 dataset 指定了数据来源于 index 为 `1` 的 dataset。\n        fromDatasetIndex: 1,\n        // 并且指定了获取 transform result[1] 。\n        fromTransformResult: 1\n    }],\n    xAxis: {\n        type: &#39;category&#39;\n    },\n    yAxis: {\n    },\n    series: [{\n        name: &#39;boxplot&#39;,\n        type: &#39;boxplot&#39;,\n        // Reference the data from result[0].\n        // 这个 series 引用 index 为 `1` 的 dataset 。\n        datasetIndex: 1\n    }, {\n        name: &#39;outlier&#39;,\n        type: &#39;scatter&#39;,\n        // 这个 series 引用 index 为 `2` 的 dataset 。\n        // 从而也就得到了上述的 transform result[1] (即离群点数据)\n        datasetIndex: 2\n    }]\n};\n</code></pre>\n<p>另外,<a href=\"option.html#dataset.fromTransformResult\" target=\"_blank\">dataset.fromTransformResult</a> 和 <a href=\"option.html#dataset.transform\" target=\"_blank\">dataset.transform</a> 能同时出现在一个 dataset 中,这表示,这个 transform 的输入,是上游的结果中以 <code class=\"codespan\">fromTransformResult</code> 获取的结果。例如:</p>\n<pre><code class=\"lang-js\">{\n    fromDatasetIndex: 1,\n    fromTransformResult: 1,\n    transform: {\n        type: &#39;sort&#39;,\n        config: { dimension: 2, order: &#39;desc&#39; }\n    }\n}\n</code></pre>\n<h4 id=\"-debug\">在开发环境中 debug</h4>\n<p>使用 transform 时,有时候我们会配不对,显示不出来结果,并且不知道哪里错了。所以,这里提供了一个配置项 <code class=\"codespan\">transform.print</code> 方便 debug 。这个配置项只在开发环境中生效。如下例:</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        source: [ ... ]\n    }, {\n        transform: {\n            type: &#39;filter&#39;,\n            config: { ... }\n            // 配置为 `true` 后, transform 的结果\n            // 会被 console.log 打印出来。\n            print: true\n        }\n    }],\n    ...\n}\n</code></pre>\n<h2 id=\"-filter\">数据转换器 &quot;filter&quot;</h2>\n<p>echarts 内置提供了能起过滤作用的数据转换器。我们只需声明 <code class=\"codespan\">transform.type: &quot;filter&quot;</code>,以及给出数据筛选条件。如下例:</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        source: [\n            [&#39;Product&#39;, &#39;Sales&#39;, &#39;Price&#39;, &#39;Year&#39;],\n            [&#39;Cake&#39;, 123, 32, 2011],\n            [&#39;Latte&#39;, 231, 14, 2011],\n            [&#39;Tofu&#39;, 235, 5, 2011],\n            [&#39;Milk Tee&#39;, 341, 25, 2011],\n            [&#39;Porridge&#39;, 122, 29, 2011],\n            [&#39;Cake&#39;, 143, 30, 2012],\n            [&#39;Latte&#39;, 201, 19, 2012],\n            [&#39;Tofu&#39;, 255, 7, 2012],\n            [&#39;Milk Tee&#39;, 241, 27, 2012],\n            [&#39;Porridge&#39;, 102, 34, 2012],\n            [&#39;Cake&#39;, 153, 28, 2013],\n            [&#39;Latte&#39;, 181, 21, 2013],\n            [&#39;Tofu&#39;, 395, 4, 2013],\n            [&#39;Milk Tee&#39;, 281, 31, 2013],\n            [&#39;Porridge&#39;, 92, 39, 2013],\n            [&#39;Cake&#39;, 223, 29, 2014],\n            [&#39;Latte&#39;, 211, 17, 2014],\n            [&#39;Tofu&#39;, 345, 3, 2014],\n            [&#39;Milk Tee&#39;, 211, 35, 2014],\n            [&#39;Porridge&#39;, 72, 24, 2014]\n        ]\n    }, {\n        transform: {\n            type: &#39;filter&#39;,\n            config: { dimension: &#39;Year&#39;, &#39;=&#39;: 2011 }\n            // 这个筛选条件表示,遍历数据,筛选出维度( dimension )\n            // &#39;Year&#39; 上值为 2011 的所有数据项。\n        }\n    }],\n    series: {\n        type: &#39;pie&#39;,\n        datasetIndex: 1\n    }\n};\n</code></pre>\n<p><br>\n<br>\n这是 filter 的另一个例子的效果:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=data-transform-filter&reset=1&edit=1\" width=\"600\" height=\"350\" ></iframe>\n\n\n\n<p>在 &quot;filter&quot; transform 中,有这些要素:</p>\n<p><strong>关于维度( dimension ):</strong></p>\n<p><code class=\"codespan\">config.dimension</code> 指定了维度,能设成这样的值:</p>\n<ul>\n<li>设定成声明在 dataset 中的维度名,例如 <code class=\"codespan\">config: { dimension: &#39;Year&#39;, &#39;=&#39;: 2011 }</code>。不过, dataset 中维度名的声明并非强制,所以我们也可以</li>\n<li>设定成 dataset 中的维度 index (index 值从 0 开始)例如 <code class=\"codespan\">config: { dimension: 3, &#39;=&#39;: 2011 }</code>。</li>\n</ul>\n<p><strong>关于关系比较操作符:</strong></p>\n<p>关系操作符,可以设定这些:\n<code class=\"codespan\">&gt;</code>(<code class=\"codespan\">gt</code>)、<code class=\"codespan\">&gt;=</code>(<code class=\"codespan\">gte</code>)、<code class=\"codespan\">&lt;</code>(<code class=\"codespan\">lt</code>)、<code class=\"codespan\">&lt;=</code>(<code class=\"codespan\">lte</code>)、<code class=\"codespan\">=</code>(<code class=\"codespan\">eq</code>)、<code class=\"codespan\">!=</code>(<code class=\"codespan\">ne</code>、<code class=\"codespan\">&lt;&gt;</code>)、<code class=\"codespan\">reg</code>。(小括号中的符号或名字,是别名,设置起来作用相同)。他们首先基本地能基于数值大小进行比较,然后也有些额外的功能特性:</p>\n<ul>\n<li>多个关系操作符能声明在一个 {} 中,例如 <code class=\"codespan\">{ dimension: &#39;Price&#39;, &#39;&gt;=&#39;: 20, &#39;&lt;&#39;: 30 }</code>。这表示“与”的关系,即,筛选出价格大于等于 20 小于 30 的数据项。</li>\n<li>data 里的值,不仅可以是数值( number ),也可以是“类数值的字符串”(“ numeric string ”)。“类数值的字符串”本身是一个字符串,但是可以被转换为字面所描述的数值,例如 <code class=\"codespan\">&#39; 123 &#39;</code>。转换过程中,空格(全角半角空格)和换行符都能被消除( trim )。</li>\n<li>如果我们需要对日期对象(JS <code class=\"codespan\">Date</code>)或者日期字符串(如 &#39;2012-05-12&#39;)进行比较,我们需要手动指定 <code class=\"codespan\">parser: &#39;time&#39;</code>,例如 <code class=\"codespan\">config: { dimension: 3, lt: &#39;2012-05-12&#39;, parser: &#39;time&#39; }</code>。</li>\n<li>纯字符串比较也被支持,但是只能用在 <code class=\"codespan\">=</code> 或 <code class=\"codespan\">!=</code> 上。而 <code class=\"codespan\">&gt;</code>, <code class=\"codespan\">&gt;=</code>, <code class=\"codespan\">&lt;</code>, <code class=\"codespan\">&lt;=</code> 并不支持纯字符串比较,也就是说,这四个操作符的右值,不能是字符串。</li>\n<li><code class=\"codespan\">reg</code> 操作符能提供正则表达式比较。例如, <code class=\"codespan\">{ dimension: &#39;Name&#39;, reg: /\\s+Müller\\s*$/ }</code> 能在 <code class=\"codespan\">&#39;Name&#39;</code> 维度上选出姓 <code class=\"codespan\">&#39;Müller&#39;</code> 的数据项。</li>\n</ul>\n<p><strong>关于逻辑比较:</strong></p>\n<p>我们也支持了逻辑比较操作符 <strong>与或非</strong>( <code class=\"codespan\">and</code> | <code class=\"codespan\">or</code> | <code class=\"codespan\">not</code> ):</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        source: [...]\n    }, {\n        transform: {\n            type: &#39;filter&#39;,\n            config: {\n                // 使用 and 操作符。\n                // 类似地,同样的位置也可以使用 “or” 或 “not”。\n                // 但是注意 “not” 后应该跟一个 {...} 而非 [...] 。\n                and: [\n                    { dimension: &#39;Year&#39;, &#39;=&#39;: 2011 },\n                    { dimension: &#39;Price&#39;, &#39;&gt;=&#39;: 20, &#39;&lt;&#39;: 30 }\n                ]\n            }\n            // 这个表达的是,选出 2011 年价格大于等于 20 但小于 30 的数据项。\n        }\n    }],\n    series: {\n        type: &#39;pie&#39;,\n        datasetIndex: 1\n    }\n};\n</code></pre>\n<p><code class=\"codespan\">and</code>/<code class=\"codespan\">or</code>/<code class=\"codespan\">not</code> 自然可以被嵌套,例如:</p>\n<pre><code class=\"lang-js\">transform: {\n    type: &#39;filter&#39;,\n    config: {\n        or: [{\n            and: [{\n                dimension: &#39;Price&#39;, &#39;&gt;=&#39;: 10, &#39;&lt;&#39;: 20\n            }, {\n                dimension: &#39;Sales&#39;, &#39;&lt;&#39;: 100\n            }, {\n                not: { dimension: &#39;Product&#39;, &#39;=&#39;: &#39;Tofu&#39; }\n            }]\n        }, {\n            and: [{\n                dimension: &#39;Price&#39;, &#39;&gt;=&#39;: 10, &#39;&lt;&#39;: 20\n            }, {\n                dimension: &#39;Sales&#39;, &#39;&lt;&#39;: 100\n            }, {\n                not: { dimension: &#39;Product&#39;, &#39;=&#39;: &#39;Cake&#39; }\n            }]\n        }]\n    }\n}\n</code></pre>\n<p><strong>关于解析器( parser ):</strong></p>\n<p>还可以指定“解析器”( parser )来对值进行解析后再做比较。现在支持的解析器有:</p>\n<ul>\n<li><code class=\"codespan\">parser: &#39;time&#39;</code>:把原始值解析成时间戳( timestamp )后再做比较。这个解析器的行为,和 <code class=\"codespan\">echarts.time.parse</code> 相同,即,当原始值为时间对象( JS <code class=\"codespan\">Date</code> 实例),或者是时间戳,或者是描述时间的字符串(例如 <code class=\"codespan\">&#39;2012-05-12 03:11:22&#39;</code> ),都可以被解析为时间戳,然后就可以基于数值大小进行比较。如果原始数据是其他不可解析为时间戳的值,那么会被解析为 NaN。</li>\n<li><code class=\"codespan\">parser: &#39;trim&#39;</code>:如果原始数据是字符串,则把字符串两端的空格(全角半角)和换行符去掉。如果不是字符串,还保持为原始数据。</li>\n<li><code class=\"codespan\">parser: &#39;number&#39;</code>:强制把原始数据转成数值。如果不能转成有意义的数值,那么转成 <code class=\"codespan\">NaN</code>。在大多数场景下,我们并不需要这个解析器,因为按默认策略,“像数值的字符串”就会被转成数值。但是默认策略比较严格,这个解析器比较宽松,如果我们遇到含有尾缀的字符串(例如 <code class=\"codespan\">&#39;33%&#39;</code>, <code class=\"codespan\">12px</code>),我们需要手动指定 <code class=\"codespan\">parser: &#39;number&#39;</code>,从而去掉尾缀转为数值才能比较。</li>\n</ul>\n<p>这个例子显示了如何使用 <code class=\"codespan\">parser: &#39;time&#39;</code>:</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        source: [\n            [&#39;Product&#39;, &#39;Sales&#39;, &#39;Price&#39;, &#39;Date&#39;],\n            [&#39;Milk Tee&#39;, 311, 21, &#39;2012-05-12&#39;],\n            [&#39;Cake&#39;, 135, 28, &#39;2012-05-22&#39;],\n            [&#39;Latte&#39;, 262, 36, &#39;2012-06-02&#39;],\n            [&#39;Milk Tee&#39;, 359, 21, &#39;2012-06-22&#39;],\n            [&#39;Cake&#39;, 121, 28, &#39;2012-07-02&#39;],\n            [&#39;Latte&#39;, 271, 36, &#39;2012-06-22&#39;],\n            ...\n        ]\n    }, {\n        transform: {\n            type: &#39;filter&#39;,\n            config: {\n                { dimension: &#39;Date&#39;, &#39;&gt;=&#39;: &#39;2012-05&#39;, &#39;&lt;&#39;: &#39;2012-06&#39;, parser: &#39;time&#39; }\n            }\n        }\n    }]\n}\n</code></pre>\n<p><strong>形式化定义:</strong></p>\n<p>最后,我们给出,数据转换器 &quot;filter&quot; 的 config 的形式化定义:</p>\n<pre><code class=\"lang-ts\">type FilterTransform = {\n    type: &#39;filter&#39;;\n    config: ConditionalExpressionOption;\n};\ntype ConditionalExpressionOption =\n    true | false | RelationalExpressionOption | LogicalExpressionOption;\ntype RelationalExpressionOption = {\n    dimension: DimensionName | DimensionIndex;\n    parser?: &#39;time&#39; | &#39;trim&#39; | &#39;number&#39;;\n    lt?: DataValue; // less than\n    lte?: DataValue; // less than or equal\n    gt?: DataValue; // greater than\n    gte?: DataValue; // greater than or equal\n    eq?: DataValue; // equal\n    ne?: DataValue; // not equal\n    &#39;&lt;&#39;?: DataValue; // lt\n    &#39;&lt;=&#39;?: DataValue; // lte\n    &#39;&gt;&#39;?: DataValue; // gt\n    &#39;&gt;=&#39;?: DataValue; // gte\n    &#39;=&#39;?: DataValue; // eq\n    &#39;!=&#39;?: DataValue; // ne\n    &#39;&lt;&gt;&#39;?: DataValue; // ne (SQL style)\n    reg?: RegExp | string; // RegExp\n};\ntype LogicalExpressionOption = {\n    and?: ConditionalExpressionOption[];\n    or?: ConditionalExpressionOption[];\n    not?: ConditionalExpressionOption;\n};\ntype DataValue = string | number | Date;\ntype DimensionName = string;\ntype DimensionIndex = number;\n</code></pre>\n<h2 id=\"-sort\">数据转换器 &quot;sort&quot;</h2>\n<p>&quot;sort&quot; 是另一个内置的数据转换器,用于排序数据。目前主要能用于在类目轴( <code class=\"codespan\">axis.type: &#39;category&#39;</code> )中显示排过序的数据。例如:</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        dimensions: [&#39;name&#39;, &#39;age&#39;, &#39;profession&#39;, &#39;score&#39;, &#39;date&#39;],\n        source: [\n            [&#39; Hannah Krause &#39;, 41, &#39;Engineer&#39;, 314, &#39;2011-02-12&#39;],\n            [&#39;Zhao Qian &#39;, 20, &#39;Teacher&#39;, 351, &#39;2011-03-01&#39;],\n            [&#39; Jasmin Krause &#39;, 52, &#39;Musician&#39;, 287, &#39;2011-02-14&#39;],\n            [&#39;Li Lei&#39;, 37, &#39;Teacher&#39;, 219, &#39;2011-02-18&#39;],\n            [&#39; Karle Neumann &#39;, 25, &#39;Engineer&#39;, 253, &#39;2011-04-02&#39;],\n            [&#39; Adrian Groß&#39;, 19, &#39;Teacher&#39;, null, &#39;2011-01-16&#39;],\n            [&#39;Mia Neumann&#39;, 71, &#39;Engineer&#39;, 165, &#39;2011-03-19&#39;],\n            [&#39; Böhm Fuchs&#39;, 36, &#39;Musician&#39;, 318, &#39;2011-02-24&#39;],\n            [&#39;Han Meimei &#39;, 67, &#39;Engineer&#39;, 366, &#39;2011-03-12&#39;],\n        ]\n    }, {\n        transform: {\n            type: &#39;sort&#39;,\n            // 按分数排序\n            config: { dimension: &#39;score&#39;, order: &#39;asc&#39; }\n        }\n    }],\n    series: {\n        type: &#39;bar&#39;,\n        datasetIndex: 1\n    },\n    ...\n};\n</code></pre>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=data-transform-sort-bar&reset=1&edit=1\" width=\"600\" height=\"350\" ></iframe>\n\n\n\n<p>数据转换器 &quot;sort&quot; 还有一些额外的功能:</p>\n<ul>\n<li>可以多重排序,多个维度一起排序。见下面的例子。</li>\n<li>排序规则是这样的:<ul>\n<li>默认按照数值大小排序。其中,“可转为数值的字符串”也被转换成数值,和其他数值一起按大小排序。</li>\n<li>对于其他“不能转为数值的字符串”,也能在它们之间按字符串进行排序。这个特性有助于这种场景:把相同标签的数据项排到一起,尤其是当多个维度共同排序时。见下面的例子。</li>\n<li>当“数值及可转为数值的字符串”和“不能转为数值的字符串”进行排序时,或者它们和“其他类型的值”进行比较时,它们本身是不知如何进行比较的。那么我们称呼“后者”为“incomparable”,并且可以设置 <code class=\"codespan\">incomparable: &#39;min&#39; | &#39;max&#39;</code> 来指定一个“incomparable”在这个比较中是最大还是最小,从而能使它们能产生比较结果。这个设定的用途,比如可以是,决定空值(例如 <code class=\"codespan\">null</code>, <code class=\"codespan\">undefined</code>, <code class=\"codespan\">NaN</code>, <code class=\"codespan\">&#39;&#39;</code>, <code class=\"codespan\">&#39;-&#39;</code>)在排序的头还是尾。</li>\n</ul>\n</li>\n<li>过滤器 <code class=\"codespan\">filter: &#39;time&#39; | &#39;trim&#39; | &#39;number&#39;</code> 可以被使用,和数据转换器 &quot;filter&quot; 中的情况一样。<ul>\n<li>如果要对时间进行排序(例如,值为 JS <code class=\"codespan\">Date</code> 实例或者时间字符串如 <code class=\"codespan\">&#39;2012-03-12 11:13:54&#39;</code>),我们需要声明 <code class=\"codespan\">parser: &#39;time&#39;</code>。</li>\n<li>如果需要对有后缀的数值进行排序(如 <code class=\"codespan\">&#39;33%&#39;</code>, <code class=\"codespan\">&#39;16px&#39;</code>)我们需要声明 <code class=\"codespan\">parser: &#39;number&#39;</code>。</li>\n</ul>\n</li>\n</ul>\n<p>这是一个“多维度排序”的例子。</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        dimensions: [&#39;name&#39;, &#39;age&#39;, &#39;profession&#39;, &#39;score&#39;, &#39;date&#39;],\n        source: [\n            [&#39; Hannah Krause &#39;, 41, &#39;Engineer&#39;, 314, &#39;2011-02-12&#39;],\n            [&#39;Zhao Qian &#39;, 20, &#39;Teacher&#39;, 351, &#39;2011-03-01&#39;],\n            [&#39; Jasmin Krause &#39;, 52, &#39;Musician&#39;, 287, &#39;2011-02-14&#39;],\n            [&#39;Li Lei&#39;, 37, &#39;Teacher&#39;, 219, &#39;2011-02-18&#39;],\n            [&#39; Karle Neumann &#39;, 25, &#39;Engineer&#39;, 253, &#39;2011-04-02&#39;],\n            [&#39; Adrian Groß&#39;, 19, &#39;Teacher&#39;, null, &#39;2011-01-16&#39;],\n            [&#39;Mia Neumann&#39;, 71, &#39;Engineer&#39;, 165, &#39;2011-03-19&#39;],\n            [&#39; Böhm Fuchs&#39;, 36, &#39;Musician&#39;, 318, &#39;2011-02-24&#39;],\n            [&#39;Han Meimei &#39;, 67, &#39;Engineer&#39;, 366, &#39;2011-03-12&#39;],\n        ]\n    }, {\n        transform: {\n            type: &#39;sort&#39;,\n            config: [\n                // 对两个维度按声明的优先级分别排序。\n                { dimension: &#39;profession&#39;, order: &#39;desc&#39; },\n                { dimension: &#39;score&#39;, order: &#39;desc&#39; }\n            ]\n        }\n    }],\n    series: {\n        type: &#39;bar&#39;,\n        datasetIndex: 1\n    },\n    ...\n};\n</code></pre>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/data-transform-multiple-sort-bar&reset=1&edit=1\" width=\"600\" height=\"350\" ></iframe>\n\n\n\n<p>最后,我们给出数据转换器 &quot;sort&quot; 的 config 的形式化定义。</p>\n<pre><code class=\"lang-ts\">type SortTransform = {\n    type: &#39;filter&#39;;\n    config: OrderExpression | OrderExpression[];\n};\ntype OrderExpression = {\n    dimension: DimensionName | DimensionIndex;\n    order: &#39;asc&#39; | &#39;desc&#39;;\n    incomparable?: &#39;min&#39; | &#39;max&#39;;\n    parser?: &#39;time&#39; | &#39;trim&#39; | &#39;number&#39;;\n};\ntype DimensionName = string;\ntype DimensionIndex = number;\n</code></pre>\n<h2 id=\"-\">使用外部的数据转换器</h2>\n<p>除了上述的内置的数据转换器外,我们也可以使用外部的数据转换器。外部数据转换器能提供或自己定制更丰富的功能。下面的例子中,我们使用第三方库 <a href=\"https://github.com/ecomfe/echarts-stat\" target=\"_blank\">ecStat</a> 提供的数据转换器。</p>\n<p>生成数据的回归线:</p>\n<pre><code class=\"lang-js\">// 首先要注册外部数据转换器。\necharts.registerTransform(ecStatTransform(ecStat).regression);\n</code></pre>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        source: rawData\n    }, {\n        transform: {\n            // 引用注册的数据转换器。\n            // 注意,每个外部的数据转换器,都有名空间(如 &#39;ecStat:xxx&#39;,&#39;ecStat&#39; 是名空间)。\n            // 而内置数据转换器(如 &#39;filter&#39;, &#39;sort&#39;)没有名空间。\n            type: &#39;ecStat:regression&#39;,\n            config: {\n                // 这里是此外部数据转换器所需的参数。\n                method: &#39;exponential&#39;\n            }\n        }\n    }],\n    xAxis: { type: &#39;category&#39; },\n    yAxis: {},\n    series: [{\n        name: &#39;scatter&#39;,\n        type: &#39;scatter&#39;,\n        datasetIndex: 0\n    }, {\n        name: &#39;regression&#39;,\n        type: &#39;line&#39;,\n        symbol: &#39;none&#39;,\n        datasetIndex: 1\n    }]\n};\n</code></pre>\n<p>一些使用外部转换器的例子:</p>\n<ul>\n<li><a href=\"https://echarts.apache.org/examples/zh/editor.html?c=data-transform-aggregate&amp;edit=1&amp;reset=1\" target=\"_blank\">聚集</a></li>\n<li><a href=\"https://echarts.apache.org/examples/zh/editor.html?c=bar-histogram&amp;edit=1&amp;reset=1\" target=\"_blank\">直方图</a></li>\n<li><a href=\"https://echarts.apache.org/examples/zh/editor.html?c=scatter-clustering&amp;edit=1&amp;reset=1\" target=\"_blank\">简单聚类</a></li>\n<li><a href=\"https://echarts.apache.org/examples/zh/editor.html?c=scatter-linear-regression&amp;edit=1&amp;reset=1\" target=\"_blank\">线性回归线</a></li>\n<li><a href=\"https://echarts.apache.org/examples/zh/editor.html?c=scatter-exponential-regression&amp;edit=1&amp;reset=1\" target=\"_blank\">指数回归线</a></li>\n<li><a href=\"https://echarts.apache.org/examples/zh/editor.html?c=scatter-logarithmic-regression&amp;edit=1&amp;reset=1\" target=\"_blank\">对数回归线</a></li>\n<li><a href=\"https://echarts.apache.org/examples/zh/editor.html?c=scatter-polynomial-regression&amp;edit=1&amp;reset=1\" target=\"_blank\">多项式回归线</a></li>\n</ul>\n"},"在图表中加入交互组件":{"type":["*"],"description":"<p>除了图表外 Apache ECharts<sup>TM</sup> 中,提供了很多交互组件。例如:</p>\n<p><code class=\"codespan\">图例组件</code> <a href=\"option.html#legend\" target=\"_blank\">legend</a>、<code class=\"codespan\">标题组件</code> <a href=\"option.html#title\" target=\"_blank\">title</a>、<code class=\"codespan\">视觉映射组件</code> <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a>、<code class=\"codespan\">数据区域缩放组件</code> <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a>、<code class=\"codespan\">时间线组件</code> <a href=\"option.html#timeline\" target=\"_blank\">timeline</a></p>\n<p>下面以 <code class=\"codespan\">数据区域缩放组件</code> <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a> 为例,介绍如何加入这种组件。</p>\n<h2 id=\"-datazoom-\">数据区域缩放组件(dataZoom)介绍</h2>\n<p>『概览数据整体,按需关注数据细节』是数据可视化的基本交互需求。<code class=\"codespan\">dataZoom</code> 组件能够在直角坐标系(<a href=\"option.html#grid\" target=\"_blank\">grid</a>)、极坐标系(<a href=\"option.html#polar\" target=\"_blank\">polar</a>)中实现这一功能。</p>\n<p><strong>如下例子:</strong></p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/scatter-dataZoom-all&edit=1&reset=1\" width=\"600\" height=\"400\" ></iframe>\n\n\n<p><br></p>\n<ul>\n<li><code class=\"codespan\">dataZoom</code> 组件是对 <code class=\"codespan\">数轴(axis)</code> 进行『数据窗口缩放』『数据窗口平移』操作。</li>\n</ul>\n<blockquote>\n<p>可以通过 <a href=\"option.html#dataZoom.xAxisIndex\" target=\"_blank\">dataZoom.xAxisIndex</a> 或 <a href=\"option.html#dataZoom.yAxisIndex\" target=\"_blank\">dataZoom.yAxisIndex</a> 来指定 <code class=\"codespan\">dataZoom</code> 控制哪个或哪些数轴。</p>\n</blockquote>\n<ul>\n<li><p><code class=\"codespan\">dataZoom</code> 组件可同时存在多个,起到共同控制的作用。控制同一个数轴的组件,会自动联动。下面例子中会详细说明。</p>\n</li>\n<li><p><code class=\"codespan\">dataZoom</code> 的运行原理是通过『数据过滤』来达到『数据窗口缩放』的效果。</p>\n<p>  数据过滤模式的设置不同,效果也不同,参见:<a href=\"option.html#dataZoom.filterMode\" target=\"_blank\">dataZoom.filterMode</a>。</p>\n</li>\n<li><p><code class=\"codespan\">dataZoom</code> 的数据窗口范围的设置,目前支持两种形式:</p>\n<ul>\n<li><p>百分比形式:参见 <a href=\"option.html#dataZoom.start\" target=\"_blank\">dataZoom.start</a> 和 <a href=\"option.html#dataZoom.end\" target=\"_blank\">dataZoom.end</a>。</p>\n</li>\n<li><p>绝对数值形式:参见 <a href=\"option.html#dataZoom.startValue\" target=\"_blank\">dataZoom.startValue</a> 和 <a href=\"option.html#dataZoom.endValue\" target=\"_blank\">dataZoom.endValue</a>。</p>\n</li>\n</ul>\n</li>\n</ul>\n<p><strong>dataZoom 组件现在支持几种子组件:</strong></p>\n<ul>\n<li><p><a href=\"option.html#dataZoom-inside\" target=\"_blank\">内置型数据区域缩放组件(dataZoomInside)</a>:内置于坐标系中。</p>\n</li>\n<li><p><a href=\"option.html#dataZoom-slider\" target=\"_blank\">滑动条型数据区域缩放组件(dataZoomSlider)</a>:有单独的滑动条操作。</p>\n</li>\n<li><p><a href=\"option.html#toolbox.feature.dataZoom\" target=\"_blank\">框选型数据区域缩放组件(dataZoomSelect)</a>:全屏的选框进行数据区域缩放。入口和配置项均在 <code class=\"codespan\">toolbox</code>中。</p>\n</li>\n</ul>\n<h2 id=\"-datazoom-\">在代码加入 dataZoom 组件</h2>\n<p>先只在对单独一个横轴,加上 dataZoom 组件,代码示例如下:</p>\n<pre><code class=\"lang-javascript\">\noption = {\n    xAxis: {\n        type: &#39;value&#39;\n    },\n    yAxis: {\n        type: &#39;value&#39;\n    },\n    dataZoom: [\n        {   // 这个dataZoom组件,默认控制x轴。\n            type: &#39;slider&#39;, // 这个 dataZoom 组件是 slider 型 dataZoom 组件\n            start: 10,      // 左边在 10% 的位置。\n            end: 60         // 右边在 60% 的位置。\n        }\n    ],\n    series: [\n        {\n            type: &#39;scatter&#39;, // 这是个『散点图』\n            itemStyle: {\n                opacity: 0.8\n            },\n            symbolSize: function (val) {\n                return val[2] * 40;\n            },\n            data: [[&quot;14.616&quot;,&quot;7.241&quot;,&quot;0.896&quot;],[&quot;3.958&quot;,&quot;5.701&quot;,&quot;0.955&quot;],[&quot;2.768&quot;,&quot;8.971&quot;,&quot;0.669&quot;],[&quot;9.051&quot;,&quot;9.710&quot;,&quot;0.171&quot;],[&quot;14.046&quot;,&quot;4.182&quot;,&quot;0.536&quot;],[&quot;12.295&quot;,&quot;1.429&quot;,&quot;0.962&quot;],[&quot;4.417&quot;,&quot;8.167&quot;,&quot;0.113&quot;],[&quot;0.492&quot;,&quot;4.771&quot;,&quot;0.785&quot;],[&quot;7.632&quot;,&quot;2.605&quot;,&quot;0.645&quot;],[&quot;14.242&quot;,&quot;5.042&quot;,&quot;0.368&quot;]]\n        }\n    ]\n}\n</code></pre>\n<p>可以看到如下结果:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/scatter-tutorial-dataZoom-1&edit=1&reset=1\" width=\"600\" height=\"300\" ></iframe>\n\n\n<p><br></p>\n<p>上面的图只能拖动 dataZoom 组件导致窗口变化。如果想在坐标系内进行拖动,以及用滚轮(或移动触屏上的两指滑动)进行缩放,那么要再加上一个 inside 型的 dataZoom组件。直接在上面的 <code class=\"codespan\">option.dataZoom</code> 中增加即可:</p>\n<pre><code class=\"lang-javascript\">option = {\n    ...,\n    dataZoom: [\n        {   // 这个dataZoom组件,默认控制x轴。\n            type: &#39;slider&#39;, // 这个 dataZoom 组件是 slider 型 dataZoom 组件\n            start: 10,      // 左边在 10% 的位置。\n            end: 60         // 右边在 60% 的位置。\n        },\n        {   // 这个dataZoom组件,也控制x轴。\n            type: &#39;inside&#39;, // 这个 dataZoom 组件是 inside 型 dataZoom 组件\n            start: 10,      // 左边在 10% 的位置。\n            end: 60         // 右边在 60% 的位置。\n        }\n    ],\n    ...\n}\n</code></pre>\n<p>可以看到如下结果(能在坐标系中进行滑动,以及使用滚轮缩放了):</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/scatter-tutorial-dataZoom-2&edit=1&reset=1\" width=\"600\" height=\"300\" ></iframe>\n\n\n\n<p><br></p>\n<p>如果想 y 轴也能够缩放,那么在 y 轴上也加上 dataZoom 组件:</p>\n<pre><code class=\"lang-javascript\">option = {\n    ...,\n    dataZoom: [\n        {\n            type: &#39;slider&#39;,\n            xAxisIndex: 0,\n            start: 10,\n            end: 60\n        },\n        {\n            type: &#39;inside&#39;,\n            xAxisIndex: 0,\n            start: 10,\n            end: 60\n        },\n        {\n            type: &#39;slider&#39;,\n            yAxisIndex: 0,\n            start: 30,\n            end: 80\n        },\n        {\n            type: &#39;inside&#39;,\n            yAxisIndex: 0,\n            start: 30,\n            end: 80\n        }\n    ],\n    ...\n}\n</code></pre>\n<p>可以看到如下结果:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/scatter-tutorial-dataZoom-3&edit=1&reset=1\" width=\"600\" height=\"300\" ></iframe>\n\n\n\n\n\n\n\n"},"移动端自适应":{"type":["*"],"description":"<p>Apache ECharts<sup>TM</sup> 工作在用户指定高宽的 DOM 节点(容器)中。ECharts 的『组件』和『系列』都在这个 DOM 节点中,每个节点都可以由用户指定位置。图表库内部并不适宜实现 DOM 文档流布局,因此采用类似绝对布局的简单容易理解的布局方式。但是有时候容器尺寸极端时,这种方式并不能自动避免组件重叠的情况,尤其在移动端小屏的情况下。</p>\n<p>另外,有时会出现一个图表需要同时在PC、移动端上展现的场景。这需要 ECharts 内部组件随着容器尺寸变化而变化的能力。</p>\n<p>为了解决这个问题,ECharts 完善了组件的定位设置,并且实现了类似 <a href=\"https://www.w3.org/TR/css3-mediaqueries/\" target=\"_blank\">CSS Media Query</a> 的自适应能力。</p>\n<h2 id=\"echarts-\">ECharts组件的定位和布局</h2>\n<p>大部分『组件』和『系列』会遵循两种定位方式:</p>\n<p><br>\n<strong>left/right/top/bottom/width/height 定位方式:</strong></p>\n<p>这六个量中,每个量都可以是『绝对值』或者『百分比』或者『位置描述』。</p>\n<ul>\n<li><p>绝对值</p>\n<p>  单位是浏览器像素(px),用 <code class=\"codespan\">number</code> 形式书写(不写单位)。例如 <code class=\"codespan\">{left: 23, height: 400}</code>。</p>\n</li>\n<li><p>百分比</p>\n<p>  表示占 DOM 容器高宽的百分之多少,用 <code class=\"codespan\">string</code> 形式书写。例如 <code class=\"codespan\">{right: &#39;30%&#39;, bottom: &#39;40%&#39;}</code>。</p>\n</li>\n<li><p>位置描述</p>\n<ul>\n<li>可以设置 <code class=\"codespan\">left: &#39;center&#39;</code>,表示水平居中。</li>\n<li>可以设置 <code class=\"codespan\">top: &#39;middle&#39;</code>,表示垂直居中。</li>\n</ul>\n</li>\n</ul>\n<p>这六个量的概念,和 CSS 中六个量的概念类似:</p>\n<ul>\n<li>left:距离 DOM 容器左边界的距离。</li>\n<li>right:距离 DOM 容器右边界的距离。</li>\n<li>top:距离 DOM 容器上边界的距离。</li>\n<li>bottom:距离 DOM 容器下边界的距离。</li>\n<li>width:宽度。</li>\n<li>height:高度。</li>\n</ul>\n<p>在横向,<code class=\"codespan\">left</code>、<code class=\"codespan\">right</code>、<code class=\"codespan\">width</code> 三个量中,只需两个量有值即可,因为任两个量可以决定组件的位置和大小,例如 <code class=\"codespan\">left</code> 和 <code class=\"codespan\">right</code> 或者 <code class=\"codespan\">right</code> 和 <code class=\"codespan\">width</code> 都可以决定组件的位置和大小。\n纵向,<code class=\"codespan\">top</code>、<code class=\"codespan\">bottom</code>、<code class=\"codespan\">height</code> 三个量,和横向类同不赘述。</p>\n<p><br>\n<strong><code class=\"codespan\">center</code> / <code class=\"codespan\">radius</code> 定位方式:</strong></p>\n<ul>\n<li><p><code class=\"codespan\">center</code></p>\n<p>  是一个数组,表示 <code class=\"codespan\">[x, y]</code>,其中,<code class=\"codespan\">x</code>、<code class=\"codespan\">y</code>可以是『绝对值』或者『百分比』,含义和前述相同。</p>\n</li>\n<li><p><code class=\"codespan\">radius</code></p>\n<p>  是一个数组,表示 <code class=\"codespan\">[内半径, 外半径]</code>,其中,内外半径可以是『绝对值』或者『百分比』,含义和前述相同。</p>\n<p>  在自适应容器大小时,百分比设置是很有用的。</p>\n</li>\n</ul>\n<p><br>\n<strong>横向(horizontal)和纵向(vertical)</strong></p>\n<p>ECharts的『外观狭长』型的组件(如 <code class=\"codespan\">legend</code>、<code class=\"codespan\">visualMap</code>、<code class=\"codespan\">dataZoom</code>、<code class=\"codespan\">timeline</code>等),大多提供了『横向布局』『纵向布局』的选择。例如,在细长的移动端屏幕上,可能适合使用『纵向布局』;在PC宽屏上,可能适合使用『横向布局』。</p>\n<p>横纵向布局的设置,一般在『组件』或者『系列』的 <code class=\"codespan\">orient</code> 或者 <code class=\"codespan\">layout</code> 配置项上,设置为 <code class=\"codespan\">&#39;horizontal&#39;</code> 或者 <code class=\"codespan\">&#39;vertical&#39;</code>。</p>\n<p><br>\n<strong>与 ECharts2 的兼容:</strong></p>\n<p>ECharts2 中的 <code class=\"codespan\">x/x2/y/y2</code> 的命名方式仍被兼容,对应于 <code class=\"codespan\">left/right/top/bottom</code>。但是建议写 <code class=\"codespan\">left/right/top/bottom</code>。</p>\n<p>位置描述中,为兼容 ECharts2,可以支持一些看起来略奇怪的设置:<code class=\"codespan\">left: &#39;right&#39;</code>、<code class=\"codespan\">left: &#39;left&#39;</code>、<code class=\"codespan\">top: &#39;bottom&#39;</code>、<code class=\"codespan\">top: &#39;top&#39;</code>。这些语句分别等效于:<code class=\"codespan\">right: 0</code>、<code class=\"codespan\">left: 0</code>、<code class=\"codespan\">bottom: 0</code>、<code class=\"codespan\">top: 0</code>,写成后者就不奇怪了。</p>\n<h2 id=\"media-query\">Media Query</h2>\n<p><a href=\"https://www.w3.org/TR/css3-mediaqueries/#media1\" target=\"_blank\">Media Query</a> 提供了『随着容器尺寸改变而改变』的能力。</p>\n<p>如下例子,可尝试拖动<strong>右下角的圆点</strong>,随着尺寸变化,legend 和 系列会自动改变布局位置和方式。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/pie-media&edit=1&reset=1\" width=\"750\" height=\"600\" ></iframe>\n\n\n<p>要在 option 中设置 Media Query 须遵循如下格式:</p>\n<pre><code class=\"lang-javascript\">option = {\n    // 这里是基本的『原子option』。\n    title: {...},\n    legend: {...},\n    series: [{...}, {...}, ...],\n    ...,\n    media: [ // 这里定义了 media query 的逐条规则。\n        {\n            query: {...},   // 这里写规则。\n            option: {       // 这里写此规则满足下的option。\n                legend: {...},\n                ...\n            }\n        },\n        {\n            query: {...},   // 第二个规则。\n            option: {       // 第二个规则对应的option。\n                legend: {...},\n                ...\n            }\n        },\n        {                   // 这条里没有写规则,表示『默认』,\n            option: {       // 即所有规则都不满足时,采纳这个option。\n                legend: {...},\n                ...\n            }\n        }\n    ]\n};\n</code></pre>\n<p>上面的例子中,<code class=\"codespan\">baseOption</code>、以及 <code class=\"codespan\">media</code> 每个 option 都是『原子 option』,即普通的含有各组件、系列定义的 option。而由『原子option』组合成的整个 option,我们称为『复合 option』。<code class=\"codespan\">baseOption</code> 是必然被使用的,此外,满足了某个 <code class=\"codespan\">query</code> 条件时,对应的 option 会被使用 <code class=\"codespan\">chart.mergeOption()</code> 来 merge 进去。</p>\n<p><strong>query:</strong></p>\n<p>每个 <code class=\"codespan\">query</code> 类似于这样:</p>\n<pre><code class=\"lang-javascript\">{\n    minWidth: 200,\n    maxHeight: 300,\n    minAspectRatio: 1.3\n}\n</code></pre>\n<p>现在支持三个属性:<code class=\"codespan\">width</code>、<code class=\"codespan\">height</code>、<code class=\"codespan\">aspectRatio</code>(长宽比)。每个属性都可以加上 <code class=\"codespan\">min</code> 或 <code class=\"codespan\">max</code> 前缀。比如,<code class=\"codespan\">minWidth: 200</code> 表示『大于等于200px宽度』。两个属性一起写表示『并且』,比如:<code class=\"codespan\">{minWidth: 200, maxHeight: 300}</code> 表示『大于等于200px宽度,并且小于等于300px高度』。</p>\n<p><strong>option:</strong></p>\n<p><code class=\"codespan\">media</code>中的 option 既然是『原子 option』,理论上可以写任何 option 的配置项。但是一般我们只写跟布局定位相关的,例如截取上面例子中的一部分 query option:</p>\n<pre><code class=\"lang-javascript\">media: [\n    ...,\n    {\n        query: {\n            maxAspectRatio: 1           // 当长宽比小于1时。\n        },\n        option: {\n            legend: {                   // legend 放在底部中间。\n                right: &#39;center&#39;,\n                bottom: 0,\n                orient: &#39;horizontal&#39;    // legend 横向布局。\n            },\n            series: [                   // 两个饼图左右布局。\n                {\n                    radius: [20, &#39;50%&#39;],\n                    center: [&#39;50%&#39;, &#39;30%&#39;]\n                },\n                {\n                    radius: [30, &#39;50%&#39;],\n                    center: [&#39;50%&#39;, &#39;70%&#39;]\n                }\n            ]\n        }\n    },\n    {\n        query: {\n            maxWidth: 500               // 当容器宽度小于 500 时。\n        },\n        option: {\n            legend: {\n                right: 10,              // legend 放置在右侧中间。\n                top: &#39;15%&#39;,\n                orient: &#39;vertical&#39;      // 纵向布局。\n            },\n            series: [                   // 两个饼图上下布局。\n                {\n                    radius: [20, &#39;50%&#39;],\n                    center: [&#39;50%&#39;, &#39;30%&#39;]\n                },\n                {\n                    radius: [30, &#39;50%&#39;],\n                    center: [&#39;50%&#39;, &#39;75%&#39;]\n                }\n            ]\n        }\n    },\n    ...\n]\n</code></pre>\n<p><strong>多个 query 被满足时的优先级:</strong></p>\n<p>注意,可以有多个 <code class=\"codespan\">query</code> 同时被满足,会都被 <code class=\"codespan\">mergeOption</code>,定义在后的后被 merge(即优先级更高)。</p>\n<p><strong>默认 query:</strong></p>\n<p>如果 <code class=\"codespan\">media</code> 中有某项不写 <code class=\"codespan\">query</code>,则表示『默认值』,即所有规则都不满足时,采纳这个option。</p>\n<p><strong>容器大小实时变化时的注意事项:</strong></p>\n<p>在不少情况下,并不需要容器DOM节点任意随着拖拽变化大小,而是只是根据不同终端设置几个典型尺寸。</p>\n<p>但是如果容器DOM节点需要能任意随着拖拽变化大小,那么目前使用时需要注意这件事:某个配置项,如果在某一个 <code class=\"codespan\">query option</code> 中出现,那么在其他 <code class=\"codespan\">query option</code> 中也必须出现,否则不能够回归到原来的状态。(<code class=\"codespan\">left/right/top/bottom/width/height</code> 不受这个限制。)</p>\n<p><strong>『复合 option』 中的 <code class=\"codespan\">media</code> 不支持 merge</strong></p>\n<p>也就是说,当第二(或三、四、五 ...)次 <code class=\"codespan\">chart.setOption(rawOption)</code> 时,如果 <code class=\"codespan\">rawOption</code> 是 <code class=\"codespan\">复合option</code>(即包含 <code class=\"codespan\">media</code> 列表),那么新的 <code class=\"codespan\">rawOption.media</code> 列表不会和老的 <code class=\"codespan\">media</code> 列表进行 merge,而是简单替代。当然,<code class=\"codespan\">baseOption</code> 仍然会正常和老的 option 进行merge。</p>\n<p>其实,很少有场景需要使用『复合 option』来多次 <code class=\"codespan\">setOption</code>,而我们推荐的做法是,使用 mediaQuery 时,第一次setOption使用『复合 option』,后面 <code class=\"codespan\">setOption</code> 时仅使用 『原子 option』,也就是仅仅用 setOption 来改变 <code class=\"codespan\">baseOption</code>。</p>\n<p><br>\n最后看一个和时间轴结合的例子:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/bar-media-timeline&edit=1&reset=1\" width=\"750\" height=\"700\" ></iframe>\n\n\n\n\n"},"数据的视觉映射":{"type":["*"],"description":"<p>数据可视化是 <strong>数据</strong> 到 <strong>视觉元素</strong> 的映射过程(这个过程也可称为视觉编码,视觉元素也可称为视觉通道)。</p>\n<p>Apache ECharts<sup>TM</sup> 的每种图表本身就内置了这种映射过程,比如折线图把数据映射到『线』,柱状图把数据映射到『长度』。一些更复杂的图表,如 <code class=\"codespan\">graph</code>、<code class=\"codespan\">事件河流图</code>、<code class=\"codespan\">treemap</code> 也都会做出他们内置的映射。</p>\n<p>此外,ECharts 还提供了 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap 组件</a> 来提供通用的视觉映射。<code class=\"codespan\">visualMap</code> 组件中可以使用的视觉元素有:<br>\n<code class=\"codespan\">图形类别(symbol)</code>、<code class=\"codespan\">图形大小(symbolSize)</code><br>\n<code class=\"codespan\">颜色(color)</code>、<code class=\"codespan\">透明度(opacity)</code>、<code class=\"codespan\">颜色透明度(colorAlpha)</code>、<br>\n<code class=\"codespan\">颜色明暗度(colorLightness)</code>、<code class=\"codespan\">颜色饱和度(colorSaturation)</code>、<code class=\"codespan\">色调(colorHue)</code></p>\n<p>下面对 <code class=\"codespan\">visualMap</code> 组件的使用方式进行简要的介绍。</p>\n<h2 id=\"-\">数据和维度</h2>\n<p>ECharts中的数据,一般存放于 <a href=\"option.html#series.data\" target=\"_blank\">series.data</a> 中。根据图表类型不同,数据的具体形式也可能有些许差异。比如可能是『线性表』、『树』、『图』等。但他们都有个共性:都是『数据项(dataItem)』的集合。每个数据项含有『数据值(value)』和其他信息(如果需要的话)。每个数据值,可以是单一的数值(一维)或者一个数组(多维)。</p>\n<p>例如,<a href=\"option.html#series.data\" target=\"_blank\">series.data</a> 最常见的形式,是『线性表』,即一个普通数组:</p>\n<pre><code class=\"lang-javascript\">series: {\n    data: [\n        {       // 这里每一个项就是数据项(dataItem)\n            value: 2323, // 这是数据项的数据值(value)\n            itemStyle: {...}\n        },\n        1212,   // 也可以直接是 dataItem 的 value,这更常见。\n        2323,   // 每个 value 都是『一维』的。\n        4343,\n        3434\n    ]\n}\n</code></pre>\n<pre><code class=\"lang-javascript\">series: {\n    data: [\n        {                        // 这里每一个项就是数据项(dataItem)\n            value: [3434, 129,  &#39;圣马力诺&#39;], // 这是数据项的数据值(value)\n            itemStyle: {...}\n        },\n        [1212, 5454, &#39;梵蒂冈&#39;],   // 也可以直接是 dataItem 的 value,这更常见。\n        [2323, 3223, &#39;瑙鲁&#39;],     // 每个 value 都是『三维』的,每列是一个维度。\n        [4343, 23,   &#39;图瓦卢&#39;]    // 假如是『气泡图』,常见第一维度映射到x轴,\n                                 // 第二维度映射到y轴,\n                                 // 第三维度映射到气泡半径(symbolSize)\n    ]\n}\n</code></pre>\n<p>在图表中,往往默认把 value 的前一两个维度进行映射,比如取第一个维度映射到x轴,取第二个维度映射到y轴。如果想要把更多的维度展现出来,可以借助 <code class=\"codespan\">visualMap</code> 。最常见的情况,<a href=\"option.html#series-scatter\" target=\"_blank\">气泡图(scatter)</a> 使用半径展现了第三个维度。</p>\n<h2 id=\"visualmap-\">visualMap 组件</h2>\n<p>visualMap 组件定义了把数据的『哪个维度』映射到『什么视觉元素上』。</p>\n<p>现在提供如下两种类型的visualMap组件,通过 <a href=\"option.html#visualMap.type\" target=\"_blank\">visualMap.type</a> 来区分。</p>\n<p>其定义结构例如:</p>\n<pre><code class=\"lang-javascript\">option = {\n    visualMap: [ // 可以同时定义多个 visualMap 组件。\n        { // 第一个 visualMap 组件\n            type: &#39;continuous&#39;, // 定义为连续型 visualMap\n            ...\n        },\n        { // 第二个 visualMap 组件\n            type: &#39;piecewise&#39;, // 定义为分段型 visualMap\n            ...\n        }\n    ],\n    ...\n};\n</code></pre>\n<p><a href=\"option.html#visualMap-continuous\" target=\"_blank\">连续型(visualMapContinuous)</a></p>\n<p><a href=\"option.html#visualMap-piecewise\" target=\"_blank\">分段型(visualMapPiecewise)</a>:</p>\n<p>分段型视觉映射组件(visualMapPiecewise),有三种模式:</p>\n<ul>\n<li>连续型数据平均分段: 依据 <a href=\"option.html#visualMap-piecewise.splitNumber\" target=\"_blank\">visualMap-piecewise.splitNumber</a> 来自动平均分割成若干块。</li>\n<li>连续型数据自定义分段: 依据 <a href=\"option.html#visualMap-piecewise.pieces\" target=\"_blank\">visualMap-piecewise.pieces</a> 来定义每块范围。</li>\n<li>离散数据(类别性数据): 类别定义在 <a href=\"option.html#visualMap-piecewise.categories\" target=\"_blank\">visualMap-piecewise.categories</a> 中。</li>\n</ul>\n<p><br>\n<strong>视觉映射方式的配置</strong></p>\n<p>既然是『数据』到『视觉元素』的映射,<code class=\"codespan\">visualMap</code> 中可以指定数据的『哪个维度』(参见<a href=\"#visualMap.dimension\">visualMap.dimension</a>)映射到哪些『视觉元素』(参见 <a href=\"option.html#visualMap.inRange\" target=\"_blank\">visualMap.inRange</a> 和 <a href=\"option.html#visualMap.outOfRange\" target=\"_blank\">visualMap.outOfRange</a>)中。</p>\n<p>例一:</p>\n<pre><code class=\"lang-javascript\">option = {\n    visualMap: [\n        {\n            type: &#39;piecewise&#39;,\n            min: 0,\n            max: 5000,\n            dimension: 3,       // series.data 的第四个维度(即 value[3])被映射\n            seriesIndex: 4,     // 对第四个系列进行映射。\n            inRange: {          // 选中范围中的视觉配置\n                color: [&#39;blue&#39;, &#39;#121122&#39;, &#39;red&#39;], // 定义了图形颜色映射的颜色列表,\n                                                    // 数据最小值映射到&#39;blue&#39;上,\n                                                    // 最大值映射到&#39;red&#39;上,\n                                                    // 其余自动线性计算。\n                symbolSize: [30, 100]               // 定义了图形尺寸的映射范围,\n                                                    // 数据最小值映射到30上,\n                                                    // 最大值映射到100上,\n                                                    // 其余自动线性计算。\n            },\n            outOfRange: {       // 选中范围外的视觉配置\n                symbolSize: [30, 100]\n            }\n        },\n        ...\n    ]\n};\n</code></pre>\n<p>例二:</p>\n<pre><code class=\"lang-javascript\">option = {\n    visualMap: [\n        {\n            ...,\n            inRange: {          // 选中范围中的视觉配置\n                colorLightness: [0.2, 1], // 映射到明暗度上。也就是对本来的颜色进行明暗度处理。\n                                          // 本来的颜色可能是从全局色板中选取的颜色,visualMap组件并不关心。\n                symbolSize: [30, 100]\n            },\n            ...\n        },\n        ...\n    ]\n};\n</code></pre>\n<p>更多详情,参见 <a href=\"option.html#visualMap.inRange\" target=\"_blank\">visualMap.inRange</a> 和 <a href=\"option.html#visualMap.outOfRange\" target=\"_blank\">visualMap.outOfRange</a>。</p>\n"},"ECharts 中的事件和行为":{"type":["*"],"description":"<p>在 Apache ECharts<sup>TM</sup> 的图表中用户的操作将会触发相应的事件。开发者可以监听这些事件,然后通过回调函数做相应的处理,比如跳转到一个地址,或者弹出对话框,或者做数据下钻等等。</p>\n<p>在 ECharts 3 中绑定事件跟 2 一样都是通过 <a href=\"api.html#EChartsInstance.on\" target=\"_blank\">on</a> 方法,但是事件名称比 2 更加简单了。ECharts 3 中,事件名称对应 DOM 事件名称,均为小写的字符串,如下是一个绑定点击操作的示例。</p>\n<pre><code class=\"lang-js\">myChart.on(&#39;click&#39;, function (params) {\n    // 控制台打印数据的名称\n    console.log(params.name);\n});\n</code></pre>\n<p>在 ECharts 中事件分为两种类型,一种是用户鼠标操作点击,或者 hover 图表的图形时触发的事件,还有一种是用户在使用可以交互的组件后触发的行为事件,例如在切换图例开关时触发的 <a href=\"api.html#events.legendselectchanged\" target=\"_blank\">&#39;legendselectchanged&#39;</a> 事件(这里需要注意切换图例开关是不会触发<code class=\"codespan\">&#39;legendselected&#39;</code>事件的),数据区域缩放时触发的 <a href=\"api.html#events.legendselectchanged\" target=\"_blank\">&#39;datazoom&#39;</a> 事件等等。</p>\n<h2 id=\"-\">鼠标事件的处理</h2>\n<p>ECharts 支持常规的鼠标事件类型,包括 <code class=\"codespan\">&#39;click&#39;</code>、<code class=\"codespan\">&#39;dblclick&#39;</code>、<code class=\"codespan\">&#39;mousedown&#39;</code>、<code class=\"codespan\">&#39;mousemove&#39;</code>、<code class=\"codespan\">&#39;mouseup&#39;</code>、<code class=\"codespan\">&#39;mouseover&#39;</code>、<code class=\"codespan\">&#39;mouseout&#39;</code>、<code class=\"codespan\">&#39;globalout&#39;</code>、<code class=\"codespan\">&#39;contextmenu&#39;</code> 事件。下面先来看一个简单的点击柱状图后打开相应的百度搜索页面的示例。</p>\n<pre><code class=\"lang-js\">// 基于准备好的dom,初始化ECharts实例\nvar myChart = echarts.init(document.getElementById(&#39;main&#39;));\n\n// 指定图表的配置项和数据\nvar option = {\n    xAxis: {\n        data: [&quot;衬衫&quot;,&quot;羊毛衫&quot;,&quot;雪纺衫&quot;,&quot;裤子&quot;,&quot;高跟鞋&quot;,&quot;袜子&quot;]\n    },\n    yAxis: {},\n    series: [{\n        name: &#39;销量&#39;,\n        type: &#39;bar&#39;,\n        data: [5, 20, 36, 10, 10, 20]\n    }]\n};\n// 使用刚指定的配置项和数据显示图表。\nmyChart.setOption(option);\n// 处理点击事件并且跳转到相应的百度搜索页面\nmyChart.on(&#39;click&#39;, function (params) {\n    window.open(&#39;https://www.baidu.com/s?wd=&#39; + encodeURIComponent(params.name));\n});\n</code></pre>\n<p>所有的鼠标事件包含参数 <code class=\"codespan\">params</code>,这是一个包含点击图形的数据信息的对象,如下格式:</p>\n<pre><code class=\"lang-js\">{\n    // 当前点击的图形元素所属的组件名称,\n    // 其值如 &#39;series&#39;、&#39;markLine&#39;、&#39;markPoint&#39;、&#39;timeLine&#39; 等。\n    componentType: string,\n    // 系列类型。值可能为:&#39;line&#39;、&#39;bar&#39;、&#39;pie&#39; 等。当 componentType 为 &#39;series&#39; 时有意义。\n    seriesType: string,\n    // 系列在传入的 option.series 中的 index。当 componentType 为 &#39;series&#39; 时有意义。\n    seriesIndex: number,\n    // 系列名称。当 componentType 为 &#39;series&#39; 时有意义。\n    seriesName: string,\n    // 数据名,类目名\n    name: string,\n    // 数据在传入的 data 数组中的 index\n    dataIndex: number,\n    // 传入的原始数据项\n    data: Object,\n    // sankey、graph 等图表同时含有 nodeData 和 edgeData 两种 data,\n    // dataType 的值会是 &#39;node&#39; 或者 &#39;edge&#39;,表示当前点击在 node 还是 edge 上。\n    // 其他大部分图表中只有一种 data,dataType 无意义。\n    dataType: string,\n    // 传入的数据值\n    value: number|Array\n    // 数据图形的颜色。当 componentType 为 &#39;series&#39; 时有意义。\n    color: string\n}\n</code></pre>\n<p>如何区分鼠标点击到了哪里:</p>\n<pre><code class=\"lang-js\">myChart.on(&#39;click&#39;, function (params) {\n    if (params.componentType === &#39;markPoint&#39;) {\n        // 点击到了 markPoint 上\n        if (params.seriesIndex === 5) {\n            // 点击到了 index 为 5 的 series 的 markPoint 上。\n        }\n    }\n    else if (params.componentType === &#39;series&#39;) {\n        if (params.seriesType === &#39;graph&#39;) {\n            if (params.dataType === &#39;edge&#39;) {\n                // 点击到了 graph 的 edge(边)上。\n            }\n            else {\n                // 点击到了 graph 的 node(节点)上。\n            }\n        }\n    }\n});\n</code></pre>\n<p>使用 <code class=\"codespan\">query</code> 只对指定的组件的图形元素的触发回调:</p>\n<pre><code class=\"lang-js\">chart.on(eventName, query, handler);\n</code></pre>\n<p><code class=\"codespan\">query</code> 可为 <code class=\"codespan\">string</code> 或者 <code class=\"codespan\">Object</code>。</p>\n<p>如果为 <code class=\"codespan\">string</code> 表示组件类型。格式可以是 &#39;mainType&#39; 或者 &#39;mainType.subType&#39;。例如:</p>\n<pre><code class=\"lang-js\">chart.on(&#39;click&#39;, &#39;series&#39;, function () {...});\nchart.on(&#39;click&#39;, &#39;series.line&#39;, function () {...});\nchart.on(&#39;click&#39;, &#39;dataZoom&#39;, function () {...});\nchart.on(&#39;click&#39;, &#39;xAxis.category&#39;, function () {...});\n</code></pre>\n<p>如果为 <code class=\"codespan\">Object</code>,可以包含以下一个或多个属性,每个属性都是可选的:</p>\n<pre><code class=\"lang-js\">{\n    &lt;mainType&gt;Index: number // 组件 index\n    &lt;mainType&gt;Name: string // 组件 name\n    &lt;mainType&gt;Id: string // 组件 id\n    dataIndex: number // 数据项 index\n    name: string // 数据项 name\n    dataType: string // 数据项 type,如关系图中的 &#39;node&#39;, &#39;edge&#39;\n    element: string // 自定义系列中的 el 的 name\n}\n</code></pre>\n<p>例如:</p>\n<pre><code class=\"lang-js\">chart.setOption({\n    // ...\n    series: [{\n        name: &#39;uuu&#39;\n        // ...\n    }]\n});\nchart.on(&#39;mouseover&#39;, {seriesName: &#39;uuu&#39;}, function () {\n    // series name 为 &#39;uuu&#39; 的系列中的图形元素被 &#39;mouseover&#39; 时,此方法被回调。\n});\n</code></pre>\n<p>例如:</p>\n<pre><code class=\"lang-js\">chart.setOption({\n    // ...\n    series: [{\n        // ...\n    }, {\n        // ...\n        data: [\n            {name: &#39;xx&#39;, value: 121},\n            {name: &#39;yy&#39;, value: 33}\n        ]\n    }]\n});\nchart.on(&#39;mouseover&#39;, {seriesIndex: 1, name: &#39;xx&#39;}, function () {\n    // series index 1 的系列中的 name 为 &#39;xx&#39; 的元素被 &#39;mouseover&#39; 时,此方法被回调。\n});\n</code></pre>\n<p>例如:</p>\n<pre><code class=\"lang-js\">chart.setOption({\n    // ...\n    series: [{\n        type: &#39;graph&#39;,\n        nodes: [{name: &#39;a&#39;, value: 10}, {name: &#39;b&#39;, value: 20}],\n        edges: [{source: 0, target: 1}]\n    }]\n});\nchart.on(&#39;click&#39;, {dataType: &#39;node&#39;}, function () {\n    // 关系图的节点被点击时此方法被回调。\n});\nchart.on(&#39;click&#39;, {dataType: &#39;edge&#39;}, function () {\n    // 关系图的边被点击时此方法被回调。\n});\n</code></pre>\n<p>例如:</p>\n<pre><code class=\"lang-js\">chart.setOption({\n    // ...\n    series: {\n        // ...\n        type: &#39;custom&#39;,\n        renderItem: function (params, api) {\n            return {\n                type: &#39;group&#39;,\n                children: [{\n                    type: &#39;circle&#39;,\n                    name: &#39;my_el&#39;,\n                    // ...\n                }, {\n                    // ...\n                }]\n            }\n        },\n        data: [[12, 33]]\n    }\n})\nchart.on(&#39;mouseup&#39;, {element: &#39;my_el&#39;}, function () {\n    // name 为 &#39;my_el&#39; 的元素被 &#39;mouseup&#39; 时,此方法被回调。\n});\n</code></pre>\n<p>你可以在回调函数中获得这个对象中的数据名、系列名称后在自己的数据仓库中索引得到其它的信息候更新图表,显示浮层等等,如下示例代码:</p>\n<pre><code class=\"lang-js\">myChart.on(&#39;click&#39;, function (parmas) {\n    $.get(&#39;detail?q=&#39; + params.name, function (detail) {\n        myChart.setOption({\n            series: [{\n                name: &#39;pie&#39;,\n                // 通过饼图表现单个柱子中的数据分布\n                data: [detail.data]\n            }]\n        });\n    });\n});\n</code></pre>\n<h2 id=\"-\">组件交互的行为事件</h2>\n<p>在 ECharts 中基本上所有的组件交互行为都会触发相应的事件,常用的事件和事件对应参数在 <a href=\"api.html#events\" target=\"_blank\">events</a> 文档中有列出。</p>\n<p>下面是监听一个图例开关的示例:</p>\n<pre><code class=\"lang-js\">// 图例开关的行为只会触发 legendselectchanged 事件\nmyChart.on(&#39;legendselectchanged&#39;, function (params) {\n    // 获取点击图例的选中状态\n    var isSelected = params.selected[params.name];\n    // 在控制台中打印\n    console.log((isSelected ? &#39;选中了&#39; : &#39;取消选中了&#39;) + &#39;图例&#39; + params.name);\n    // 打印所有图例的状态\n    console.log(params.selected);\n});\n</code></pre>\n<h2 id=\"-echarts-\">代码触发 ECharts 中组件的行为</h2>\n<p>上面提到诸如<code class=\"codespan\">&#39;legendselectchanged&#39;</code>事件会由组件交互的行为触发,那除了用户的交互操作,有时候也会有需要在程序里调用方法触发图表的行为,诸如显示 tooltip,选中图例。</p>\n<p>在 ECharts 2.x 是通过 <code class=\"codespan\">myChart.component.tooltip.showTip</code> 这种形式调用相应的接口触发图表行为,入口很深,而且涉及到内部组件的组织。相对地,在 ECharts 3 里改为通过调用 <code class=\"codespan\">myChart.dispatchAction({ type: &#39;&#39; })</code> 触发图表行为,统一管理了所有动作,也可以方便地根据需要去记录用户的行为路径。</p>\n<p>常用的动作和动作对应参数在 <a href=\"api.html#action\" target=\"_blank\">action</a> 文档中有列出。</p>\n<p>下面示例演示了如何通过<code class=\"codespan\">dispatchAction</code>去轮流高亮饼图的每个扇形。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/pie-highlight&edit=1&reset=1\" width=\"600\" height=\"400\" ></iframe>\n\n\n\n<h2 id=\"-\">监听“空白处”的事件</h2>\n<p>有时候,开发者需要监听画布的“空白处”所触发的事件。比如,当需要在用户点击“空白处”的时候重置图表时。</p>\n<p>在讨论这个功能之前,我们需要先明确两种事件。<code class=\"codespan\">zrender 事件</code>和<code class=\"codespan\">echarts 事件</code>。</p>\n<pre><code class=\"lang-js\">myChart.getZr().on(&#39;click&#39;, function (event) {\n    // 该监听器正在监听一个`zrender 事件`。\n});\nmyChart.on(&#39;click&#39;, function (event) {\n    // 该监听器正在监听一个`echarts 事件`。\n});\n</code></pre>\n<p><code class=\"codespan\">zrender 事件</code>与<code class=\"codespan\">echarts 事件</code>不同。前者是当鼠标在任何地方都会被触发,而后者是只有当鼠标在图形元素上时才能被触发。事实上,<code class=\"codespan\">echarts 事件</code> 是在 <code class=\"codespan\">zrender 事件</code> 的基础上实现的,也就是说,当一个 <code class=\"codespan\">zrender 事件</code> 在图形元素上被触发时,<code class=\"codespan\">echarts</code> 将触发一个 <code class=\"codespan\">echarts 事件</code> 给开发者。</p>\n<p>有了 <code class=\"codespan\">zrender事件</code>,我们就可以实现 “监听空白处的事件”,具体如下:</p>\n<pre><code class=\"lang-js\">myChart.getZr().on(&#39;click&#39;, function (event) {\n    // 没有 target 意味着鼠标/指针不在任何一个图形元素上,它是从“空白处”触发的。\n    if (!event.target) {\n        // 点击在了空白处,做些什么。\n    }\n});\n</code></pre>\n"},"动态排序柱状图":{"type":["*"],"description":"<p>动态排序柱状图是一种展示随时间变化的数据排名变化的图表,从 ECharts 5 开始内置支持。</p>\n<blockquote>\n<p>动态排序柱状图通常是横向的柱条,如果想要采用纵向的柱条,只要把本教程中的 X 轴和 Y 轴相反设置即可。</p>\n</blockquote>\n<ol>\n<li><code class=\"codespan\">yAxis.realtimeSort</code> 设为 <code class=\"codespan\">true</code>,表示开启 Y 轴的动态排序效果</li>\n<li><code class=\"codespan\">yAxis.inverse</code> 设为 <code class=\"codespan\">true</code>,表示 Y 轴从下往上是从小到大的排列</li>\n<li><code class=\"codespan\">yAxis.animationDuration</code> 建议设为 <code class=\"codespan\">300</code>,表示第一次柱条排序动画的时长</li>\n<li><code class=\"codespan\">yAxis.animationDurationUpdate</code> 建议设为 <code class=\"codespan\">300</code>,表示第一次后柱条排序动画的时长</li>\n<li>如果想只显示前 <em>n</em> 名,将 <code class=\"codespan\">yAxis.max</code> 设为 <em>n - 1</em>,否则显示所有柱条</li>\n<li><code class=\"codespan\">xAxis.max</code> 建议设为 <code class=\"codespan\">&#39;dataMax&#39;</code> 表示用数据的最大值作为 X 轴最大值,视觉效果更好</li>\n<li>如果想要实时改变标签,需要将 <code class=\"codespan\">series.label.valueAnimation</code> 设为 <code class=\"codespan\">true</code></li>\n<li><code class=\"codespan\">animationDuration</code> 设为 <code class=\"codespan\">0</code>,表示第一份数据不需要从 <code class=\"codespan\">0</code> 开始动画(如果希望从 <code class=\"codespan\">0</code> 开始则设为和 <code class=\"codespan\">animationDurationUpdate</code> 相同的值)</li>\n<li><code class=\"codespan\">animationDurationUpdate</code> 建议设为 <code class=\"codespan\">3000</code> 表示每次更新动画时长,这一数值应与调用 <code class=\"codespan\">setOption</code> 改变数据的频率相同</li>\n<li>以 <code class=\"codespan\">animationDurationUpdate</code> 的频率调用 <code class=\"codespan\">setInterval</code>,更新数据值,显示下一个时间点对应的柱条排序</li>\n</ol>\n<p>完整的例子如下:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=bar-race&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n<p>以上的设置项比较多,如果手动设置比较繁琐,之后我们也会推出不用写代码就能实现动态排序柱状图的工具,敬请期待!</p>\n"},"小例子:自己实现拖拽":{"type":["*"],"description":"<p>介绍一个实现拖拽的小例子。这个例子是在原生 Apache ECharts<sup>TM</sup> 基础上做了些小小扩展,带有一定的交互性。通过这个例子,我们可以了解到,如何使用 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>这个例子主要做到了这样一件事,用鼠标可以拖拽曲线的点,从而改变曲线的形状。例子很简单,但是有了这个基础我们还可以做更多的事情,比如在图中可视化得编辑。所以我们从这个简单的例子开始。</p>\n<p>echarts 本身没有提供封装好的『拖拽改变图表』功能,因为现在认为这个功能并不足够有通用性。那么这个功能就留给开发者用 API 实现,这也有助于开发者按自己的需要个性定制。</p>\n<h2 id=\"-\">(一)实现基本的拖拽功能</h2>\n<p>在这个例子中,基础的图表是一个 <a href=\"option.html#series-line\" target=\"_blank\">折线图 (series-line)</a>。参见如下配置:</p>\n<pre><code class=\"lang-js\">var symbolSize = 20;\n\n// 这个 data 变量在这里单独声明,在后面也会用到。\nvar data = [[15, 0], [-50, 10], [-56.5, 20], [-46.5, 30], [-22.1, 40]];\n\nmyChart.setOption({\n    xAxis: {\n        min: -100,\n        max: 80,\n        type: &#39;value&#39;,\n        axisLine: {onZero: false}\n    },\n    yAxis: {\n        min: -30,\n        max: 60,\n        type: &#39;value&#39;,\n        axisLine: {onZero: false}\n    },\n    series: [\n        {\n            id: &#39;a&#39;,\n            type: &#39;line&#39;,\n            smooth: true,\n            symbolSize: symbolSize, // 为了方便拖拽,把 symbolSize 尺寸设大了。\n            data: data\n        }\n    ]\n});\n</code></pre>\n<p>既然折线中原生的点没有拖拽功能,我们就为它加上拖拽功能:用 <a href=\"option.html#graphic\" target=\"_blank\">graphic</a> 组件,在每个点上面,覆盖一个隐藏的可拖拽的圆点。</p>\n<pre><code class=\"lang-js\">myChart.setOption({\n    // 声明一个 graphic component,里面有若干个 type 为 &#39;circle&#39; 的 graphic elements。\n    // 这里使用了 echarts.util.map 这个帮助方法,其行为和 Array.prototype.map 一样,但是兼容 es5 以下的环境。\n    // 用 map 方法遍历 data 的每项,为每项生成一个圆点。\n    graphic: echarts.util.map(data, function (dataItem, dataIndex) {\n        return {\n            // &#39;circle&#39; 表示这个 graphic element 的类型是圆点。\n            type: &#39;circle&#39;,\n\n            shape: {\n                // 圆点的半径。\n                r: symbolSize / 2\n            },\n            // 用 transform 的方式对圆点进行定位。position: [x, y] 表示将圆点平移到 [x, y] 位置。\n            // 这里使用了 convertToPixel 这个 API 来得到每个圆点的位置,下面介绍。\n            position: myChart.convertToPixel(&#39;grid&#39;, dataItem),\n\n            // 这个属性让圆点不可见(但是不影响他响应鼠标事件)。\n            invisible: true,\n            // 这个属性让圆点可以被拖拽。\n            draggable: true,\n            // 把 z 值设得比较大,表示这个圆点在最上方,能覆盖住已有的折线图的圆点。\n            z: 100,\n            // 此圆点的拖拽的响应事件,在拖拽过程中会不断被触发。下面介绍详情。\n            // 这里使用了 echarts.util.curry 这个帮助方法,意思是生成一个与 onPointDragging\n            // 功能一样的新的函数,只不过第一个参数永远为此时传入的 dataIndex 的值。\n            ondrag: echarts.util.curry(onPointDragging, dataIndex)\n        };\n    })\n});\n</code></pre>\n<p>上面的代码中,使用 <a href=\"api.html#echartsInstance.convertToPixel\" target=\"_blank\">convertToPixel</a> 这个 API,进行了从 data 到『像素坐标』的转换,从而得到了每个圆点应该在的位置,从而能绘制这些圆点。<code class=\"codespan\">myChart.convertToPixel(&#39;grid&#39;, dataItem)</code> 这句话中,第一个参数 <code class=\"codespan\">&#39;grid&#39;</code> 表示 <code class=\"codespan\">dataItem</code> 在 <a href=\"option.html#grid\" target=\"_blank\">grid</a> 这个组件中(即直角坐标系)中进行转换。所谓『像素坐标』,就是以 echarts 容器 dom element 的左上角为零点的以像素为单位的坐标系中的坐标。</p>\n<p>注意这件事需要在第一次 setOption 后再进行,也就是说,须在坐标系(<a href=\"option.html#grid\" target=\"_blank\">grid</a>)初始化后才能调用 <code class=\"codespan\">myChart.convertToPixel(&#39;grid&#39;, dataItem)</code>。</p>\n<p>有了这段代码后,就有了诸个能拖拽的点。接下来要为每个点,加上拖拽响应的事件:</p>\n<pre><code class=\"lang-js\">// 拖拽某个圆点的过程中会不断调用此函数。\n// 此函数中会根据拖拽后的新位置,改变 data 中的值,并用新的 data 值,重绘折线图,从而使折线图同步于被拖拽的隐藏圆点。\nfunction onPointDragging(dataIndex) {\n    // 这里的 data 就是本文最初的代码块中声明的 data,在这里会被更新。\n    // 这里的 this 就是被拖拽的圆点。this.position 就是圆点当前的位置。\n    data[dataIndex] = myChart.convertFromPixel(&#39;grid&#39;, this.position);\n    // 用更新后的 data,重绘折线图。\n    myChart.setOption({\n        series: [{\n            id: &#39;a&#39;,\n            data: data\n        }]\n    });\n}\n</code></pre>\n<p>上面的代码中,使用了 <a href=\"api.html#echartsInstance.convertFromPixel\" target=\"_blank\">convertFromPixel</a> 这个 API。它是 <a href=\"api.html#echartsInstance.convertToPixel\" target=\"_blank\">convertToPixel</a> 的逆向过程。<code class=\"codespan\">myChart.convertFromPixel(&#39;grid&#39;, this.position)</code> 表示把当前像素坐标转换成 <a href=\"option.html#grid\" target=\"_blank\">grid</a> 组件中直角坐标系的 dataItem 值。</p>\n<p>最后,为了使 dom 尺寸改变时,图中的元素能自适应得变化,加上这些代码:</p>\n<pre><code class=\"lang-js\">window.addEventListener(&#39;resize&#39;, function () {\n    // 对每个拖拽圆点重新计算位置,并用 setOption 更新。\n    myChart.setOption({\n        graphic: echarts.util.map(data, function (item, dataIndex) {\n            return {\n                position: myChart.convertToPixel(&#39;grid&#39;, item)\n            };\n        })\n    });\n});\n\n</code></pre>\n<h2 id=\"-tooltip-\">(二)添加 tooltip 组件</h2>\n<p>到此,拖拽的基本功能就完成了。但是想要更进一步得实时看到拖拽过程中,被拖拽的点的 data 值的变化状况,我们可以使用 <a href=\"option.html#tooltip\" target=\"_blank\">tooltip</a> 组件来实时显示这个值。但是,tooltip 有其默认的『显示』『隐藏』触发规则,在我们拖拽的场景中并不适用,所以我们还要手动定制 tooltip 的『显示』『隐藏』行为。</p>\n<p>在上述代码中分别添加如下定义:</p>\n<pre><code class=\"lang-js\">myChart.setOption({\n    ...,\n    tooltip: {\n        // 表示不使用默认的『显示』『隐藏』触发规则。\n        triggerOn: &#39;none&#39;,\n        formatter: function (params) {\n            return &#39;X: &#39; + params.data[0].toFixed(2) + &#39;&lt;br&gt;Y: &#39; + params.data[1].toFixed(2);\n        }\n    }\n});\n</code></pre>\n<pre><code class=\"lang-js\">myChart.setOption({\n    graphic: echarts.util.map(data, function (item, dataIndex) {\n        return {\n            type: &#39;circle&#39;,\n            ...,\n            // 在 mouseover 的时候显示,在 mouseout 的时候隐藏。\n            onmousemove: echarts.util.curry(showTooltip, dataIndex),\n            onmouseout: echarts.util.curry(hideTooltip, dataIndex),\n        };\n    })\n});\n\nfunction showTooltip(dataIndex) {\n    myChart.dispatchAction({\n        type: &#39;showTip&#39;,\n        seriesIndex: 0,\n        dataIndex: dataIndex\n    });\n}\n\nfunction hideTooltip(dataIndex) {\n    myChart.dispatchAction({\n        type: &#39;hideTip&#39;\n    });\n}\n</code></pre>\n<p>这里使用了 <a href=\"api.html#echartsInstance.dispatchAction\" target=\"_blank\">dispatchAction</a> 来显示隐藏 tooltip。用到了 <a href=\"api.html#action.tooltip.showTip\" target=\"_blank\">showTip</a>、<a href=\"api.html#action.tooltip.hideTip\" target=\"_blank\">hideTip</a>。</p>\n<h2 id=\"-\">(三)全部代码</h2>\n<p>总结一下,全部的代码如下:</p>\n<pre><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n    &lt;meta charset=&quot;utf-8&quot;&gt;\n    &lt;script src=&quot;dist/echarts.min.js&quot;&gt;&lt;/script&gt;\n&lt;/head&gt;\n&lt;body&gt;\n    &lt;div id=&quot;main&quot; style=&quot;width: 600px;height:400px;&quot;&gt;&lt;/div&gt;\n    &lt;script type=&quot;text/javascript&quot;&gt;\n\n    var symbolSize = 20;\n    var data = [[15, 0], [-50, 10], [-56.5, 20], [-46.5, 30], [-22.1, 40]];\n\n    var myChart = echarts.init(document.getElementById(&#39;main&#39;));\n\n    myChart.setOption({\n        tooltip: {\n            triggerOn: &#39;none&#39;,\n            formatter: function (params) {\n                return &#39;X: &#39; + params.data[0].toFixed(2) + &#39;&lt;br&gt;Y: &#39; + params.data[1].toFixed(2);\n            }\n        },\n        xAxis: {\n            min: -100,\n            max: 80,\n            type: &#39;value&#39;,\n            axisLine: {onZero: false}\n        },\n        yAxis: {\n            min: -30,\n            max: 60,\n            type: &#39;value&#39;,\n            axisLine: {onZero: false}\n        },\n        series: [\n            {\n                id: &#39;a&#39;,\n                type: &#39;line&#39;,\n                smooth: true,\n                symbolSize: symbolSize,\n                data: data\n            }\n        ],\n    });\n\n    myChart.setOption({\n        graphic: echarts.util.map(data, function (item, dataIndex) {\n            return {\n                type: &#39;circle&#39;,\n                position: myChart.convertToPixel(&#39;grid&#39;, item),\n                shape: {\n                    r: symbolSize / 2\n                },\n                invisible: true,\n                draggable: true,\n                ondrag: echarts.util.curry(onPointDragging, dataIndex),\n                onmousemove: echarts.util.curry(showTooltip, dataIndex),\n                onmouseout: echarts.util.curry(hideTooltip, dataIndex),\n                z: 100\n            };\n        })\n    });\n\n    window.addEventListener(&#39;resize&#39;, function () {\n        myChart.setOption({\n            graphic: echarts.util.map(data, function (item, dataIndex) {\n                return {\n                    position: myChart.convertToPixel(&#39;grid&#39;, item)\n                };\n            })\n        });\n    });\n\n    function showTooltip(dataIndex) {\n        myChart.dispatchAction({\n            type: &#39;showTip&#39;,\n            seriesIndex: 0,\n            dataIndex: dataIndex\n        });\n    }\n\n    function hideTooltip(dataIndex) {\n        myChart.dispatchAction({\n            type: &#39;hideTip&#39;\n        });\n    }\n\n    function onPointDragging(dataIndex, dx, dy) {\n        data[dataIndex] = myChart.convertFromPixel(&#39;grid&#39;, this.position);\n        myChart.setOption({\n            series: [{\n                id: &#39;a&#39;,\n                data: data\n            }]\n        });\n    }\n\n&lt;/script&gt;\n&lt;/body&gt;\n&lt;/html&gt;\n</code></pre><p><br></p>\n<p>有了这些基础,就可以定制更多的功能了。可以加 <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a> 组件,可以制作一个直角坐标系上的绘图板等等。可以发挥想象力。</p>\n"},"小例子:实现日历图":{"type":["*"],"description":"<p>在 Apache ECharts<sup>TM</sup> 中,我们新增了日历坐标系,如何快速写出一个日历图呢?</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=calendar-simple&edit=1&reset=1\" width=\"800\" height=\"300\" ></iframe>\n\n\n<p>通过以下三个步骤即可实现上述效果:</p>\n<h2 id=\"-js-\">第一步:引入js文件</h2>\n<p>下载的最新完整版本 echarts.min.js 即可,无需再单独引入其他文件哦</p>\n<pre><code class=\"lang-html\">&lt;script src=&quot;echarts.min.js&quot;&gt;&lt;/script&gt;\n&lt;script&gt;\n    // ...\n&lt;/script&gt;\n</code></pre>\n<h2 id=\"-dom-\">第二步:指定DOM元素作为图表容器</h2>\n<p>和ECharts中的其他图表一样,创建一个DOM来作为绘制图表的容器</p>\n<pre><code class=\"lang-html\">&lt;div id=&quot;main&quot; style=&quot;width=100%; height = 400px&quot;&gt;&lt;/div&gt;\n</code></pre>\n<p>使用ECharts进行初始化</p>\n<pre><code class=\"lang-js\">var myChart = echarts.init(document.getElementById(&#39;main&#39;));\n</code></pre>\n<h2 id=\"-\">第三步:配置参数</h2>\n<p>以常见的日历图为例: calendar坐标 + heatmap图</p>\n<pre><code class=\"lang-js\">var option = {\n    visualMap: {\n        show: false\n        min: 0,\n        max: 1000\n    },\n    calendar: {\n        range: &#39;2017&#39;\n    },\n    series: {\n        type: &#39;heatmap&#39;,\n        coordinateSystem: &#39;calendar&#39;,\n        data: [[&#39;2017-01-02&#39;, 900], [&#39;2017-01-02&#39;, 877], [&#39;2017-01-02&#39;, 699], ...]\n    }\n}\nmyChart.setOption(option);\n</code></pre>\n<p>在heatmap图的基础上,加上<code class=\"codespan\">coordinateSystem: &#39;calendar&#39;,</code>和<code class=\"codespan\">calendar: { range: &#39;2017&#39; }</code>heatmap图就秒变为日历图了。</p>\n<blockquote>\n<p>若发现图表没有正确显示,你可以检查以下几种可能:</p>\n<ul>\n<li>JS文件是否正确加载;</li>\n<li><code class=\"codespan\">echarts</code> 变量是否存在;</li>\n<li>控制台是否报错;</li>\n<li>DOM 元素在 <code class=\"codespan\">echarts.init</code> 的时候是否有高度和宽度。</li>\n<li>若为 <code class=\"codespan\">type: heatmap</code>,检查是否配置了 <code class=\"codespan\">visualMap</code>。</li>\n</ul>\n</blockquote>\n<p><strong>附完整示例代码</strong></p>\n<pre><code class=\"lang-html\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n    &lt;meta charset=&quot;utf-8&quot;&gt;\n    &lt;title&gt;ECharts&lt;/title&gt;\n    &lt;script src=&quot;echarts.min.js&quot;&gt;&lt;/script&gt;\n&lt;/head&gt;\n&lt;body&gt;\n    &lt;div id=&quot;main&quot; style=&quot;width:100%;height:400px;&quot;&gt;&lt;/div&gt;\n    &lt;script type=&quot;text/javascript&quot;&gt;\n        var myChart = echarts.init(document.getElementById(&#39;main&#39;));\n\n        // 模拟数据\n        function getVirtulData(year) {\n            year = year || &#39;2017&#39;;\n            var date = +echarts.number.parseDate(year + &#39;-01-01&#39;);\n            var end = +echarts.number.parseDate(year + &#39;-12-31&#39;);\n            var dayTime = 3600 * 24 * 1000;\n            var data = [];\n            for (var time = date; time &lt;= end; time += dayTime) {\n                data.push([\n                    echarts.format.formatTime(&#39;yyyy-MM-dd&#39;, time),\n                    Math.floor(Math.random() * 10000)\n                ]);\n            }\n            return data;\n        }\n        var option = {\n            visualMap: {\n                show: false,\n                min: 0,\n                max: 10000\n            },\n            calendar: {\n                range: &#39;2017&#39;\n            },\n            series: {\n                type: &#39;heatmap&#39;,\n                coordinateSystem: &#39;calendar&#39;,\n                data: getVirtulData(2017)\n            }\n        };\n        myChart.setOption(option);\n    &lt;/script&gt;\n&lt;/body&gt;\n&lt;/html&gt;\n\n</code></pre>\n<p>以上就是绘制最简日历图的步骤了,如若还想进一步私人定制,还可以通过自定义配置参数来实现</p>\n<h2 id=\"-\">自定义配置参数</h2>\n<p>使用日历坐标绘制日历图时,支持自定义各项属性:</p>\n<ul>\n<li><p><a href=\"option.html#calendar.range\" target=\"_blank\">range</a>: <code class=\"codespan\">设置时间的范围,可支持某年、某月、某天,还可支持跨年</code></p>\n</li>\n<li><p><a href=\"option.html#calendar.cellSize\" target=\"_blank\">cellSize</a>: <code class=\"codespan\">设置日历格的大小,可支持设置不同高宽,还可支持自适应auto</code></p>\n</li>\n<li><p><a href=\"option.html#calendar.width\" target=\"_blank\">width</a>、<a href=\"http://xxx\" target=\"_blank\">height</a>: <code class=\"codespan\">也可以直接设置改日历图的整体高宽,让其基于已有的高宽全部自适应</code></p>\n</li>\n<li><p><a href=\"option.html#calendar.orient\" target=\"_blank\">orient</a>: <code class=\"codespan\">设置坐标的方向,既可以横着也可以竖着</code></p>\n</li>\n<li><p><a href=\"option.html#calendar.splitLine\" target=\"_blank\">splitLine</a>: <code class=\"codespan\">设置分隔线样式,也可以直接不显示</code></p>\n</li>\n<li><p><a href=\"option.html#calendar.itemStyle\" target=\"_blank\">itemStyle</a>: <code class=\"codespan\">设置日历格的样式,背景色、方框线颜色大小类型、透明度均可自定义,甚至还能加阴影</code></p>\n</li>\n<li><p><a href=\"option.html#calendar.dayLabel\" target=\"_blank\">dayLabel</a>: <code class=\"codespan\">设置坐标中 星期样式,可以设置星期从第几天开始,快捷设置中英文、甚至是自定义中英文混搭、或局部不显示、通过formatter 可以想怎么显示就怎么显示;</code></p>\n</li>\n<li><p><a href=\"option.html#calendar.monthLabel\" target=\"_blank\">monthLabel</a>: <code class=\"codespan\">设置坐标中 月样式,和星期一样,可快捷设置中英文和自定义混搭</code></p>\n</li>\n<li><p><a href=\"option.html#calendar.yearLabel\" target=\"_blank\">yearLabel</a>: <code class=\"codespan\">设置坐标中 年样式,默认显示一年,通过formatter 文字可以想显示什么就能通过string function任性自定义,上下左右方位随便选;</code></p>\n</li>\n</ul>\n<p>完整的配置项参数参见:<a href=\"option.html#calendar\" target=\"_blank\">calendar API</a></p>\n<h2 id=\"-\">日历坐标系的其他形式</h2>\n<p>日历坐标系是一种新的 <code class=\"codespan\">ECharts</code> 坐标系,提供了在日历上绘制图表的能力; 所以除了制作常用的日历图外,我们可以在热力图、散点图、关系图中使用日历坐标系。</p>\n<p>在日历坐标系中使用热力图:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=calendar-heatmap&edit=1&reset=1\" width=\"800\" height=\"300\" ></iframe>\n\n\n<p>在日历坐标系中使用散点图:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=calendar-effectscatter&edit=1&reset=1\" width=\"800\" height=\"600\" ></iframe>\n\n\n<p>还可以混合放置不同的图表,例如下例子,同时放置了热力图和关系图:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=calendar-graph&edit=1&reset=1\" width=\"800\" height=\"600\" ></iframe>\n\n\n<p><strong>其他更丰富的效果</strong></p>\n<p>灵活利用 <code class=\"codespan\">ECharts</code> 图表和坐标系的组合,以及 API,还可以实现更丰富的效果。</p>\n<p>例如,制作农历:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=calendar-lunar&edit=1&reset=1\" width=\"600\" height=\"500\" ></iframe>\n\n\n<p>例如,使用 <code class=\"codespan\">chart.convertToPixel</code> 接口,在日历坐标系绘制饼图。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=calendar-pie&edit=1&reset=1\" width=\"800\" height=\"640\" ></iframe>\n\n\n\n\n\n\n\n"},"旭日图":{"type":["*"],"description":"<p><a href=\"https://en.wikipedia.org/wiki/Pie_chart#Ring_chart_/_Sunburst_chart_/_Multilevel_pie_chart\" target=\"_blank\">旭日图(Sunburst)</a>由多层的环形图组成,在数据结构上,内圈是外圈的父节点。因此,它既能像<a href=\"option.html#series-pie\" target=\"_blank\">饼图</a>一样表现局部和整体的占比,又能像<a href=\"option.html#series-treemap\" target=\"_blank\">矩形树图</a>一样表现层级关系。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=sunburst-monochrome&edit=1&reset=1\" width=\"700\" height=\"500\" ></iframe>\n\n\n<h2 id=\"-\">引入相关文件</h2>\n<p>旭日图是 Apache ECharts<sup>TM</sup> 4.0 新增的图表类型,从 <a href=\"https://www.jsdelivr.com/package/npm/echarts\" target=\"_blank\">CDN</a> 引入完整版的 <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js\" target=\"_blank\">echarts.min.js</a></p>\n<h2 id=\"-\">最简单的旭日图</h2>\n<p>创建旭日图需要在 <code class=\"codespan\">series</code> 配置项中声明类型为 <code class=\"codespan\">&#39;sunburst&#39;</code> 的系列,并且以树形结构声明其 <code class=\"codespan\">data</code>:</p>\n<pre><code class=\"lang-js\">var option = {\n    series: {\n        type: &#39;sunburst&#39;,\n        data: [{\n            name: &#39;A&#39;,\n            value: 10,\n            children: [{\n                value: 3,\n                name: &#39;Aa&#39;\n            }, {\n                value: 5,\n                name: &#39;Ab&#39;\n            }]\n        }, {\n            name: &#39;B&#39;,\n            children: [{\n                name: &#39;Ba&#39;,\n                value: 4\n            }, {\n                name: &#39;Bb&#39;,\n                value: 2\n            }]\n        }, {\n            name: &#39;C&#39;,\n            value: 3\n        }]\n    }\n};\n</code></pre>\n<p>得到以下结果:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/sunburst-simple&edit=1&reset=1\" width=\"700\" height=\"400\" ></iframe>\n\n\n<h2 id=\"-\">颜色等样式调整</h2>\n<p>默认情况下会使用全局调色盘 <a href=\"option.html#color\" target=\"_blank\">color</a> 分配最内层的颜色,其余层则与其父元素同色。在旭日图中,扇形块的颜色有以下三种设置方式:</p>\n<ul>\n<li>在 <a href=\"option.html#series-sunburst.data.itemStyle\" target=\"_blank\">series.data.itemStyle</a> 中设置每个扇形块的样式;</li>\n<li>在 <a href=\"option.html#series-sunburst.levels.itemStyle\" target=\"_blank\">series.levels.itemStyle</a> 中设置每一层的样式;</li>\n<li>在 <a href=\"option.html#series-sunburst.itemStyle\" target=\"_blank\">series.itemStyle</a> 中设置整个旭日图的样式。</li>\n</ul>\n<p>上述三者的优先级是从高到低的,也就是说,配置了 <code class=\"codespan\">series.data.itemStyle</code> 的扇形块将会覆盖 <code class=\"codespan\">series.levels.itemStyle</code> 和 <code class=\"codespan\">series.itemStyle</code> 的设置。</p>\n<p>下面,我们将整体的颜色设为灰色 <code class=\"codespan\">&#39;#aaa&#39;</code>,将最内层的颜色设为蓝色 <code class=\"codespan\">&#39;blue&#39;</code>,将 <code class=\"codespan\">Aa</code>、<code class=\"codespan\">B</code> 这两块设为红色 <code class=\"codespan\">&#39;red&#39;</code>。</p>\n<pre><code class=\"lang-js\">var option = {\n    series: {\n        type: &#39;sunburst&#39;,\n        data: [{\n            name: &#39;A&#39;,\n            value: 10,\n            children: [{\n                value: 3,\n                name: &#39;Aa&#39;,\n                itemStyle: {\n                    color: &#39;red&#39;\n                }\n            }, {\n                value: 5,\n                name: &#39;Ab&#39;\n            }]\n        }, {\n            name: &#39;B&#39;,\n            children: [{\n                name: &#39;Ba&#39;,\n                value: 4\n            }, {\n                name: &#39;Bb&#39;,\n                value: 2\n            }],\n            itemStyle: {\n                color: &#39;red&#39;\n            }\n        }, {\n            name: &#39;C&#39;,\n            value: 3\n        }],\n        itemStyle: {\n            color: &#39;#aaa&#39;\n        },\n        levels: [{\n            // 留给数据下钻的节点属性\n        }, {\n            itemStyle: {\n                color: &#39;blue&#39;\n            }\n        }]\n    }\n};\n</code></pre>\n<p>效果为:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/sunburst-color&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n\n<h2 id=\"-\">按层配置样式</h2>\n<p>旭日图是一种有层次的结构,为了方便同一层样式的配置,我们提供了 <a href=\"option.html#series-sunburst.levels\" target=\"_blank\">levels</a> 配置项。它是一个数组,其中的第 0 项表示数据下钻后返回上级的图形,其后的每一项分别表示从圆心向外层的层级。</p>\n<p>例如,假设我们没有数据下钻功能,并且希望将最内层的扇形块的颜色设为红色,文字设为蓝色,可以这样设置:</p>\n<pre><code class=\"lang-js\">series: {\n    // ...\n    levels: [\n        {\n            // 留给数据下钻点的空白配置\n        },\n        {\n            // 最靠内测的第一层\n            itemStyle: {\n                color: &#39;red&#39;\n            },\n            label: {\n                color: &#39;blue&#39;\n            }\n        },\n        {\n            // 第二层 ...\n        }\n    ]\n}\n</code></pre>\n<p>在实际使用的过程中,你会发现按层配置样式是一个很常用的功能,能够很大程度上提高配置的效率。</p>\n<h2 id=\"-\">数据下钻</h2>\n<p>旭日图默认支持数据下钻,也就是说,当点击了扇形块之后,将以该扇形块的数据作为根节点,便于进一步了解该数据的细节。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=sunburst-simple&edit=1&reset=1\" width=\"700\" height=\"500\" ></iframe>\n\n\n<p>当数据下钻后,中间会出现一个用于返回上一层的图形,该图形的样式可以通过 <a href=\"option.html#series-sunburst.levels\" target=\"_blank\">levels[0]</a> 配置。</p>\n<p>如果不需要数据下钻功能,可以通过将 <a href=\"option.html#series-sunburst.nodeClick\" target=\"_blank\">nodeClick</a> 设置为 <code class=\"codespan\">false</code> 关闭;或者将其设为 <code class=\"codespan\">&#39;link&#39;</code>,并将 <a href=\"option.html#series-sunburst.data.link\" target=\"_blank\">data.link</a> 设为点击扇形块对应打开的链接。</p>\n<h2 id=\"-\">高亮相关扇形块</h2>\n<p>旭日图支持鼠标移动到某扇形块时,高亮相关数据块的操作,可以通过设置 <a href=\"option.html#series-sunburst.highlightPolicy\" target=\"_blank\">highlightPolicy</a>,包括以下几种高亮方式:</p>\n<ul>\n<li><code class=\"codespan\">&#39;descendant&#39;</code>(默认值):高亮鼠标移动所在扇形块与其后代元素;</li>\n<li><code class=\"codespan\">&#39;ancestor&#39;</code>:高亮鼠标所在扇形块与其祖先元素;</li>\n<li><code class=\"codespan\">&#39;self&#39;</code>:仅高亮鼠标所在扇形块;</li>\n<li><code class=\"codespan\">&#39;none&#39;</code>:不会淡化(downplay)其他元素。</li>\n</ul>\n<p>上面提到的“高亮”,对于鼠标所在的扇形块,会使用 <code class=\"codespan\">emphasis</code> 样式;对于其他相关扇形块,则会使用 <code class=\"codespan\">highlight</code> 样式。通过这种方式,可以很方便地实现突出显示相关数据的需求。</p>\n<p>具体来说,对于配置项:</p>\n<pre><code class=\"lang-js\">itemStyle: {\n    color: &#39;yellow&#39;,\n    borderWidth: 2,\n    emphasis: {\n        color: &#39;red&#39;\n    },\n    highlight: {\n        color: &#39;orange&#39;\n    },\n    downplay: {\n        color: &#39;#ccc&#39;\n    }\n}\n</code></pre>\n<p><code class=\"codespan\">highlightPolicy</code> 为 <code class=\"codespan\">&#39;descendant&#39;</code> 或 <code class=\"codespan\">&#39;ancestor&#39;</code> 的效果分别为:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/sunburst-highlight-descendant&edit=1&reset=1\" width=\"700\" height=\"350\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/sunburst-highlight-ancestor&edit=1&reset=1\" width=\"700\" height=\"350\" ></iframe>\n\n\n<h2 id=\"-\">总结</h2>\n<p>上面的教程主要讲述的是如何入门使用旭日图,感兴趣的用户可以在 <a href=\"option.html#series-sunburst\" target=\"_blank\">配置项手册</a> 查看更完整的文档。在灵活应用这些配置项之后,就能做出丰富多彩的旭日图了!</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=sunburst-book&edit=1&reset=1\" width=\"700\" height=\"600\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=sunburst-drink&edit=1&reset=1\" width=\"700\" height=\"600\" ></iframe>\n\n\n\n\n\n\n\n\n\n"},"自定义系列":{"type":["*"],"description":"<p><a href=\"option.html#series-custom\" target=\"_blank\">自定义系列(custom series)</a>,是一种系列的类型。它把绘制图形元素这一步留给开发者去做,从而开发者能在坐标系中自由绘制出自己需要的图表。</p>\n<p>Apache ECharts<sup>TM</sup> 为什么会要支持 <code class=\"codespan\">自定义系列</code> 呢?</p>\n<p>ECharts 内置支持的图表类型是最常见的图表类型,但是图表类型是难于穷举的,有很多小众的需求 echarts 并不能内置的支持。那么就需要提供一种方式来让开发者自己扩展。另一方面,所提供的扩展方式要尽可能得简单,例如图形元素创建和释放、过渡动画、tooltip、<a href=\"option.html#dataZoom\" target=\"_blank\">数据区域缩放(dataZoom)</a>、<a href=\"option.html#visualMap\" target=\"_blank\">视觉映射(visualMap)</a>等功能,尽量在 ECharts 中内置得处理,使开发者不必纠结于这些细节。综上考虑形成了 <a href=\"option.html#series-custom\" target=\"_blank\">自定义系列(custom series)</a>。</p>\n<p><strong>例如,下面的例子使用 custom series 扩展出了 x-range 图:</strong></p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=custom-profile&reset=1&edit=1\" width=\"800\" height=\"500\" ></iframe>\n\n\n<p><strong>更多的例子参见:<a href=\"https://echarts.apache.org/examples/zh/index.html#chart-type-custom\" target=\"_blank\">custom examples</a></strong></p>\n<p>下面来介绍开发者怎么使用 <a href=\"option.html#series-custom\" target=\"_blank\">自定义系列(custom series)</a>。</p>\n<h2 id=\"-renderitem-\">(一)renderItem 方法</h2>\n<p>开发者自定义的图形元素渲染逻辑,是通过书写 <code class=\"codespan\">renderItem</code> 函数实现的,例如:</p>\n<pre><code class=\"lang-js\">var option = {\n    ...,\n    series: [{\n        type: &#39;custom&#39;,\n        renderItem: function (params, api) {\n            // ...\n        },\n        data: data\n    }]\n}\n</code></pre>\n<p>在渲染阶段,对于 <a href=\"option.html#series-custom.data\" target=\"_blank\">series.data</a> 中的每个数据项(为方便描述,这里称为 <code class=\"codespan\">dataItem</code>),会调用此 <a href=\"option.html#series-custom.renderItem\" target=\"_blank\">renderItem</a> 函数。这个 <code class=\"codespan\">renderItem</code> 函数的职责,就是返回一个(或者一组)<code class=\"codespan\">图形元素定义</code>,<code class=\"codespan\">图形元素定义</code> 中包括图形元素的类型、位置、尺寸、样式等。echarts 会根据这些 <code class=\"codespan\">图形元素定义</code> 来渲染出图形元素。如下的示意:</p>\n<pre><code class=\"lang-js\">var option = {\n    ...,\n    series: [{\n        type: &#39;custom&#39;,\n        renderItem: function (params, api) {\n            // 对于 data 中的每个 dataItem,都会调用这个 renderItem 函数。\n            // (但是注意,并不一定是按照 data 的顺序调用)\n\n            // 这里进行一些处理,例如,坐标转换。\n            // 这里使用 api.value(0) 取出当前 dataItem 中第一个维度的数值。\n            var categoryIndex = api.value(0);\n            // 这里使用 api.coord(...) 将数值在当前坐标系中转换成为屏幕上的点的像素值。\n            var startPoint = api.coord([api.value(1), categoryIndex]);\n            var endPoint = api.coord([api.value(2), categoryIndex]);\n            // 这里使用 api.size(...) 获得 Y 轴上数值范围为 1 的一段所对应的像素长度。\n            var height = api.size([0, 1])[1] * 0.6;\n\n            // shape 属性描述了这个矩形的像素位置和大小。\n            // 其中特殊得用到了 echarts.graphic.clipRectByRect,意思是,\n            // 如果矩形超出了当前坐标系的包围盒,则剪裁这个矩形。\n            // 如果矩形完全被剪掉,会返回 undefined.\n            var rectShape = echarts.graphic.clipRectByRect({\n                // 矩形的位置和大小。\n                x: startPoint[0],\n                y: startPoint[1] - height / 2,\n                width: endPoint[0] - startPoint[0],\n                height: height\n            }, {\n                // 当前坐标系的包围盒。\n                x: params.coordSys.x,\n                y: params.coordSys.y,\n                width: params.coordSys.width,\n                height: params.coordSys.height\n            });\n\n            // 这里返回为这个 dataItem 构建的图形元素定义。\n            return rectShape &amp;&amp; {\n                // 表示这个图形元素是矩形。还可以是 &#39;circle&#39;, &#39;sector&#39;, &#39;polygon&#39; 等等。\n                type: &#39;rect&#39;,\n                shape: rectShape,\n                // 用 api.style(...) 得到默认的样式设置。这个样式设置包含了\n                // option 中 itemStyle 的配置和视觉映射得到的颜色。\n                style: api.style()\n            };\n        },\n        data: [\n            [12, 44, 55, 60], // 这是第一个 dataItem\n            [53, 31, 21, 56], // 这是第二个 dataItem\n            [71, 33, 10, 20], // 这是第三个 dataItem\n            ...\n        ]\n    }]\n}\n</code></pre>\n<p><a href=\"option.html#series-custom.renderItem\" target=\"_blank\">renderItem</a> 函数提供了两个参数:</p>\n<ul>\n<li><a href=\"option.html#series-custom.renderItem.arguments.params\" target=\"_blank\">params</a>:包含了当前数据信息(如 <code class=\"codespan\">seriesIndex</code>、<code class=\"codespan\">dataIndex</code> 等等)和坐标系的信息(如坐标系包围盒的位置和尺寸)。</li>\n<li><a href=\"option.html#series-custom.renderItem.arguments.api\" target=\"_blank\">api</a>:是一些开发者可调用的方法集合(如 <code class=\"codespan\">api.value()</code>、<code class=\"codespan\">api.coord()</code>)。</li>\n</ul>\n<p><a href=\"option.html#series-custom.renderItem\" target=\"_blank\">renderItem</a> 函数须返回根据此 <code class=\"codespan\">dataItem</code> 绘制出的图形元素的定义信息,参见 <a href=\"option.html#series-custom.renderItem.return\" target=\"_blank\">renderItem.return</a>。</p>\n<p>一般来说,<a href=\"option.html#series-custom.renderItem\" target=\"_blank\">renderItem</a> 函数的主要逻辑,是将 <code class=\"codespan\">dataItem</code> 里的值映射到坐标系上的图形元素。这一般需要用到 <a href=\"option.html#series-custom.renderItem.arguments.api\" target=\"_blank\">renderItem.arguments.api</a> 中的两个函数:</p>\n<ul>\n<li><a href=\"option.html#series-custom.renderItem.arguments.api.value\" target=\"_blank\">api.value(...)</a>,意思是取出 <code class=\"codespan\">dataItem</code> 中的数值。例如 <code class=\"codespan\">api.value(0)</code> 表示取出当前 <code class=\"codespan\">dataItem</code> 中第一个维度的数值。</li>\n<li><a href=\"option.html#series-custom.renderItem.arguments.api.coord\" target=\"_blank\">api.coord(...)</a>,意思是进行坐标转换计算。例如 <code class=\"codespan\">var point = api.coord([api.value(0), api.value(1)])</code> 表示 <code class=\"codespan\">dataItem</code> 中的数值转换成坐标系上的点。</li>\n</ul>\n<p>有时候还需要用到 <a href=\"option.html#series-custom.renderItem.arguments.api.size\" target=\"_blank\">api.size(...)</a> 函数,表示得到坐标系上一段数值范围对应的长度。</p>\n<p>返回值中样式的设置可以使用 <a href=\"option.html#series-custom.renderItem.arguments.api.style\" target=\"_blank\">api.style(...)</a> 函数,他能得到 <a href=\"option.html#series-custom.itemStyle\" target=\"_blank\">series.itemStyle</a> 中定义的样式信息,以及视觉映射的样式信息。也可以用这种方式覆盖这些样式信息:<code class=\"codespan\">api.style({fill: &#39;green&#39;, stroke: &#39;yellow&#39;})</code>。</p>\n<p>书写完 <code class=\"codespan\">renderItem</code> 方法后,自定义系列的 90% 工作就做完了。剩下的是一些精化工作。</p>\n<h2 id=\"-\">(二)使坐标轴的范围自适应数据范围</h2>\n<p>在 <a href=\"option.html#grid\" target=\"_blank\">直角坐标系(grid)</a>、<a href=\"option.html#polar\" target=\"_blank\">极坐标系(polar)</a> 中都有坐标轴。坐标轴的刻度范围需要自适应当前显示出的数据的范围,否则绘制出的图形会超出去。所以,例如,在 <a href=\"option.html#grid\" target=\"_blank\">直角坐标系(grid)</a> 中,使用自定义系列的开发者,需要设定,<code class=\"codespan\">data</code> 中的哪些维度会对应到 <code class=\"codespan\">x</code> 轴上,哪些维度会对应到 <code class=\"codespan\">y</code> 轴上。这件事通过 <a href=\"option.html#series-custom.encode\" target=\"_blank\">encode</a> 来设定。例如:</p>\n<pre><code class=\"lang-js\">option = {\n    series: [{\n        type: &#39;custom&#39;,\n        renderItem: function () {\n            ...\n        },\n        encode: {\n            // data 中『维度1』和『维度2』对应到 X 轴\n            x: [1, 2],\n            // data 中『维度0』对应到 Y 轴\n            y: 0\n        },\n        data: [\n            // 维度0  维度1  维度2  维度3\n            [   12,   44,   55,   60   ], // 这是第一个 dataItem\n            [   53,   31,   21,   56   ], // 这是第二个 dataItem\n            [   71,   33,   10,   20   ], // 这是第三个 dataItem\n            ...\n        ]\n    }]\n};\n</code></pre>\n<h2 id=\"-tooltip\">(三)设定 tooltip</h2>\n<p>当然,使用 <a href=\"option.html#tooltip.formatter\" target=\"_blank\">tooltip.formatter</a> 可以任意定制 tooltip 中的内容。但是还有更简单的方法,通过<a href=\"option.html#series-custom.encode\" target=\"_blank\">encode</a> 和 <a href=\"option.html#series-custom.dimensions\" target=\"_blank\">dimensions</a> 来设定:</p>\n<pre><code class=\"lang-js\">option = {\n    series: [{\n        type: &#39;custom&#39;,\n        renderItem: function () {\n            ...\n        },\n        encode: {\n            x: [1, 2],\n            y: 0,\n            // 表示『维度2』和『维度3』要显示到 tooltip 中。\n            tooltip: [2, 3]\n        },\n        // 表示给『维度2』和『维度3』分别取名为『年龄』和『满意度』,显示到 tooltip 中。\n        dimensions: [null, null, &#39;年龄&#39;, &#39;满意度&#39;],\n        data: [\n            // 维度0  维度1  维度2  维度3\n            [   12,   44,   55,   60   ], // 这是第一个 dataItem\n            [   53,   31,   21,   56   ], // 这是第二个 dataItem\n            [   71,   33,   10,   20   ], // 这是第三个 dataItem\n            ...\n        ]\n    }]\n};\n</code></pre>\n<p><br>\n<br>\n<br></p>\n<hr>\n<p>上面,一个简单的 custome series 例子完成了。</p>\n<p>下面介绍几个其他细节要点。</p>\n<h2 id=\"-\">(四)超出坐标系范围的截取</h2>\n<p>与 <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a> 结合使用的时候,常常使用会设置 <a href=\"option.html#dataZoom.filterMode\" target=\"_blank\">dataZoom.filterMode</a> 为 &#39;weakFilter&#39;。这个设置的意思是:当 <code class=\"codespan\">dataItem</code> 部分超出坐标系边界的时候,<code class=\"codespan\">dataItem</code> 不会整体被过滤掉。例如:</p>\n<pre><code class=\"lang-js\">option = {\n    dataZoom: {\n        xAxisIndex: 0,\n        filterMode: &#39;weakFilter&#39;\n    },\n    series: [{\n        type: &#39;custom&#39;,\n        renderItem: function () {\n            ...\n        },\n        encode: {\n            // data 中『维度1』和『维度2』对应到 X 轴\n            x: [1, 2],\n            y: 0\n        },\n        data: [\n            // 维度0  维度1  维度2  维度3\n            [   12,   44,   55,   60   ], // 这是第一个 dataItem\n            [   53,   31,   21,   56   ], // 这是第二个 dataItem\n            [   71,   33,   10,   20   ], // 这是第三个 dataItem\n            ...\n        ]\n    }]\n};\n</code></pre>\n<p>在这个例子中,『维度1』和『维度2』对应到 X 轴,<code class=\"codespan\">dataZoom</code> 组件控制 X 轴的缩放。假如在缩放的过程中,某个 dataItem 的『维度1』超出了 X 轴的范围,『维度2』还在 X 轴的范围中,那么只要设置 <code class=\"codespan\">dataZoom.filterMode = &#39;weakFilter&#39;</code>,这个 dataItem 就不会被过滤掉,从而还能够使用 <code class=\"codespan\">renderItem</code> 绘制图形(可以使用上面提到过的 <code class=\"codespan\">echarts.graphic.clipRectByRect</code> 把图形绘制成被坐标系剪裁过的样子)。参见上面提到过的例子:<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=custom-profile\" target=\"_blank\">Profile</a></p>\n<h2 id=\"-dataindex\">(五)关于 dataIndex</h2>\n<p>开发者如果使用到的话应注意,<a href=\"option.html#series-custom.renderItem.arguments.params\" target=\"_blank\">renderItem.arguments.params</a> 中的 <code class=\"codespan\">dataIndex</code> 和 <code class=\"codespan\">dataIndexInside</code> 是有区别的:</p>\n<ul>\n<li><code class=\"codespan\">dataIndex</code> 指的 <code class=\"codespan\">dataItem</code> 在原始数据中的 index。</li>\n<li><code class=\"codespan\">dataIndexInside</code> 指的是 <code class=\"codespan\">dataItem</code> 在当前数据窗口(参见 <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a>)中的 index。</li>\n</ul>\n<p><a href=\"option.html#series-custom.renderItem.arguments.api\" target=\"_blank\">renderItem.arguments.api</a> 中使用的参数都是 <code class=\"codespan\">dataIndexInside</code> 而非 <code class=\"codespan\">dataIndex</code>,因为从 <code class=\"codespan\">dataIndex</code> 转换成 <code class=\"codespan\">dataIndexInside</code> 需要时间开销。</p>\n<h2 id=\"-\">(六)事件监听</h2>\n<pre><code class=\"lang-js\">chart.setOption({\n    // ...\n    series: {\n        type: &#39;custom&#39;,\n        renderItem: function () {\n            // ...\n            return {\n                type: &#39;group&#39;,\n                children: [{\n                    type: &#39;circle&#39;\n                    // ...\n                }, {\n                    type: &#39;circle&#39;,\n                    name: &#39;aaa&#39;,\n                    // 用户指定的信息,可以在 event handler 访问到。\n                    info: 12345,\n                    // ...\n                }]\n            };\n        }\n    }\n});\nchart.on(&#39;click&#39;, {element: &#39;aaa&#39;}, function (params) {\n    // 当 name 为 &#39;aaa&#39; 的图形元素被点击时,此回调被触发。\n    console.log(params.info);\n});\n</code></pre>\n<h2 id=\"-\">(七)自定义矢量图形</h2>\n<p>自定义系列能支持使用 <a href=\"http://www.w3.org/TR/SVG/paths.html#PathData\" target=\"_blank\">SVG PathData</a> 定义矢量路径。从而可以使用矢量图工具中做出的图形。参见:<a href=\"option.html#series-custom.renderItem.return_path\" target=\"_blank\">path</a>,以及例子:<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=custom-calendar-icon\" target=\"_blank\">icons</a> 和 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=custom-gantt-flight\" target=\"_blank\">shapes</a>。</p>\n<p><br></p>\n<p><strong>更多的自定义系列的例子参见:<a href=\"https://echarts.apache.org/examples/zh/index.html#chart-type-custom\" target=\"_blank\">custom examples</a></strong></p>\n"},"富文本标签":{"type":["*"],"description":"<p>在许多地方(如图、轴的标签等)都可以使用富文本标签。例如:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=pie-rich-text&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=treemap-obama&edit=1&reset=1\" width=\"800\" height=\"550\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=bar-rich-text&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<p><br></p>\n<p>其他一些例子:\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=map-labels&amp;edit=1&amp;reset=1\" target=\"_blank\">Map Labels</a>,\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=pie-nest&amp;edit=1&amp;reset=1\" target=\"_blank\">Pie Labels</a>,\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=gauge-car&amp;edit=1&amp;reset=1\" target=\"_blank\">Gauge</a>.</p>\n<p><br></p>\n<p>原先 Apache ECharts<sup>TM</sup> 中的文本标签,只能对整块统一进行样式设置,并且仅仅支持颜色和字体的设置,从而导致不易于制作表达能力更强的文字描述信息。</p>\n<p>echarts v3.7 以后,支持了富文本标签,能够:</p>\n<ul>\n<li>定制文本块整体的样式(如背景、边框、阴影等)、位置、旋转等。</li>\n<li>对文本块中个别片段定义样式(如颜色、字体、高宽、背景、阴影等)、对齐方式等。</li>\n<li>在文本中使用图片做小图标或者背景。</li>\n<li>特定组合以上的规则,可以做出简单表格、分割线等效果。</li>\n</ul>\n<p>开始下面的介绍之前,先说明一下下面会使用的两个名词的含义:</p>\n<ul>\n<li>文本块(Text Block):文本标签块整体。</li>\n<li>文本片段(Text fragment):文本标签块中的部分文本。</li>\n</ul>\n<p>如下图示例:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/text-block-fragment&edit=1&reset=1\" width=\"340\" height=\"240\" ></iframe>\n\n\n\n<h2 id=\"-\">文本样式相关的配置项</h2>\n<p>echarts 提供了丰富的文本标签配置项,包括:</p>\n<ul>\n<li>字体基本样式设置:<code class=\"codespan\">fontStyle</code>、<code class=\"codespan\">fontWeight</code>、<code class=\"codespan\">fontSize</code>、<code class=\"codespan\">fontFamily</code>。</li>\n<li>文字颜色:<code class=\"codespan\">color</code>。</li>\n<li>文字描边:<code class=\"codespan\">textBorderColor</code>、<code class=\"codespan\">textBorderWidth</code>。</li>\n<li>文字阴影:<code class=\"codespan\">textShadowColor</code>、<code class=\"codespan\">textShadowBlur</code>、<code class=\"codespan\">textShadowOffsetX</code>、<code class=\"codespan\">textShadowOffsetY</code>。</li>\n<li>文本块或文本片段大小:<code class=\"codespan\">lineHeight</code>、<code class=\"codespan\">width</code>、<code class=\"codespan\">height</code>、<code class=\"codespan\">padding</code>。</li>\n<li>文本块或文本片段的对齐:<code class=\"codespan\">align</code>、<code class=\"codespan\">verticalAlign</code>。</li>\n<li>文本块或文本片段的边框、背景(颜色或图片):<code class=\"codespan\">backgroundColor</code>、<code class=\"codespan\">borderColor</code>、<code class=\"codespan\">borderWidth</code>、<code class=\"codespan\">borderRadius</code>。</li>\n<li>文本块或文本片段的阴影:<code class=\"codespan\">shadowColor</code>、<code class=\"codespan\">shadowBlur</code>、<code class=\"codespan\">shadowOffsetX</code>、<code class=\"codespan\">shadowOffsetY</code>。</li>\n<li>文本块的位置和旋转:<code class=\"codespan\">position</code>、<code class=\"codespan\">distance</code>、<code class=\"codespan\">rotate</code>。</li>\n</ul>\n<p>可以在各处的 <code class=\"codespan\">rich</code> 属性中定义文本片段样式。例如 <a href=\"option.html#series-bar.label.rich\" target=\"_blank\">series-bar.label.rich</a></p>\n<p>例如:</p>\n<pre><code class=\"lang-js\">label: {\n    // 在文本中,可以对部分文本采用 rich 中定义样式。\n    // 这里需要在文本中使用标记符号:\n    // `{styleName|text content text content}` 标记样式名。\n    // 注意,换行仍是使用 &#39;\\n&#39;。\n    formatter: [\n        &#39;{a|这段文本采用样式a}&#39;,\n        &#39;{b|这段文本采用样式b}这段用默认样式{x|这段用样式x}&#39;\n    ].join(&#39;\\n&#39;),\n\n    // 这里是文本块的样式设置:\n    color: &#39;#333&#39;,\n    fontSize: 5,\n    fontFamily: &#39;Arial&#39;,\n    borderWidth: 3,\n    backgroundColor: &#39;#984455&#39;,\n    padding: [3, 10, 10, 5],\n    lineHeight: 20,\n\n    // rich 里是文本片段的样式设置:\n    rich: {\n        a: {\n            color: &#39;red&#39;,\n            lineHeight: 10\n        },\n        b: {\n            backgroundColor: {\n                image: &#39;xxx/xxx.jpg&#39;\n            },\n            height: 40\n        },\n        x: {\n            fontSize: 18,\n            fontFamily: &#39;Microsoft YaHei&#39;,\n            borderColor: &#39;#449933&#39;,\n            borderRadius: 4\n        },\n        ...\n    }\n}\n</code></pre>\n<blockquote>\n<p>注意:如果不定义 <code class=\"codespan\">rich</code>,不能指定文字块的 <code class=\"codespan\">width</code> 和 <code class=\"codespan\">height</code>。</p>\n</blockquote>\n<h2 id=\"-\">文本、文本框、文本片段的基本样式和装饰</h2>\n<p>每个文本可以设置基本的字体样式:<code class=\"codespan\">fontStyle</code>、<code class=\"codespan\">fontWeight</code>、<code class=\"codespan\">fontSize</code>、<code class=\"codespan\">fontFamily</code>。</p>\n<p>可以设置文字的颜色 <code class=\"codespan\">color</code> 和边框的颜色 <code class=\"codespan\">textBorderColor</code>、<code class=\"codespan\">textBorderWidth</code>。</p>\n<p>文本框可以设置边框和背景的样式:<code class=\"codespan\">borderColor</code>、<code class=\"codespan\">borderWidth</code>、<code class=\"codespan\">backgroundColor</code>、<code class=\"codespan\">padding</code>。</p>\n<p>文本片段也可以设置边框和背景的样式:<code class=\"codespan\">borderColor</code>、<code class=\"codespan\">borderWidth</code>、<code class=\"codespan\">backgroundColor</code>、<code class=\"codespan\">padding</code>。</p>\n<p>例如:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/text-options&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n\n<h2 id=\"-\">标签的位置</h2>\n<p>对于折线图、柱状图、散点图等,均可以使用 <code class=\"codespan\">label</code> 来设置标签。标签的相对于图形元素的位置,一般使用 <a href=\"option.html#series-scatter.label.position\" target=\"_blank\">label.position</a>、<a href=\"option.html#series-scatter.label.distance\" target=\"_blank\">label.distance</a> 来配置。</p>\n<p>例如:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/label-position&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<blockquote>\n<p>注意:<code class=\"codespan\">position</code> 在不同的图中可取值有所不同。<code class=\"codespan\">distance</code> 并不是在每个图中都支持。详情请参见 <a href=\"option.html\" target=\"_blank\">option 文档</a>。</p>\n</blockquote>\n<h2 id=\"-\">标签的旋转</h2>\n<p>某些图中,为了能有足够长的空间来显示标签,需要对标签进行旋转。例如:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=bar-label-rotation&edit=1&reset=1\" width=\"900\" height=\"500\" ></iframe>\n\n\n<p>这种场景下,可以结合 <a href=\"option.html#series-bar.label.align\" target=\"_blank\">align</a> 和 <a href=\"option.html#series-bar.label.verticalAlign\" target=\"_blank\">verticalAlign</a> 来调整标签位置。</p>\n<p>注意,逻辑是,先使用 <code class=\"codespan\">align</code> 和 <code class=\"codespan\">verticalAlign</code> 定位,再旋转。</p>\n<h2 id=\"-\">文本片段的排版和对齐</h2>\n<p>关于排版方式,每个文本片段,可以想象成 CSS 中的 <code class=\"codespan\">inline-block</code>,在文档流中按行放置。</p>\n<p>每个文本片段的内容盒尺寸(<code class=\"codespan\">content box size</code>),默认是根据文字大小决定的。但是,也可以设置 <code class=\"codespan\">width</code>、<code class=\"codespan\">height</code> 来强制指定,虽然一般不会这么做(参见下文)。文本片段的边框盒尺寸(<code class=\"codespan\">border box size</code>),由上述本身尺寸,加上文本片段的 <code class=\"codespan\">padding</code> 来得到。</p>\n<p>只有 <code class=\"codespan\">&#39;\\n&#39;</code> 是换行符,能导致换行。</p>\n<p>一行内,会有多个文本片段。每行的实际高度,由 <code class=\"codespan\">lineHeight</code> 最大的文本片段决定。文本片段的 <code class=\"codespan\">lineHeight</code> 可直接在 <code class=\"codespan\">rich</code> 中指定,也可以在 <code class=\"codespan\">rich</code> 的父层级中统一指定而采用到 <code class=\"codespan\">rich</code> 的所有项中,如果都不指定,则取文本片段的边框盒尺寸(<code class=\"codespan\">border box size</code>)。</p>\n<p>在一行的 <code class=\"codespan\">lineHeight</code> 被决定后,一行内,文本片段的竖直位置,由文本片段的 <code class=\"codespan\">verticalAlign</code> 来指定(这里和 CSS 中的规则稍有不同):</p>\n<ul>\n<li><code class=\"codespan\">&#39;bottom&#39;</code>:文本片段的盒的底边贴住行底。</li>\n<li><code class=\"codespan\">&#39;top&#39;</code>:文本片段的盒的顶边贴住行顶。</li>\n<li><code class=\"codespan\">&#39;middle&#39;</code>:居行中。</li>\n</ul>\n<p>文本块的宽度,可以直接由文本块的 <code class=\"codespan\">width</code> 指定,否则,由最长的行决定。宽度决定后,在一行中进行文本片段的放置。文本片段的 <code class=\"codespan\">align</code> 决定了文本片段在行中的水平位置:</p>\n<ul>\n<li>首先,从左向右连续紧靠放置 <code class=\"codespan\">align</code> 为 <code class=\"codespan\">&#39;left&#39;</code> 的文本片段盒。</li>\n<li>然后,从右向左连续紧靠放置 <code class=\"codespan\">align</code> 为 <code class=\"codespan\">&#39;right&#39;</code> 的文本片段盒。</li>\n<li>最后,剩余的没处理的文本片段盒,紧贴着,在中间剩余的区域中居中放置。</li>\n</ul>\n<p>关于文字在文本片段盒中的位置:</p>\n<ul>\n<li>如果 <code class=\"codespan\">align</code> 为 <code class=\"codespan\">&#39;center&#39;</code>,则文字在文本片段盒中是居中的。</li>\n<li>如果 <code class=\"codespan\">align</code> 为 <code class=\"codespan\">&#39;left&#39;</code>,则文字在文本片段盒中是居左的。</li>\n<li>如果 <code class=\"codespan\">align</code> 为 <code class=\"codespan\">&#39;right&#39;</code>,则文字在文本片段盒中是居右的。</li>\n</ul>\n<p>例如:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/text-fragment-align&edit=1&reset=1\" width=\"800\" height=\"220\" ></iframe>\n\n\n\n<h2 id=\"-\">特殊效果:图标、分割线、标题块、简单表格</h2>\n<p>看下面的例子:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/title-block&edit=1&reset=1\" width=\"600\" height=\"400\" ></iframe>\n\n\n<p>文本片段的 <code class=\"codespan\">backgroundColor</code> 可以指定为图片后,就可以在文本中使用图标了:</p>\n<pre><code class=\"lang-js\">rich: {\n    Sunny: {\n        // 这样设定 backgroundColor 就可以是图片了。\n        backgroundColor: {\n            image: &#39;./data/asset/img/weather/sunny_128.png&#39;\n        },\n        // 可以只指定图片的高度,从而图片的宽度根据图片的长宽比自动得到。\n        height: 30\n    }\n}\n</code></pre>\n<p>分割线实际是用 border 实现的:</p>\n<pre><code class=\"lang-js\">rich: {\n    hr: {\n        borderColor: &#39;#777&#39;,\n        // 这里把 width 设置为 &#39;100%&#39;,表示分割线的长度充满文本块。\n        // 注意,这里是文本块内容盒(content box)的 100%,而不包含 padding。\n        // 虽然这和 CSS 相关的定义有所不同,但是在这类场景中更加方便。\n        width: &#39;100%&#39;,\n        borderWidth: 0.5,\n        height: 0\n    }\n}\n</code></pre>\n<p>标题块是使用 <code class=\"codespan\">backgroundColor</code> 实现的:</p>\n<pre><code class=\"lang-js\">// 标题文字居左\nformatter: &#39;{titleBg|Left Title}&#39;,\nrich: {\n    titleBg: {\n        backgroundColor: &#39;#000&#39;,\n        height: 30,\n        borderRadius: [5, 5, 0, 0],\n        padding: [0, 10, 0, 10],\n        width: &#39;100%&#39;,\n        color: &#39;#eee&#39;\n    }\n}\n\n// 标题文字居中。\n// 这个实现有些 tricky,但是,能够不引入更复杂的排版规则而实现这个效果。\nformatter: &#39;{tc|Center Title}{titleBg|}&#39;,\nrich: {\n    titleBg: {\n        align: &#39;right&#39;,\n        backgroundColor: &#39;#000&#39;,\n        height: 30,\n        borderRadius: [5, 5, 0, 0],\n        padding: [0, 10, 0, 10],\n        width: &#39;100%&#39;,\n        color: &#39;#eee&#39;\n    }\n}\n</code></pre>\n<p>简单表格的设定,其实就是给不同行上纵向对应的文本片段设定同样的宽度就可以了。参见本文最开始的 <a href=\"https://echarts.apache.org/examples/zh/view.html?c=pie-rich-text&amp;edit=1&amp;reset=1\" target=\"_blank\">例子</a>。</p>\n"},"服务端渲染":{"type":["*"],"description":"<p>Apache ECharts<sup>TM</sup> 可以在服务端进行渲染。例如 <a href=\"https://echarts.apache.org/examples/zh/index.html\" target=\"_blank\">官方示例</a> 里的一个个小截图,就是在服务端预生成出来的。</p>\n<p>服务端渲染可以使用流行的 headless 环境,例如 <a href=\"https://github.com/GoogleChrome/puppeteer\" target=\"_blank\">puppeteer</a>、<a href=\"https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md\" target=\"_blank\">headless chrome</a>、<a href=\"https://github.com/Automattic/node-canvas\" target=\"_blank\">node-canvas</a>、<a href=\"https://github.com/jsdom/jsdom\" target=\"_blank\">jsdom</a>、<a href=\"http://phantomjs.org/\" target=\"_blank\">PhantomJS</a> 等。</p>\n<p>这是一些社区贡献的 echarts 服务端渲染方案:</p>\n<ul>\n<li><a href=\"https://github.com/hellosean1025/node-echarts\" target=\"_blank\">https://github.com/hellosean1025/node-echarts</a></li>\n<li><a href=\"https://github.com/chfw/echarts-scrappeteer\" target=\"_blank\">https://github.com/chfw/echarts-scrappeteer</a></li>\n<li><a href=\"https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js\" target=\"_blank\">https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js</a></li>\n<li><a href=\"https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73\" target=\"_blank\">https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73</a></li>\n</ul>\n"},"使用 Canvas 或者 SVG 渲染":{"type":["*"],"description":"<p>浏览器端图表库大多会选择 SVG 或者 Canvas 进行渲染。对于绘制图表来说,这两种技术往往是可替换的,效果相近。但是在一些场景中,他们的表现和能力又有一定差异。于是,对它们的选择取舍,就成为了一个一直存在的不易有标准答案的话题。</p>\n<p>Apache ECharts<sup>TM</sup> 从初始一直使用 Canvas 绘制图表(除了对 IE8- 使用 VML)。而 <a href=\"https://github.com/apache/echarts/releases\" target=\"_blank\">ECharts v4.0</a> 发布了 SVG 渲染器,从而提供了一种新的选择。只须在初始化一个图表实例时,设置 <a href=\"api.html#echarts.init\" target=\"_blank\">renderer 参数</a> 为 <code class=\"codespan\">&#39;canvas&#39;</code> 或 <code class=\"codespan\">&#39;svg&#39;</code> 即可指定渲染器,比较方便。</p>\n<blockquote>\n<p>SVG 和 Canvas 这两种使用方式差异很大的技术,能够做到同时被透明支持,主要归功于 ECharts 底层库 <a href=\"https://github.com/ecomfe/zrender\" target=\"_blank\">ZRender</a> 的抽象和实现,形成可互换的 SVG 渲染器和 Canvas 渲染器。</p>\n</blockquote>\n<h2 id=\"-\">选择哪种渲染器</h2>\n<p>一般来说,Canvas 更适合绘制图形元素数量非常大(这一般是由数据量大导致)的图表(如热力图、地理坐标系或平行坐标系上的大规模线图或散点图等),也利于实现某些视觉 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=lines-bmap-effect\" target=\"_blank\">特效</a>。但是,在不少场景中,SVG 具有重要的优势:它的内存占用更低(这对移动端尤其重要)、渲染性能略高、并且用户使用浏览器内置的缩放功能时不会模糊。</p>\n<p>选择哪种渲染器,我们可以根据软硬件环境、数据量、功能需求综合考虑。</p>\n<ul>\n<li>在软硬件环境较好,数据量不大的场景下(例如 PC 端做商务报表),两种渲染器都可以适用,并不需要太多纠结。</li>\n<li>在环境较差,出现性能问题需要优化的场景下,可以通过试验来确定使用哪种渲染器。比如有这些经验:<ul>\n<li>在须要创建很多 ECharts 实例且浏览器易崩溃的情况下(可能是因为 Canvas 数量多导致内存占用超出手机承受能力),可以使用 SVG 渲染器来进行改善。大略得说,如果图表运行在低端安卓机,或者我们在使用一些特定图表如 <a href=\"https://ecomfe.github.io/echarts-liquidfill/example/\" target=\"_blank\">水球图</a> 等,SVG 渲染器可能效果更好。</li>\n<li>数据量很大、较多交互时,可以选用 Canvas 渲染器。</li>\n</ul>\n</li>\n</ul>\n<p>我们强烈欢迎开发者们 <a href=\"https://github.com/apache/echarts/issues/new\" target=\"_blank\">反馈</a> 给我们使用的体验和场景,帮助我们更好的做优化。</p>\n<p>注:除了某些特殊的渲染可能依赖 Canvas:如<a href=\"option.html#series-lines.effect\" target=\"_blank\">炫光尾迹特效</a>、<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=heatmap-bmap\" target=\"_blank\">带有混合效果的热力图</a>等,绝大部分功能 SVG 都是支持的。</p>\n<h2 id=\"-\">如何使用渲染器</h2>\n<p>ECharts 默认使用 Canvas 渲染。如果想使用 SVG 渲染,ECharts 代码中须包括有 SVG 渲染器模块。</p>\n<ul>\n<li>ECharts 的 <a href=\"https://www.jsdelivr.com/package/npm/echarts\" target=\"_blank\">预构建文件</a> 中,<a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.common.min.js\" target=\"_blank\">常用版</a> 和 <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js\" target=\"_blank\">完整版</a> 已经包含了 SVG 渲染器,可直接使用。而 <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.simple.min.js\" target=\"_blank\">精简版</a> 没有包括。</li>\n<li>如果 <a href=\"https://echarts.apache.org/zh/builder.html\" target=\"_blank\">在线自定义构建 ECharts</a>,则需要勾上页面下方的 “SVG 渲染”。</li>\n<li>如果 <a href=\"tutorial.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E6%9E%84%E5%BB%BA%20ECharts\" target=\"_blank\">线下自定义构建 ECharts</a>,则须引入 SVG 渲染器模块,即:</li>\n</ul>\n<pre><code class=\"lang-js\">import &#39;zrender/lib/svg/svg&#39;;\n</code></pre>\n<p>然后,我们就可以在代码中,初始化图表实例时,<a href=\"api.html#echarts.init\" target=\"_blank\">传入参数</a> 选择渲染器类型:</p>\n<pre><code class=\"lang-js\">// 使用 Canvas 渲染器(默认)\nvar chart = echarts.init(containerDom, null, {renderer: &#39;canvas&#39;});\n// 等价于:\nvar chart = echarts.init(containerDom);\n\n// 使用 SVG 渲染器\nvar chart = echarts.init(containerDom, null, {renderer: &#39;svg&#39;});\n</code></pre>\n"},"地理坐标系和地图系列的 SVG 底图":{"type":["*"],"description":"<p>从 <code class=\"codespan\">v5.1.0</code> 开始,ECharts 支持在 <a href=\"option.html#geo\" target=\"_blank\">地理坐标系(geo)</a> 和 <a href=\"option.html#series-map\" target=\"_blank\">地图系列(map series)</a> 中使用 SVG 作为底图。之前只支持 <a href=\"http://geojson.org/\" target=\"_blank\">GeoJSON</a> 格式的底图。</p>\n<p>有了这个功能,ECharts 能在任一种渲染模式(<code class=\"codespan\">canvas</code> 渲染模式和 <code class=\"codespan\">svg</code> 渲染模式)中绘制 SVG 底图,并且能够只用简单的 ECharts 配置项(option)就带来 <a href=\"option.html#geo.roam\" target=\"_blank\">放大</a>、<a href=\"option.html#geo.roam\" target=\"_blank\">平移</a>、<a href=\"option.html#geo.select\" target=\"_blank\">点选(select)</a>、<a href=\"option.html#geo.roam\" target=\"_blank\">高亮强调(emphasis)</a>、<a href=\"option.html#geo.emphasis.focus\" target=\"_blank\">聚焦-淡出(focus-blur)</a>、<a href=\"option.html#geo.label\" target=\"_blank\">标签(label)</a>、<a href=\"option.html#series-map.labelLayout\" target=\"_blank\">标签布局(labelLayout)</a>、<a href=\"option.html#geo.tooltip\" target=\"_blank\">提示框(tooltip)</a> 等特性。ECharts 中的所有在 <a href=\"option.html#geo\" target=\"_blank\">地理坐标系(geo)</a> 中可用系列(如 <a href=\"option.html#series-scatter\" target=\"_blank\">散点图(scatter)</a>、<a href=\"option.html#series-effectScatter\" target=\"_blank\">特效散点图(effectScatter)</a>,<a href=\"option.html#series-lines\" target=\"_blank\">路径图(lines)</a>,<a href=\"option.html#series-custom\" target=\"_blank\">自定义系列(custom)</a>)也能显示在 SVG 底图上。</p>\n<p>这些是使用 SVG 底图的例子:</p>\n<p><a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-beef-cuts\" target=\"_blank\">庖丁解牛</a> |\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-organ\" target=\"_blank\">内脏数据</a> |\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-seatmap-flight\" target=\"_blank\">航班选座</a> |\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-svg-map\" target=\"_blank\">地图</a> |\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-svg-scatter-simple\" target=\"_blank\">散点图</a> |\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-svg-lines\" target=\"_blank\">路径图</a> |\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-svg-traffic\" target=\"_blank\">交通</a></p>\n<h2 id=\"-\">基本用法</h2>\n<p>SVG 底图的用法与 <a href=\"http://geojson.org/\" target=\"_blank\">GeoJSON</a> 底图的用法相同。</p>\n<p>如果在 <a href=\"option.html#geo\" target=\"_blank\">地理坐标系(geo)</a> 中使用:</p>\n<pre><code class=\"lang-js\">$.get(&#39;map/organ.svg&#39;, function (svg) {\n    // 首先向 echarts 注册 SVG 字符串或解析过的 SVG DOM\n    echarts.registerMap(&#39;organ_diagram&#39;, {svg: svg});\n\n    var chart = echarts.init(document.getElementById(&#39;main&#39;))。\n    chart.setOption({\n        geo: [{\n            // 引用注册过的底图。\n            map: &#39;organ_diagram&#39;,\n            ...\n        }]\n    });\n});\n</code></pre>\n<p>如果在 <a href=\"option.html#series-map\" target=\"_blank\">地图系列(map series)</a> 中使用:</p>\n<pre><code class=\"lang-js\">$.get(&#39;map/beef_cuts.svg&#39;, function (svg) {\n    // 首先向 echarts 注册 SVG 字符串或解析过的 SVG DOM\n    echarts.registerMap(&#39;beef_cuts_diagram&#39;, {svg: svg})。\n\n    var chart = echarts.init(document.getElementById(&#39;main&#39;))。\n    chart.setOption({\n        series: {\n            type: &#39;map&#39;,\n            // 引用注册过的底图。\n            map: &#39;beef_cuts_diagram&#39;,\n            ...\n        }\n    });\n});\n</code></pre>\n<h2 id=\"-\">缩放和平移</h2>\n<p><a href=\"option.html#geo\" target=\"_blank\">地理坐标系(geo)</a></p>\n<pre><code class=\"lang-js\">option = {\n    geo: {\n        // 启用缩放和平移。\n        roam: true,\n        ...\n    }\n};\n</code></pre>\n<p><a href=\"option.html#series-map\" target=\"_blank\">地图系列(map series)</a></p>\n<pre><code class=\"lang-js\">option = {\n    series: {\n        type: &#39;map&#39;,\n        // 启用缩放和平移。\n        roam: true,\n        ...\n    }\n};\n</code></pre>\n<p>参见例子 <a href=\"option.html#geo.roam\" target=\"_blank\">roam</a>、<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-svg-map\" target=\"_blank\">SVG 地图</a>。</p>\n<h2 id=\"-\">具名元素</h2>\n<p>如果要控制 SVG 中的某些元素,或者让某些元素能交互,我们首先要在 SVG 中标记这些元素:在这些元素上添加 <code class=\"codespan\">name</code> 属性(下文称此类添加过 <code class=\"codespan\">name</code> 属性的元素为:“具名元素”)。许多功能(如 <a href=\"option.html#geo.select\" target=\"_blank\">select</a>、<a href=\"option.html#geo.emphasis\" target=\"_blank\">emphasis</a>、<a href=\"option.html#geo.emphasis.focus\" target=\"_blank\">focus-blur</a>、<a href=\"option.html#geo.label\" target=\"_blank\">label</a>、<a href=\"option.html#series-map.labelLayout\" target=\"_blank\">labelLayout</a> 和 <a href=\"option.html#geo.tooltip\" target=\"_blank\">tooltip</a> 这类交互相关的功能)都依赖于对元素的命名。</p>\n<p>如下例,我们只在左边的 SVG <code class=\"codespan\">path</code> 上添加名称属性 <code class=\"codespan\">name=&quot;named_rect&quot;</code>:</p>\n<pre><code class=\"lang-xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\n&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; version=&quot;1.2&quot; fill-rule=&quot;evenodd&quot; xml:space=&quot;preserve&quot;&gt;\n    &lt;path name=&quot;named_rect&quot; d=&quot;M 0,0 L 0,100 100,100 100,0 Z&quot; fill=&quot;#765&quot; /&gt;\n    &lt;path d=&quot;M 150,0 L 150,100 250,100 250,0 Z&quot; fill=&quot;#567&quot; /&gt;\n&lt;/svg&gt;\n</code></pre>\n<p>这样,鼠标 hover 时能高亮左边的矩形,但是右边的不行。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/geo-svg-named-basic&edit=1&reset=1\" width=\"500\" height=\"200\" ></iframe>\n\n\n<p>我们还可以在 <a href=\"option.html#geo.regions\" target=\"_blank\">geo.regions</a> 中为具名元素指定一些专属配置项:</p>\n<pre><code class=\"lang-js\">option = {\n    geo: {\n        map: &#39;some_svg&#39;,\n        regions: [{\n            name: &#39;element_name_1&#39;,\n            itemStyle: { ... }\n        }, {\n            name: &#39;element_name_2&#39;,\n            itemStyle: { ... }\n        }]\n    }\n};\n</code></pre>\n<p>注意:</p>\n<ul>\n<li>只有这些 SVG 元素可以被命名:\n<code class=\"codespan\">rect</code>、<code class=\"codespan\">circle</code>、<code class=\"codespan\">line</code>、<code class=\"codespan\">ellipse</code>、<code class=\"codespan\">polygon</code>、<code class=\"codespan\">polyline</code>、<code class=\"codespan\">path</code>、<code class=\"codespan\">text</code>、<code class=\"codespan\">tspan</code>、<code class=\"codespan\">g</code>。</li>\n<li>支持多个元素以相同的名称命名,这样它们能被同时高亮、选中。</li>\n</ul>\n<h2 id=\"-\">自定义样式</h2>\n<p>虽然 SVG 元素的样式(如颜色、字体、线宽等等)都能直接在 SVG 文件中定义,但 ECharts 也支持在 <code class=\"codespan\">option</code> 中为具名元素定制样式,这能提供不少便利。</p>\n<p>可以在 <a href=\"option.html#geo.itemStyle\" target=\"_blank\">geo.itemStyle</a> 或 <a href=\"option.html#series-map.itemStyle\" target=\"_blank\">series-map.itemStyle</a> 中设置样式(也包括 <code class=\"codespan\">emphasis.itemStyle</code>、<code class=\"codespan\">select.itemStyle</code>、<code class=\"codespan\">blur.itemStyle</code>、<code class=\"codespan\">regions[i].itemStyle</code>、<code class=\"codespan\">regions[i].emphasis.itemStyle</code>、<code class=\"codespan\">regions[i].select.itemStyle</code>、<code class=\"codespan\">regions[i].blur.itemStyle</code>)。也能在这里删除一些具名元素的默认样式(例如,设置 <code class=\"codespan\">emphasis.itemStyle.color: null</code> 后,鼠标 hover 时填充色就不会改变)。</p>\n<p>此外,使用 <a href=\"option.html#series-map\" target=\"_blank\">series-map</a> 时,也可以用 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap 组件</a> 为具名元素赋予样式。参见例子 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-beef-cuts\" target=\"_blank\">庖丁解牛</a>。</p>\n<p>注意:\n只有这些具名元素可以在 <code class=\"codespan\">itemStyle</code> 中设置样式:\n<code class=\"codespan\">rect</code>、<code class=\"codespan\">circle</code>、<code class=\"codespan\">line</code>、<code class=\"codespan\">ellipse</code>、<code class=\"codespan\">polygon</code>、<code class=\"codespan\">polyline</code>、<code class=\"codespan\">path</code>。</p>\n<h2 id=\"-select-\">元素的“选中”能力(select)</h2>\n<p>如果想使具名元素能被“选中”,把 <a href=\"option.html#geo.selectedMode\" target=\"_blank\">geo.selectedMode</a> 或 <a href=\"option.html#series-map.selectedMode\" target=\"_blank\">series-map.selectedMode</a> 设置为 <code class=\"codespan\">&#39;single&#39;</code> 或者 <code class=\"codespan\">&#39;multiple&#39;</code> 即可。元素被选中时的样式可以在 <a href=\"option.html#geo.select\" target=\"_blank\">geo.select</a> 或 <a href=\"option.html#series-map.select\" target=\"_blank\">series-map.select</a> 中设定。</p>\n<p>可以通过 <a href=\"api.html#event.geoselectchanged\" target=\"_blank\">geoselectchanged</a> 事件获得所有被选中者的名称,例如:</p>\n<pre><code class=\"lang-js\">myChart.on(&#39;geoselectchanged&#39;, function (params) {\n    var selectedNames = params.allSelected[0].name;\n    console.log(&#39;selected&#39;, selectedNames);\n});\n</code></pre>\n<p>参见例子 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-seatmap-flight\" target=\"_blank\">航班选座</a>。</p>\n<h2 id=\"-emphasis-focus-blur-\">元素的“高亮强调”(emphasis)和“聚焦-淡出”(focus-blur)</h2>\n<p>具名元素可以自动在鼠标 hover 时有“高亮强调”(emphasis)的能力。</p>\n<p>此外,可以把 <a href=\"option.html#geo.emphasis.focus\" target=\"_blank\">geo.emphasis.focus</a> 设置为 <code class=\"codespan\">&#39;self&#39;</code> 来启用 “聚焦-淡出”(focus-blur)功能。也就是,当鼠标 hover 在一个具名元素上时,所有其他元素都会被淡出。</p>\n<p>参见例子 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-organ\" target=\"_blank\">Organ Visualization</a>。</p>\n<h2 id=\"-tooltip-\">提示框(tooltip)</h2>\n<p>可以在具名元素上启用或禁用提示框(tooltip)功能。</p>\n<pre><code class=\"lang-js\">option = {\n    // 在 option 根部声明 tooltip 以整体开启 tooltip 功能。\n    tooltip: {},\n    geo: {\n        map: &#39;some_svg&#39;,\n        tooltip: {\n            // 用 `show` 来启用/禁用 geo 上的 tooltip。\n            show: true\n        },\n        regions: [{\n            name: &#39;some_name1&#39;,\n            // 如果需要的话,可以对特定具名元素指定 tooltip 参数。\n            tooltip: {\n                formatter: &#39;一些特殊的提示 1&#39;\n            }\n        }, {\n            name: &#39;some_name2&#39;,\n            tooltip: {\n                formatter: &#39;一些特殊的提示 2&#39;\n            }\n        }]\n    }\n};\n</code></pre>\n<p>如果想单独禁用 geo 上的 tooltip,只需:</p>\n<pre><code class=\"lang-js\">option = {\n    tooltip: {},\n    geo: {\n        map: &#39;some_svg&#39;,\n        tooltip: {\n            show: false\n        }\n    }\n};\n</code></pre>\n<p>参见例子 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-svg-map\" target=\"_blank\">SVG 地图</a>。</p>\n<h2 id=\"-label-\">标签(label)</h2>\n<p>虽然可以直接在 SVG 中定义 <code class=\"codespan\">&lt;text&gt;</code>/<code class=\"codespan\">&lt;tspan&gt;</code> 来显示文本标签,但 ECharts 也支持用 <a href=\"option.html#geo.label\" target=\"_blank\">geo.label</a> 或 <a href=\"option.html#series-map.label\" target=\"_blank\">series-map.label</a> 来设置底图上的标签。</p>\n<p>标签功能默认在鼠标 hover 时是启用的。如果想禁用标签,只需:</p>\n<pre><code class=\"lang-js\">option = {\n    geo: {\n        map: &#39;some_svg&#39;,\n        emphasis: {\n            label: {\n                show: false\n            }\n        }\n    }\n};\n</code></pre>\n<p>当想要多个元素共享一个标签时,我们有两种选择:</p>\n<ul>\n<li>将这些元素包裹在一个具名的 <code class=\"codespan\">&lt;g&gt;</code> 中(如 <code class=\"codespan\">&lt;g=&quot;name_a&quot;&gt;</code>)中,这样只会显示一个标签,并且基于 <code class=\"codespan\">&lt;g&gt;</code> 的 <code class=\"codespan\">boundingRect</code> 定位。</li>\n<li>给这些元素起相同的名字(如 <code class=\"codespan\">&lt;path name=&quot;name_b&quot;/&gt;&lt;path name=&quot;name_b&quot;/&gt;</code>),这样每个元素都会显示一个标签,并且会根据每个元素自身显示和定位。</li>\n</ul>\n<p>例如(将鼠标 hover 到元素上能显示标签):</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/geo-svg-label-basic&edit=1&reset=1\" width=\"500\" height=\"300\" ></iframe>\n\n\n<p>注意:只有这些具名元素可以设置 <code class=\"codespan\">label</code>:\n<code class=\"codespan\">rect</code>、<code class=\"codespan\">circle</code>、<code class=\"codespan\">line</code>、<code class=\"codespan\">ellipse</code>、<code class=\"codespan\">polygon</code>、<code class=\"codespan\">polyline</code>、<code class=\"codespan\">path</code>、<code class=\"codespan\">g</code>。</p>\n<p>标签的用法也参见示例 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-organ\" target=\"_blank\">Organ Visualization</a>。</p>\n<h2 id=\"-\">事件</h2>\n<p>可以用如下方式监听具名元素的鼠标事件或者触摸事件:</p>\n<pre><code class=\"lang-js\">// &#39;name1&#39; 是一个 SVG 元素的名字。\nmyChart.on(&#39;click&#39;, { geoIndex: 0, name: &#39;name1&#39; }, function (params) {\n    console.log(params);\n});\n</code></pre>\n<h2 id=\"svg-\">SVG 底图的布局</h2>\n<p>在默认情况下,ECharts 会将 SVG 底图放置在画布的中心。如果需要调整的话,一般只调整 <a href=\"option.html#geo.layoutCenter\" target=\"_blank\">layoutCenter</a>/<a href=\"option.html#geo.layoutSize\" target=\"_blank\">layoutSize</a>,偶尔也可能要调整 <code class=\"codespan\">&lt;svg viewBox=&quot;...&quot;&gt;</code>/<a href=\"option.html#geo.boundingCoords\" target=\"_blank\">geo.boundingCoords</a>(它们两个的区别是:是否产生剪裁)。在大多数情况下,用这些已经足够了。</p>\n<p>如果要做一些精确的位置定制,那么还得了解下面这些概念。</p>\n<p><a href=\"option.html#geo\" target=\"_blank\">地理坐标系(geo)</a> 和 <a href=\"option.html#series-map\" target=\"_blank\">地图系列(map series)</a> 的布局规则和选项都是一样的。所以下面我们只讲 <a href=\"option.html#geo\" target=\"_blank\">地理坐标系(geo)</a>。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/geo-svg-layout-basic&edit=1&reset=1\" width=\"700\" height=\"550\" ></iframe>\n\n\n<p>上面的例子只有一个 ECharts 画布,其中三个 SVG 展示在六个 <a href=\"option.html#geo\" target=\"_blank\">地理坐标系(geo)</a> 中。同一列中的两个 <a href=\"option.html#geo\" target=\"_blank\">地理坐标系(geo)</a> 使用相同的 SVG。</p>\n<p>首先,形状的外观是由 SVG 文件本身决定的。也就是说,在上例中,由 <code class=\"codespan\">&lt;circle&gt;</code> 和 <code class=\"codespan\">viewBox</code> 属性决定(<code class=\"codespan\">viewBox</code> 会切割圆形)。可以注意,每一列的形状轮廓都一样(不管它们的位置、大小是否不同和是否被拉伸),因为它们使用的是同一个 SVG。</p>\n<p>其次,用户可以用下面任一组选项,指定 <a href=\"option.html#geo\" target=\"_blank\">地理坐标系(geo)</a> 的视口(<code class=\"codespan\">view port</code>)的位置和大小(它们的单位都是 echarts 画布的像素,或者百分比值):</p>\n<ul>\n<li><a href=\"option.html#geo.layoutCenter\" target=\"_blank\">layoutCenter</a>、<a href=\"option.html#geo.layoutSize\" target=\"_blank\">layoutSize</a>(最常用)。</li>\n<li><a href=\"option.html#geo.top\" target=\"_blank\">top</a>、<a href=\"option.html#geo.right\" target=\"_blank\">right</a>、<a href=\"option.html#geo.bottom\" target=\"_blank\">bottom</a>、<a href=\"option.html#geo.left\" target=\"_blank\">left</a>(在上例中使用的是这组)。</li>\n</ul>\n<p>在上例中,六个 <code class=\"codespan\">geo view port</code> 用六个黑色方块表示。</p>\n<p>第三,确定 SVG 的 <code class=\"codespan\">bounding rect</code>。<code class=\"codespan\">bounding rect</code> 由以下方法决定(它们的单位都是 SVG 内部元素的度量单位):</p>\n<ol>\n<li>如果设定了 <a href=\"option.html#geo.boundingCoords\" target=\"_blank\">geo.boundingCoords</a>,则用它作 <code class=\"codespan\">bounding rect</code>。</li>\n<li>否则,如果设定了 <code class=\"codespan\">&lt;svg width=&quot;...&quot; height=&quot;...&quot;&gt;</code>,则用 <code class=\"codespan\">[0, 0, width, height]</code> 作为 <code class=\"codespan\">bounding rect</code>。(如果只设定了 <code class=\"codespan\">width</code> 或 <code class=\"codespan\">height</code>,则只使用 <code class=\"codespan\">[0, width]</code> 或 <code class=\"codespan\">[0, height]</code>)。</li>\n<li>否则,如果设定了 <code class=\"codespan\">&lt;svg viewBox=&quot;...&quot;&gt;</code>,则用 <code class=\"codespan\">viewBox</code> 作 <code class=\"codespan\">bounding rect</code>。</li>\n<li>否则,由整个 SVG 所有元素 <code class=\"codespan\">bounding rect</code> 的并集得到最终 <code class=\"codespan\">bounding rect</code>。</li>\n<li>如果设定了 <a href=\"option.html#geo.center\" target=\"_blank\">geo.center</a> 或 <a href=\"option.html#geo.zoom\" target=\"_blank\">geo.zoom</a>,则把上述 <code class=\"codespan\">1~4</code> 得到的 <code class=\"codespan\">bounding rect</code> 进行相应的 <code class=\"codespan\">transform</code>。</li>\n</ol>\n<p><code class=\"codespan\">bounding rect</code> 确定后,会放置到相应的 <code class=\"codespan\">geo view port</code> 里:</p>\n<ul>\n<li>如果用的是 <a href=\"option.html#geo.layoutCenter\" target=\"_blank\">layoutCenter</a>、<a href=\"option.html#geo.layoutSize\" target=\"_blank\">layoutSize</a>,<code class=\"codespan\">bounding rect</code> 会置于 <code class=\"codespan\">geo view port</code> 的中心,并尽量填满 <code class=\"codespan\">geo view port</code>(保持长宽比)。</li>\n<li>如果用的是 <a href=\"option.html#geo.top\" target=\"_blank\">top</a>、<a href=\"option.html#geo.right\" target=\"_blank\">right</a>、<a href=\"option.html#geo.bottom\" target=\"_blank\">bottom</a>、<a href=\"option.html#geo.left\" target=\"_blank\">left</a>,<code class=\"codespan\">bounding rect</code> 会被拉伸,完全填充 <code class=\"codespan\">geo view port</code>。</li>\n</ul>\n<h2 id=\"-svg-\">在 SVG 底图上绘制系列</h2>\n<p><a href=\"option.html#series-scatter\" target=\"_blank\">scatter</a>、<a href=\"option.html#series-effectScatter\" target=\"_blank\">effectScatter</a>、<a href=\"option.html#series-lines\" target=\"_blank\">lines</a>、<a href=\"option.html#series-custom\" target=\"_blank\">custom</a> 这些在 <a href=\"option.html#geo\" target=\"_blank\">地理坐标系(geo)</a> 中可用的系列都可以在 SVG 底图上定位和显示。</p>\n<p>在这种用法中,<code class=\"codespan\">series.data</code> 的值的单位即为是 SVG 内部元素的度量单位。比如说:</p>\n<pre><code class=\"lang-js\">option = {\n    geo: {\n        map: &#39;some_svg&#39;\n    },\n    series: {\n        type: &#39;effectScatter&#39;,\n        coordinateSystem: &#39;geo&#39;,\n        geoIndex: 0,\n        data: [\n            // SVG local coords.\n            [488.2358421078053, 459.70913833075736],\n            [770.3415644319939, 757.9672194986475],\n            [1180.0329284196291, 743.6141808346214],\n        ]\n    }\n};\n</code></pre>\n<p>另外,有种简便方法可以获得 SVG 的坐标。</p>\n<pre><code class=\"lang-js\">myChart.setOption({\n    geo: {\n        map: &#39;some_svg&#39;\n    }\n});\nmyChart.getZr().on(&#39;click&#39;, function (params) {\n    var pixelPoint = [params.offsetX, params.offsetY];\n    var dataPoint = myChart.convertFromPixel({ geoIndex: 0 }, pixelPoint);\n    // 在 SVG 上点击时,坐标会被打印。\n    // 这些坐标可以在 `series.data` 里使用。\n    console.log(dataPoint);\n});\n</code></pre>\n<p>参见示例 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-svg-scatter-simple\" target=\"_blank\">SVG Scatter</a>、<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-svg-lines\" target=\"_blank\">SVG Lines</a>、<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-traffic\" target=\"_blank\">SVG Traffic</a>。</p>\n<h2 id=\"-svg-\">暂不支持的 SVG 功能</h2>\n<p>实现一个完整的 SVG 解析器有点困难。虽然已经支持了常用的 SVG 功能,但至少下面列出的这些还没支持:</p>\n<ul>\n<li>翻转(flip)和倾斜(skew)(将在 <code class=\"codespan\">v5.1.2</code> 支持):<ul>\n<li>不支持 <code class=\"codespan\">transform: skew(...)</code>(包括包含 skew 的 <code class=\"codespan\">transform: matrix(...)</code>)。</li>\n<li>不支持当 <code class=\"codespan\">transform: scale(x, y)</code> 中 <code class=\"codespan\">x</code>/<code class=\"codespan\">y</code> 正负不同且有 <code class=\"codespan\">rotate</code>(例如,<code class=\"codespan\">scale: (1, -1), rotate(90)</code>)。</li>\n</ul>\n</li>\n<li>不支持 <code class=\"codespan\">&lt;style&gt;</code> 标签。<ul>\n<li>但内联样式是支持的(例如支持 <code class=\"codespan\">&lt;path style=&quot;color:red&quot; /&gt;</code>)。</li>\n</ul>\n</li>\n<li>单位:<ul>\n<li>只支持 <code class=\"codespan\">px</code>。不支持其他单位如 <code class=\"codespan\">width=&quot;231.65mm&quot;</code>。</li>\n<li>不支持百分比值,如不支持 <code class=\"codespan\">&lt;svg width=&quot;30%&quot; height=&quot;40%&quot;&gt;</code>。</li>\n</ul>\n</li>\n<li><code class=\"codespan\">&lt;defs&gt;</code> 标签:<ul>\n<li>只支持 <code class=\"codespan\">&lt;linearGradient&gt;</code>、<code class=\"codespan\">&lt;radialGradient&gt;</code>。</li>\n<li>还不支持在 <code class=\"codespan\">&lt;defs&gt;</code> 中定义其他元素(如 <code class=\"codespan\">&lt;pattern&gt;</code>、<code class=\"codespan\">&lt;path&gt;</code>、...)。</li>\n</ul>\n</li>\n<li><code class=\"codespan\">&lt;linearGradient&gt;</code>、<code class=\"codespan\">&lt;radialGradient&gt;</code>:<ul>\n<li>不支持 <code class=\"codespan\">fx</code>、<code class=\"codespan\">fy</code>。</li>\n<li>不支持 <code class=\"codespan\">gradientTransform</code>。</li>\n</ul>\n</li>\n<li><code class=\"codespan\">fill:url(..)</code>, <code class=\"codespan\">stroke:utl(..)</code>:<ul>\n<li>只支持 <code class=\"codespan\">url(#someId)</code>。</li>\n<li>不支持其他 URL 模式,例如不支持:<ul>\n<li><code class=\"codespan\">url(https://example.com/images/myImg.jpg)</code>。</li>\n<li><code class=\"codespan\">url(data:image/png;base64,iRxVB0...)</code>。</li>\n<li><code class=\"codespan\">url(myFont.woff)</code>。</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><code class=\"codespan\">&lt;switch&gt;</code> 标签:<ul>\n<li><code class=\"codespan\">&lt;switch&gt;</code> 标签内的所有内容都会显示。不支持“切换”功能。</li>\n</ul>\n</li>\n<li><code class=\"codespan\">&lt;text&gt;</code>。<ul>\n<li>不支持 <code class=\"codespan\">textPath</code>。</li>\n<li>不支持 <a href=\"https://www.w3.org/TR/SVG/text.html#TermAddressableCharacter\" target=\"_blank\">Addressable character</a>,也就是说:<pre><code class=\"lang-xml\">&lt;!-- 不支持: --&gt;\n&lt;tspan x=&quot;0 4.94 9.89&quot;&gt;abc&lt;/tspan&gt;。\n&lt;!-- 支持: --&gt;\n&lt;tspan x=&quot;0&quot;&gt;A&lt;/tspan&gt;\n&lt;tspan x=&quot;4.94&quot;&gt;b&lt;/tspan&gt;\n&lt;tspan x=&quot;9.89&quot;&gt;C&lt;/tspan&gt;\n</code></pre>\n</li>\n</ul>\n</li>\n</ul>\n"},"在图表中支持无障碍访问":{"type":["*"],"description":"<p>W3C 制定了无障碍富互联网应用规范集(<a href=\"https://www.w3.org/WAI/intro/aria\" target=\"_blank\">WAI-ARIA</a>,the Accessible Rich Internet Applications Suite),致力于使得网页内容和网页应用能够被更多残障人士访问。Apache ECharts<sup>TM</sup> 4.0 遵从这一规范,支持自动根据图表配置项智能生成描述,使得盲人可以在朗读设备的帮助下了解图表内容,让图表可以被更多人群访问。</p>\n<p>默认关闭,需要通过将 <a href=\"option.html#aria.enabled\" target=\"_blank\">aria.enabled</a> 设置为 <code class=\"codespan\">true</code> 开启。开启后,会根据图表、数据、标题等情况,自动智能生成关于图表的描述,用户也可以通过配置项修改描述。</p>\n<p>对于配置项:</p>\n<pre><code class=\"lang-js\">option = {\n    aria: {\n        enabled: true\n    },\n    title: {\n        text: &#39;某站点用户访问来源&#39;,\n        x: &#39;center&#39;\n    },\n    series: [\n        {\n            name: &#39;访问来源&#39;,\n            type: &#39;pie&#39;,\n            data: [\n                { value: 335, name: &#39;直接访问&#39; },\n                { value: 310, name: &#39;邮件营销&#39; },\n                { value: 234, name: &#39;联盟广告&#39; },\n                { value: 135, name: &#39;视频广告&#39; },\n                { value: 1548, name: &#39;搜索引擎&#39; }\n            ]\n        }\n    ]\n};\n</code></pre>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/aria-pie&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n<p>生成的图表 DOM 上,会有一个 <code class=\"codespan\">aria-label</code> 属性,在朗读设备的帮助下,盲人能够了解图表的内容。其值为:</p>\n<pre><code>这是一个关于“某站点用户访问来源”的图表。图表类型是饼图,表示访问来源。其数据是——直接访问的数据是335,邮件营销的数据是310,联盟广告的数据是234,视频广告的数据是135,搜索引擎的数据是1548。\n</code></pre><p>默认语言会根据语言包(默认中文)选择,也可以使用配置项自定义模板。</p>\n<p>除此之外,Apache ECharts 5 新增支持贴花纹理,作为颜色的辅助表达,进一步用以区分数据。在 <code class=\"codespan\">aria.enabled</code> 为 <code class=\"codespan\">true</code> 的前提下,将 <code class=\"codespan\">aria.decal.show</code> 设为 <code class=\"codespan\">true</code> 即可采用默认的贴花样式。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/aria-decal-simple&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n<p>下面,我们更具体地介绍这两种无障碍设计的配置方式。</p>\n<h2 id=\"-\">图表描述</h2>\n<h4 id=\"-\">采用整体描述</h4>\n<p>对于有些图表,默认生成的数据点的描述并不足以表现整体的信息。比如下图的散点图,默认生成的描述可以包含数据点的坐标值,但是知道几百几千个点的坐标并不能帮助我们有效地理解图表表达的信息。</p>\n<p><img width=\"600\" height=\"auto\" src=\"documents/asset/img/aria-example.png\"></p>\n<p>这时候,用户可以通过 <a href=\"option.html#aria.label.description\" target=\"_blank\">aria.label.description</a> 配置项指定图表的整体描述。</p>\n<h4 id=\"-\">定制模板描述</h4>\n<p>除了整体性修改描述之外,我们还提供了生成描述的模板,可以方便地进行细粒度的修改。</p>\n<p>生成描述的基本流程为,如果 <a href=\"option.html#aria.label.show\" target=\"_blank\">aria.label.show</a> 设置为 <code class=\"codespan\">true</code>,则生成无障碍访问描述,否则不生成。如果定义了 <a href=\"option.html#aria.label.description\" target=\"_blank\">aria.label.description</a>,则将其作为图表的完整描述,否则根据模板拼接生成描述。我们提供了默认的生成描述的算法,仅当生成的描述不太合适时,才需要修改这些模板,甚至使用 <code class=\"codespan\">aria.description</code> 完全覆盖。</p>\n<p>使用模板拼接时,先根据是否存在标题 <a href=\"#title.text\">title.text</a> 决定使用 <a href=\"option.html#aria.label.general.withTitle\" target=\"_blank\">aria.label.general.withTitle</a> 还是 <a href=\"option.html#aria.label.general.withoutTitle\" target=\"_blank\">aria.label.general.withoutTitle</a> 作为整体性描述。其中,<code class=\"codespan\">aria.general.withTitle</code> 配置项包括模板变量 <code class=\"codespan\">&#39;{title}&#39;</code>,将会被替换成图表标题。也就是说,如果 <code class=\"codespan\">aria.general.withTitle</code> 被设置为 <code class=\"codespan\">&#39;图表的标题是:{title}。&#39;</code>,则如果包含标题 <code class=\"codespan\">&#39;价格分布图&#39;</code>,这部分的描述为 <code class=\"codespan\">&#39;图表的标题是:价格分布图。&#39;</code>。</p>\n<p>拼接完标题之后,会依次拼接系列的描述(<a href=\"option.html#aria.label.series\" target=\"_blank\">aria.label.series</a>),和每个系列的数据的描述(<a href=\"option.html#aria.label.data\" target=\"_blank\">aria.label.data</a>)。同样,每个模板都有可能包括模板变量,用以替换实际的值。</p>\n<h2 id=\"-\">贴花图案</h2>\n<p>上文介绍了使用默认的贴花图案的方式。如果需要自定义贴花图案,可以使用 <a href=\"option.html#aria.decal.decals\" target=\"_blank\">aria.decal.decals</a> 配置出灵活多变的图案。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/aria-decal&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n<p>更具体的信息请参见 <a href=\"option.html#aria\" target=\"_blank\">ARIA 文档</a>。</p>\n"},"使用 ECharts GL 实现基础的三维可视化":{"type":["*"],"description":"<p>ECharts GL (后面统一简称 GL)为 Apache ECharts<sup>TM</sup> 补充了丰富的三维可视化组件,这篇文章我们会简单介绍如何基于 GL 实现一些常见的三维可视化作品。实际上如果你对 ECharts 有一定了解的话,也可以很快的上手 GL,GL 的配置项完全是按照 ECharts 的标准和上手难度来设计的。</p>\n<p>在看完文章之后,你可以前往 <a href=\"https://echarts.apache.org/examples/zh/index.html#chart-type-globe\" target=\"_blank\">官方示例</a> 和 <a href=\"https://gallery.echartsjs.com/explore.html#tags=echarts-gl\" target=\"_blank\">Gallery</a> 去了解更多使用 GL 制作的示例,对于文章中我们没法解释到的代码,也可以前往 <a href=\"option-gl.html\" target=\"_blank\">GL 配置项手册</a> 查看具体的配置项使用方法。</p>\n<h2 id=\"-echarts-gl\">如何下载和引入 ECharts GL</h2>\n<p>为了不再增加已经很大了的 ECharts 完整版的体积,我们将 GL 作为扩展包的形式提供,和诸如水球图这样的扩展类似,如果要使用 GL 里的各种组件,只需要在引入<code class=\"codespan\">echarts.min.js</code>的基础上再引入一个<code class=\"codespan\">echarts-gl.min.js</code>。你可以从 <a href=\"https://echarts.apache.org/zh/download.html\" target=\"_blank\">官网</a> 下载最新版的 GL,然后在页面中通过标签引入:</p>\n<pre><code class=\"lang-html\">&lt;script src=&quot;lib/echarts.min.js&quot;&gt;&lt;/script&gt;\n&lt;script src=&quot;lib/echarts-gl.min.js&quot;&gt;&lt;/script&gt;\n</code></pre>\n<p>如果你的项目使用 webpack 或者 rollup 来打包代码的话,也可以通过 npm 安装后引入</p>\n<pre><code class=\"lang-bash\">npm install echarts\nnpm install echarts-gl\n</code></pre>\n<pre><code class=\"lang-js\">// 通过 ES6 的 import 语法引入 ECharts 和 ECharts GL\nimport echarts from &#39;echarts&#39;;\nimport &#39;echarts-gl&#39;;\n</code></pre>\n<h2 id=\"-\">声明一个基础的三维笛卡尔坐标系</h2>\n<p>引入 ECharts 和 ECharts GL 后,我们先来声明一个基础的三维笛卡尔坐标系用于绘制三维的散点图,柱状图,曲面图等常见的统计图。</p>\n<p>在 ECharts 中我们有 <a href=\"option.html#grid\" target=\"_blank\">grid</a> 组件用于提供一个矩形的区域放置一个二维的笛卡尔坐标系,以及笛卡尔坐标系上上的 x 轴(<a href=\"option.html#xAxis\" target=\"_blank\">xAxis</a>)和 y 轴(<a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a>)。对于三维的笛卡尔坐标系,我们在 GL 中提供了 <a href=\"option-gl.html#grid3D\" target=\"_blank\">grid3D</a> 组件用于划分一块三维的笛卡尔空间,以及放置在这个 <a href=\"option-gl.html#grid3D\" target=\"_blank\">grid3D</a> 上的 <a href=\"option-gl.html#xAxis3D\" target=\"_blank\">xAxis3D</a>, <a href=\"option-gl.html#yAxis3D\" target=\"_blank\">yAxis3D</a>, <a href=\"option-gl.html#zAxis3D\" target=\"_blank\">zAxis3D</a>。</p>\n<blockquote>\n<p>小提示:在 GL 中我们对除了 globe 之外所有的三维组件和系列都加了 3D 的后缀用以区分,例如三维的散点图就是 scatter3D,三维的地图就是 map3D 等等。</p>\n</blockquote>\n<p>下面这段代码就声明了一个最简单的三维笛卡尔坐标系</p>\n<pre><code class=\"lang-js\">var option = {\n    // 需要注意的是我们不能跟 grid 一样省略 grid3D\n    grid3D: {},\n    // 默认情况下, x, y, z 分别是从 0 到 1 的数值轴\n    xAxis3D: {},\n    yAxis3D: {},\n    zAxis3D: {}\n}\n</code></pre>\n<p>效果如下:</p>\n<p><img width=\"\" height=\"auto\" src=\"documents/asset/img/gl/grid3D-basic.png\"></p>\n<p>跟二维的笛卡尔坐标系一样,每个轴都会有多种类型,默认是数值轴,如果需要是类目轴的话,简单的设置为 <code class=\"codespan\">type: &#39;category&#39;</code>就行了。</p>\n<h2 id=\"-\">绘制三维的散点图</h2>\n<p>声明好笛卡尔坐标系后,我们先试试用一份程序生成的正态分布数据在这个三维的笛卡尔坐标系中画散点图。</p>\n<p>下面这段是生成正态分布数据的代码,你可以先不用关心这段代码是怎么工作的,只需要知道它生成了一份三维的正态分布数据放在<code class=\"codespan\">data</code>数组中。</p>\n<pre><code class=\"lang-js\">function makeGaussian(amplitude, x0, y0, sigmaX, sigmaY) {\n    return function (amplitude, x0, y0, sigmaX, sigmaY, x, y) {\n        var exponent = -(\n                ( Math.pow(x - x0, 2) / (2 * Math.pow(sigmaX, 2)))\n                + ( Math.pow(y - y0, 2) / (2 * Math.pow(sigmaY, 2)))\n            );\n        return amplitude * Math.pow(Math.E, exponent);\n    }.bind(null, amplitude, x0, y0, sigmaX, sigmaY);\n}\n// 创建一个高斯分布函数\nvar gaussian = makeGaussian(50, 0, 0, 20, 20);\n\nvar data = [];\nfor (var i = 0; i &lt; 1000; i++) {\n    // x, y 随机分布\n    var x = Math.random() * 100 - 50;\n    var y = Math.random() * 100 - 50;\n    var z = gaussian(x, y);\n    data.push([x, y, z]);\n}\n</code></pre>\n<p>生成的正态分布的数据大概长这样:</p>\n<pre><code class=\"lang-js\">[\n  [46.74395071259907, -33.88391024738553, 0.7754030099768191],\n  [-18.45302873809771, 16.88114775416834, 22.87772504105404],\n  [2.9908128281121336, -0.027699444453467947, 49.44400635911886],\n  ...\n]\n</code></pre>\n<p>每一项都包含了<code class=\"codespan\">x</code>, <code class=\"codespan\">y</code>, <code class=\"codespan\">z</code>三个值,这三个值会分别被映射到笛卡尔坐标系的 x 轴,y 轴和 z 轴上。</p>\n<p>然后我们可以使用 GL 提供的 <a href=\"option-gl.html#series-scatter3D\" target=\"_blank\">scatter3D</a> 系列类型把这些数据画成三维空间中正态分布的点。</p>\n<pre><code class=\"lang-js\">option = {\n    grid3D: {},\n    xAxis3D: {},\n    yAxis3D: {},\n    zAxis3D: { max: 100 },\n    series: [{\n        type: &#39;scatter3D&#39;,\n        data: data\n    }]\n}\n</code></pre>\n<p><img width=\"\" height=\"auto\" src=\"documents/asset/img/gl/scatter3D-gaussian.png\"></p>\n<h2 id=\"-\">使用真实数据的三维散点图</h2>\n<p>接下来我们来看一个使用真实多维数据的三维散点图例子。</p>\n<p>可以先从 <a href=\"https://echarts.apache.org/examples/data/asset/data/life-expectancy-table.json\" target=\"_blank\">https://echarts.apache.org/examples/data/asset/data/life-expectancy-table.json</a> 获取这份数据。</p>\n<p>格式化一下可以看到这份数据是很传统转成 JSON 后的表格格式。第一行是每一列数据的属性名,可以从这个属性名看出来每一列数据的含义,分别是人均收入,人均寿命,人口数量,国家和年份。</p>\n<pre><code class=\"lang-js\">[\n    [&quot;Income&quot;, &quot;Life Expectancy&quot;, &quot;Population&quot;, &quot;Country&quot;, &quot;Year&quot;],\n    [815, 34.05, 351014, &quot;Australia&quot;, 1800],\n    [1314, 39, 645526, &quot;Canada&quot;, 1800],\n    [985, 32, 321675013, &quot;China&quot;, 1800],\n    [864, 32.2, 345043, &quot;Cuba&quot;, 1800],\n    [1244, 36.5731262, 977662, &quot;Finland&quot;, 1800],\n    ...\n]\n</code></pre>\n<p>在 ECharts 4 中我们可以使用 dataset 组件非常方便地引入这份数据。如果对 dataset 还不熟悉的话可以看<a href=\"tutorial.html#%E4%BD%BF%E7%94%A8%20dataset%20%E7%AE%A1%E7%90%86%E6%95%B0%E6%8D%AE\" target=\"_blank\">dataset使用教程</a></p>\n<pre><code class=\"lang-js\">$.get(&#39;data/asset/data/life-expectancy-table.json&#39;, function (data) {\n    myChart.setOption({\n        grid3D: {},\n        xAxis3D: {},\n        yAxis3D: {},\n        zAxis3D: {},\n        dataset: {\n            source: data\n        },\n        series: [\n            {\n                type: &#39;scatter3D&#39;,\n                symbolSize: 2.5\n            }\n        ]\n    })\n});\n</code></pre>\n<p><img width=\"\" height=\"auto\" src=\"documents/asset/img/gl/scatter3D-life.png\"></p>\n<p>默认会把前三列,也就是收入(Income),人均寿命(Life Expectancy),人口(Population)分别放到 x、 y、 z 轴上。</p>\n<p>使用 encode 属性我们还可以将指定列的数据映射到指定的坐标轴上,从而省去很多繁琐的数据转换代码。例如我们将 x 轴换成是国家(Country),y 轴换成年份(Year),z 轴换成收入(Income),可以看到不同国家不同年份的人均收入分布。</p>\n<pre><code class=\"lang-js\">myChart.setOption({\n    grid3D: {},\n    xAxis3D: {\n        // 因为 x 轴和 y 轴都是类目数据,所以需要设置 type: &#39;category&#39; 保证正确显示数据。\n        type: &#39;category&#39;\n    },\n    yAxis3D: {\n        type: &#39;category&#39;\n    },\n    zAxis3D: {},\n    dataset: {\n        source: data\n    },\n    series: [\n        {\n            type: &#39;scatter3D&#39;,\n            symbolSize: 2.5,\n            encode: {\n                // 维度的名字默认就是表头的属性名\n                x: &#39;Country&#39;,\n                y: &#39;Year&#39;,\n                z: &#39;Income&#39;,\n                tooltip: [0, 1, 2, 3, 4]\n            }\n        }\n    ]\n});\n</code></pre>\n<h2 id=\"-visualmap-\">利用 visualMap 组件对三维散点图进行视觉编码</h2>\n<p>刚才多维数据的例子中,我们还有几个维度(列)没能表达出来,利用 ECharts 内置的 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a> 组件我们可以继续将第四个维度编码成颜色。</p>\n<pre><code class=\"lang-js\">myChart.setOption({\n    grid3D: {\n        viewControl: {\n            // 使用正交投影。\n            projection: &#39;orthographic&#39;\n        }\n    },\n    xAxis3D: {\n        // 因为 x 轴和 y 轴都是类目数据,所以需要设置 type: &#39;category&#39; 保证正确显示数据。\n        type: &#39;category&#39;\n    },\n    yAxis3D: {\n        type: &#39;log&#39;\n    },\n    zAxis3D: {},\n    visualMap: {\n        calculable: true,\n        max: 100,\n        // 维度的名字默认就是表头的属性名\n        dimension: &#39;Life Expectancy&#39;,\n        inRange: {\n            color: [&#39;#313695&#39;, &#39;#4575b4&#39;, &#39;#74add1&#39;, &#39;#abd9e9&#39;, &#39;#e0f3f8&#39;, &#39;#ffffbf&#39;, &#39;#fee090&#39;, &#39;#fdae61&#39;, &#39;#f46d43&#39;, &#39;#d73027&#39;, &#39;#a50026&#39;]\n        }\n    },\n    dataset: {\n        source: data\n    },\n    series: [\n        {\n            type: &#39;scatter3D&#39;,\n            symbolSize: 5,\n            encode: {\n                // 维度的名字默认就是表头的属性名\n                x: &#39;Country&#39;,\n                y: &#39;Population&#39;,\n                z: &#39;Income&#39;,\n                tooltip: [0, 1, 2, 3, 4]\n            }\n        }\n    ]\n})\n</code></pre>\n<p>这段代码中我们又在刚才的例子基础上加入了 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a> 组件,将<code class=\"codespan\">Life Expectancy</code>这一列数据映射到了不同的颜色。</p>\n<p>除此之外我们还把原来默认的透视投影改成了正交投影。正交投影在某些场景中可以避免因为近大远小所造成的表达错误。</p>\n<p><img width=\"\" height=\"auto\" src=\"documents/asset/img/gl/scatter3D-color.png\"></p>\n<p>当然,除了 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a> 组件,还可以利用其它的 ECharts 内置组件并且充分利用这些组件的交互效果,比如 <a href=\"option.html#legend\" target=\"_blank\">legend</a>。也可以像 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=scatter3d-scatter&amp;gl=1\" target=\"_blank\">三维散点图和散点矩阵结合使用</a> 这个例子一样实现二维和三维的系列混搭。</p>\n<p>在实现 GL 的时候我们尽可能地把 WebGL 和 Canvas 之间的差异屏蔽了到最小,从而让 GL 的使用可以更加方便自然。</p>\n<h2 id=\"-\">在笛卡尔坐标系上显示其它类型的三维图表</h2>\n<p>除了散点图,我们也可以通过 GL 在三维的笛卡尔坐标系上绘制其它类型的三维图表。比如刚才例子中将 <code class=\"codespan\">scatter3D</code> 类型改成 <code class=\"codespan\">bar3D</code> 就可以变成一个三维的柱状图。</p>\n<p><img width=\"\" height=\"auto\" src=\"documents/asset/img/gl/bar3D.png\"></p>\n<p>还有机器学习中会用到的三维曲面图 <a href=\"option-gl.html#series-surface\" target=\"_blank\">surface</a>,三维曲面图常用来表达平面上的数据走势,刚才的正态分布数据我们也可以像下面这样画成曲面图。</p>\n<pre><code class=\"lang-js\">var data = [];\n// 曲面图要求给入的数据是网格形式按顺序分布。\nfor (var y = -50; y &lt;= 50; y++) {\n    for (var x = -50; x &lt;= 50; x++) {\n        var z = gaussian(x, y);\n        data.push([x, y, z]);\n    }\n}\noption = {\n    grid3D: {},\n    xAxis3D: {},\n    yAxis3D: {},\n    zAxis3D: { max: 60 },\n    series: [{\n        type: &#39;surface&#39;,\n        data: data\n    }]\n}\n</code></pre>\n<p><img width=\"\" height=\"auto\" src=\"documents/asset/img/gl/surface.png\"></p>\n<h2 id=\"-\">老板想要立体的柱状图效果</h2>\n<p>最后,我们经常会被问到如何用 ECharts 画只有二维数据的立体柱状图效果。一般来说我们是不推荐这么做的,因为这种不必要的立体柱状图很容易造成错误的表达,具体可以见我们 <a href=\"https://vis.baidu.com/chartusage/bar/\" target=\"_blank\">柱状图使用指南</a> 中的解释。</p>\n<p>但是如果有一些其他因素导致必须得画成立体的柱状图的话,用 GL 也可以实现。<a href=\"https://gallery.echartsjs.com/explore.html?u=bd-3056387051\" target=\"_blank\">丶灬豆奶</a> 和 <a href=\"https://gallery.echartsjs.com/explore.html?u=bd-809368804\" target=\"_blank\">阿洛儿啊</a> 在 Gallery 已经写了类似的例子,大家可以参考。</p>\n<p><a href=\"https://gallery.echartsjs.com/explore.html?u=bd-3056387051\" target=\"_blank\">3D堆积柱状图</a></p>\n<p><a href=\"https://gallery.echartsjs.com/editor.html?c=xryQDPYK0b\" target=\"_blank\">3D柱状图</a></p>\n<p><img width=\"\" height=\"auto\" src=\"documents/asset/img/gl/bar3D-2d-data.png\"></p>\n"},"在微信小程序中使用 ECharts":{"type":["*"],"description":"<p>我们接到了很多微信小程序开发者的反馈,表示他们强烈需要像 Apache ECharts<sup>TM</sup> 这样的可视化工具。但是微信小程序是不支持 DOM 操作的,Canvas 接口也和浏览器不尽相同。</p>\n<p>因此,我们和微信小程序官方团队合作,提供了 ECharts 的微信小程序版本。开发者可以通过熟悉的 ECharts 配置方式,快速开发图表,满足各种可视化需求。</p>\n<h2 id=\"-\">体验示例小程序</h2>\n<p>在微信中扫描下面的二维码即可体验 ECharts Demo:</p>\n<p><img width=\"auto\" height=\"auto\" src=\"https://cdn.jsdelivr.net/gh/ecomfe/echarts-for-weixin/img/weixin-app.jpg\"></p>\n<h2 id=\"-\">下载</h2>\n<p>为了兼容小程序 Canvas,我们提供了一个小程序的组件,用这种方式可以方便地使用 ECharts。</p>\n<p>首先,下载 GitHub 上的 <a href=\"https://github.com/ecomfe/echarts-for-weixin\" target=\"_blank\">ecomfe/echarts-for-weixin</a> 项目。</p>\n<p>其中,<code class=\"codespan\">ec-canvas</code> 是我们提供的组件,其他文件是如何使用该组件的示例。</p>\n<p><code class=\"codespan\">ec-canvas</code> 目录下有一个 <code class=\"codespan\">echarts.js</code>,默认我们会在每次 <code class=\"codespan\">echarts-for-weixin</code> 项目发版的时候替换成最新版的 ECharts。如有必要,可以自行从 ECharts 项目中下载<a href=\"https://github.com/apache/echarts/releases\" target=\"_blank\">最新发布版</a>,或者从<a href=\"https://echarts.apache.org/builder.html\" target=\"_blank\">官网自定义构建</a>以减小文件大小。</p>\n<h2 id=\"-\">引入组件</h2>\n<p>微信小程序的项目创建可以参见<a href=\"https://developers.weixin.qq.com/miniprogram/dev/framework/quickstart/\" target=\"_blank\">微信公众平台官方文档</a>。</p>\n<p>在创建项目之后,可以将下载的 <a href=\"https://github.com/ecomfe/echarts-for-weixin\" target=\"_blank\">ecomfe/echarts-for-weixin</a> 项目完全替换新建的项目,然后将修改代码;或者仅拷贝 <code class=\"codespan\">ec-canvas</code> 目录到新建的项目下,然后做相应的调整。</p>\n<p>如果采用完全替换的方式,需要将 <code class=\"codespan\">project.config.json</code> 中的 <code class=\"codespan\">appid</code> 替换成在公众平台申请的项目 id。<code class=\"codespan\">pages</code> 目录下的每个文件夹是一个页面,可以根据情况删除不需要的页面,并且在 <code class=\"codespan\">app.json</code> 中删除对应页面。</p>\n<p>如果仅拷贝 <code class=\"codespan\">ec-canvas</code> 目录,则可以参考 <code class=\"codespan\">pages/bar</code> 目录下的几个文件的写法。下面,我们具体地说明。</p>\n<h2 id=\"-\">创建图表</h2>\n<p>首先,在 <code class=\"codespan\">pages/bar</code> 目录下新建以下几个文件:<code class=\"codespan\">index.js</code>、 <code class=\"codespan\">index.json</code>、 <code class=\"codespan\">index.wxml</code>、 <code class=\"codespan\">index.wxss</code>。并且在 <code class=\"codespan\">app.json</code> 的 <code class=\"codespan\">pages</code> 中增加 <code class=\"codespan\">&#39;pages/bar/index&#39;</code>。</p>\n<p><code class=\"codespan\">index.json</code> 配置如下:</p>\n<pre><code class=\"lang-json\">{\n  &quot;usingComponents&quot;: {\n    &quot;ec-canvas&quot;: &quot;../../ec-canvas/ec-canvas&quot;\n  }\n}\n</code></pre>\n<p>这一配置的作用是,允许我们在 <code class=\"codespan\">pages/bar/index.wxml</code> 中使用 <code class=\"codespan\">&lt;ec-canvas&gt;</code> 组件。注意路径的相对位置要写对,如果目录结构和本例相同,就应该像上面这样配置。</p>\n<p><code class=\"codespan\">index.wxml</code> 中,我们创建了一个 <code class=\"codespan\">&lt;ec-canvas&gt;</code> 组件,内容如下:</p>\n<pre><code class=\"lang-xml\">&lt;view class=&quot;container&quot;&gt;\n  &lt;ec-canvas id=&quot;mychart-dom-bar&quot; canvas-id=&quot;mychart-bar&quot; ec=&quot;{{ ec }}&quot;&gt;&lt;/ec-canvas&gt;\n&lt;/view&gt;\n</code></pre>\n<p>其中 <code class=\"codespan\">ec</code> 是一个我们在 <code class=\"codespan\">index.js</code> 中定义的对象,它使得图表能够在页面加载后被初始化并设置。<code class=\"codespan\">index.js</code> 的结构如下:</p>\n<pre><code class=\"lang-js\">function initChart(canvas, width, height) {\n  const chart = echarts.init(canvas, null, {\n    width: width,\n    height: height\n  });\n  canvas.setChart(chart);\n\n  var option = {\n    ...\n  };\n  chart.setOption(option);\n  return chart;\n}\n\nPage({\n  data: {\n    ec: {\n      onInit: initChart\n    }\n  }\n});\n</code></pre>\n<p>这对于所有 ECharts 图表都是通用的,用户只需要修改上面 <code class=\"codespan\">option</code> 的内容,即可改变图表。<code class=\"codespan\">option</code> 的使用方法参见 <a href=\"option.html\" target=\"_blank\">ECharts 配置项文档</a>。对于不熟悉 ECharts 的用户,可以参见 <a href=\"tutorial.html#5%20%E5%88%86%E9%92%9F%E4%B8%8A%E6%89%8B%20ECharts\" target=\"_blank\">5 分钟上手 ECharts</a> 教程。</p>\n<p>完整的例子请参见 <a href=\"https://github.com/ecomfe/echarts-for-weixin\" target=\"_blank\">ecomfe/echarts-for-weixin</a> 项目。</p>\n<h2 id=\"-\">暂不支持的功能</h2>\n<p>ECharts 中的绝大部分功能都支持小程序版本,因此这里仅说明不支持的功能,以及存在的问题。</p>\n<p>以下功能尚不支持,如果有相关需求请在 <a href=\"https://github.com/ecomfe/echarts-for-weixin/issues\" target=\"_blank\">issue</a> 中向我们反馈,对于反馈人数多的需求将优先支持:</p>\n<ul>\n<li>Tooltip</li>\n<li>图片</li>\n<li>多个 zlevel 分层</li>\n</ul>\n<p>此外,目前还有一些 bug 尚未修复,部分需要小程序团队配合上线支持,但不影响基本的使用。已知的 bug 包括:</p>\n<ul>\n<li>安卓平台:transform 的问题(会影响关系图边两端的标记位置、旭日图文字位置等)</li>\n<li>iOS 平台:半透明略有变深的问题</li>\n<li>iOS 平台:渐变色出现在定义区域之外的地方</li>\n</ul>\n<p>如有其它问题,也欢迎在 <a href=\"https://github.com/ecomfe/echarts-for-weixin/issues\" target=\"_blank\">issue</a> 中向我们反馈,谢谢!</p>\n"}}}}
\ No newline at end of file
+{"$schema":"https://echarts.apache.org/doc/json-schem","option":{"type":"Object","properties":{"5 分钟上手 ECharts":{"type":["*"],"description":"<h2 id=\"-echarts\">获取 ECharts</h2>\n<p>你可以通过以下几种方式获取 Apache ECharts<sup>TM</sup>。</p>\n<ul>\n<li><p>从 <a href=\"https://echarts.apache.org/zh/download.html\" target=\"_blank\">Apache ECharts 官网下载界面</a> 获取官方源码包后构建。</p>\n</li>\n<li><p>在 ECharts 的 <a href=\"https://github.com/apache/echarts/releases\" target=\"_blank\">GitHub</a> 获取。</p>\n</li>\n<li><p>通过 npm 获取 echarts,<code class=\"codespan\">npm install echarts --save</code>,详见“<a href=\"tutorial.html#%E5%9C%A8%20webpack%20%E4%B8%AD%E4%BD%BF%E7%94%A8%20ECharts\" target=\"_blank\">在 webpack 中使用 echarts</a>”</p>\n</li>\n<li><p>通过 <a href=\"https://www.jsdelivr.com/package/npm/echarts\" target=\"_blank\">jsDelivr</a> 等 CDN 引入</p>\n</li>\n</ul>\n<h2 id=\"-echarts\">引入 ECharts</h2>\n<p>通过标签方式直接引入构建好的 echarts 文件</p>\n<pre><code class=\"lang-html\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n    &lt;meta charset=&quot;utf-8&quot;&gt;\n    &lt;!-- 引入 ECharts 文件 --&gt;\n    &lt;script src=&quot;echarts.min.js&quot;&gt;&lt;/script&gt;\n&lt;/head&gt;\n&lt;/html&gt;\n</code></pre>\n<h2 id=\"-\">绘制一个简单的图表</h2>\n<p>在绘图前我们需要为 ECharts 准备一个具备高宽的 DOM 容器。</p>\n<pre><code>&lt;body&gt;\n    &lt;!-- 为 ECharts 准备一个具备大小(宽高)的 DOM --&gt;\n    &lt;div id=&quot;main&quot; style=&quot;width: 600px;height:400px;&quot;&gt;&lt;/div&gt;\n&lt;/body&gt;\n</code></pre><p>然后就可以通过 <a href=\"api.html#echarts.init\" target=\"_blank\">echarts.init</a> 方法初始化一个 echarts 实例并通过 <a href=\"api.html#echartsInstance.setOption\" target=\"_blank\">setOption</a> 方法生成一个简单的柱状图,下面是完整代码。</p>\n<pre><code class=\"lang-html\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n    &lt;meta charset=&quot;utf-8&quot;&gt;\n    &lt;title&gt;ECharts&lt;/title&gt;\n    &lt;!-- 引入 echarts.js --&gt;\n    &lt;script src=&quot;echarts.min.js&quot;&gt;&lt;/script&gt;\n&lt;/head&gt;\n&lt;body&gt;\n    &lt;!-- 为ECharts准备一个具备大小(宽高)的Dom --&gt;\n    &lt;div id=&quot;main&quot; style=&quot;width: 600px;height:400px;&quot;&gt;&lt;/div&gt;\n    &lt;script type=&quot;text/javascript&quot;&gt;\n        // 基于准备好的dom,初始化echarts实例\n        var myChart = echarts.init(document.getElementById(&#39;main&#39;));\n\n        // 指定图表的配置项和数据\n        var option = {\n            title: {\n                text: &#39;ECharts 入门示例&#39;\n            },\n            tooltip: {},\n            legend: {\n                data:[&#39;销量&#39;]\n            },\n            xAxis: {\n                data: [&quot;衬衫&quot;,&quot;羊毛衫&quot;,&quot;雪纺衫&quot;,&quot;裤子&quot;,&quot;高跟鞋&quot;,&quot;袜子&quot;]\n            },\n            yAxis: {},\n            series: [{\n                name: &#39;销量&#39;,\n                type: &#39;bar&#39;,\n                data: [5, 20, 36, 10, 10, 20]\n            }]\n        };\n\n        // 使用刚指定的配置项和数据显示图表。\n        myChart.setOption(option);\n    &lt;/script&gt;\n&lt;/body&gt;\n&lt;/html&gt;\n</code></pre>\n<p>这样你的第一个图表就诞生了!</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/getting-started&reset=1&edit=1\" width=\"600\" height=\"300\" ></iframe>\n\n\n<p>你也可以直接进入 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=doc-example/getting-started\" target=\"_blank\">ECharts Gallery</a> 中查看编辑示例</p>\n"},"ECharts 5 新特性":{"type":["*"],"description":"<p>数据可视化在过去的几年中得到了长足的发展。开发者对于可视化产品的期待不再是简单的图表创建工具,而在交互、性能、数据处理等方面有了更高级的需求。</p>\n<p>Apache ECharts 始终致力于让开发者以更方便的方式创造灵活丰富的可视化作品。在最新推出的 Apache ECharts 5,我们着力加强了图表的叙事能力,让开发者可以以更简单的方式,讲述数据背后的故事。</p>\n<p><img src=\"documents/asset/img/feature-v5/echarts-5.png\" width=\"800px\" /></p>\n<p>“表·达”是 Apache ECharts 5 的核心,通过五大模块、十五项特性的全面升级,围绕可视化作品的叙事表达能力,让图“表”更能传“达”数据背后的故事,帮助开发者更轻松地创造满足各种场景需求的可视化作品。</p>\n<h2 id=\"-\">动态叙事</h2>\n<p>动画对于人类认知的重要性不言而喻。在之前的作品中,我们会通过初始化动画和过渡动画帮助用户理解数据变换之间的联系,让图表的出现和变换显得不那么生硬。这次,我们更是大幅度增强了我们的动画叙事能力,。希望能够进一步发挥动画对于用户认知的帮助作用,借助图表的动态叙事功能,帮助用户更容易理解图表背后表达的故事。</p>\n<h4 id=\"-\">动态排序图</h4>\n<p>Apache ECharts 5 新增支持动态排序柱状图(bar-racing)以及动态排序折线图(line-racing),帮助开发者方便地创建带有时序性的图表,展现数据随着时间维度上的变化,讲述数据的演变过程。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=bar-race-country&edit=1&reset=1\" width=\"700\" height=\"400\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=line-race&edit=1&reset=1\" width=\"700\" height=\"400\" ></iframe>\n\n\n<p>动态排序图展现了不同的类目随着时间在排名上的衍变。而开发者只需要通过几行简单的配置项就可以在 ECharts 中开启这样的效果。</p>\n<h4 id=\"-\">自定义系列动画</h4>\n<p>除了动态排序图,Apache ECharts 5 在自定义系列中提供了更加丰富强大的动画效果,支持标签数值文本的插值动画,图形的形变(morph)、分裂(separate)、合并(combine)等效果的过渡动画。</p>\n<p>想象一下,用这些动态效果,你可以创造出多么令人称奇的可视化作品!</p>\n<h2 id=\"-\">视觉设计</h2>\n<p>视觉设计的作用并不仅仅是为了让图表更好看,更重要的是,符合可视化原理的设计可以帮用户更快速地理解图表想表达的内容,并且尽可能消除不良设计带来的误解。</p>\n<h4 id=\"-\">默认设计</h4>\n<p>我们发现,有很大一部分开发者使用了 ECharts 默认的主题样式,因而设计优雅、符合可视化原理的默认主题设计是非常重要的。在 Apache ECharts 5 中,我们重新设计了默认的主题样式,针对不同的系列和组件分别做了优化调整。以主题色为例,我们考量了颜色之间的区分度、与背景色的对比度、相邻颜色的和谐度等因素,并且确保色觉辨识障碍人士也能清楚地区分数据。</p>\n<p><img src=\"documents/asset/img/feature-v5/theme-color.png\" width=\"400px\" /></p>\n<p>我们以最常用的柱状图为例,来看看新版本浅色主题和深色主题的样式:</p>\n<p><img src=\"documents/asset/img/feature-v5/new-theme-light.png\" width=\"500px\" />\n<img src=\"documents/asset/img/feature-v5/new-theme-dark.png\" width=\"500px\" /></p>\n<p>对于数据区域缩放,时间轴等交互组件,我们也设计了全新的样式并且提供了更好的交互体验:</p>\n<p><img src=\"documents/asset/img/feature-v5/dataZoom.png\" width=\"500px\" /></p>\n<p><img src=\"documents/asset/img/feature-v5/timeline.png\" width=\"500px\" /></p>\n<h4 id=\"-\">标签</h4>\n<p>标签是图表中的核心元素之一,清晰而明确的标签可以帮助用户对数据有更准确的理解。Apache ECharts 5 提供了多种新的标签功能,让密集的标签能清晰显示、准确表意。</p>\n<p>Apache ECharts 5 可以通过一个配置项开启自动隐藏重叠的标签。对于超出显示区域的标签,可以选择自动截断或者换行。密集的饼图标签,现在有了更美观的自动排布。</p>\n<p>这些功能可以帮助避免文字过于密集影响可读性。并且,无需开发者编写额外的代码就能默认生效,大大简化了开发者的开发成本。</p>\n<p>我们也提供了多个配置项来让开发者主动控制标签的布局策略,例如标签拖动、整体显示在画布边缘,用引导线和图形元素连接,并且仍可联动高亮表达关联关系。</p>\n<p>新的标签功能可以让你在移动端这样局限的空间内也可以有很优雅的标签展示:</p>\n<p><img src=\"documents/asset/img/feature-v5/pie-label.png\" height=\"150px\" />\n<img src=\"documents/asset/img/feature-v5/pie-label-2.png\" height=\"150px\" /></p>\n<h4 id=\"-\">时间轴</h4>\n<p>Apache ECharts 5 带来了适于表达时间标签刻度的时间轴。时间轴的默认设计更突出重要的信息,并且提供了更灵活的定制化能力,让开发者根据不同的需求定制时间轴的标签内容。</p>\n<p>首先,时间轴不再如之前般绝对平均分割,而是选取年、月、日、整点这类更有意义的点来展示,并且能同时显示不同层级的刻度。标签的 <code class=\"codespan\">formatter</code> 支持了时间模版(例如 <code class=\"codespan\">{yyyy}-{MM}-{dd}</code>),并且可以为不同时间粒度的标签指定不同的 <code class=\"codespan\">formatter</code>,结合已有的富文本标签,可以定制出醒目而多样的时间效果。</p>\n<p>不同的 dataZoom 粒度下时间刻度的显示:</p>\n<p><img src=\"documents/asset/img/feature-v5/time-axis.png\" width=\"600px\" /></p>\n<p><img src=\"documents/asset/img/feature-v5/time-axis-2.png\" width=\"600px\" /></p>\n<h4 id=\"-\">提示框</h4>\n<p>提示框(Tooltip)是一种最常用的可视化组件,可以帮助用户交互式地了解数据的详细信息。在 Apache ECharts 5 中,我们对提示框的样式进行了优化,通过对字体样式,颜色的调整,指向图形的箭头,跟随图形颜色的边框色等功能,让提示框的默认展示优雅又清晰。并且改进了富文本的渲染逻辑,确保显示效果与 HTML 方式一致,让用户在不同场景下可以选择不同的技术方案实现同样的效果。</p>\n<p><img src=\"documents/asset/img/feature-v5/new-tooltip.png\" height=\"200px\" />\n<img src=\"documents/asset/img/feature-v5/new-tooltip-2.png\" height=\"200px\" /></p>\n<p>除此之外,我们这次也加上了提示框内的列表按照数值大小或者类目顺序排序的功能。</p>\n<h4 id=\"-\">仪表盘</h4>\n<p>我们看到社区用户创建了很多酷炫的仪表盘图表,但是他们的配置方式往往比较复杂而取巧。因此,我们对仪表盘的功能作了全面升级,支持了图片或者矢量路径绘制指针、也支持了锚点(anchor)配置项、进度条(progress)、圆角效果等等配置项。</p>\n<p>不同样式的仪表盘指针:</p>\n<p><img src=\"documents/asset/img/feature-v5/gauge-pointer.png\" width=\"600px\" /></p>\n<p>这些升级,不仅可以让开发者用更简单的配置项实现酷炫的效果,而且带来了更丰富的定制能力。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=gauge-clock&edit=1&reset=1\" width=\"600\" height=\"600\" ></iframe>\n\n\n<h4 id=\"-\">扇形圆角</h4>\n<p>圆角可以带来更美观而柔和的视觉,也能够赋予更多的创造力。Apache ECharts 5 支持了饼图、旭日图、矩形树图的扇形圆角。可不要小看了简单的圆角配置项,合理地搭配其他的效果,就可以形成更具个性的的可视化作品。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=sunburst-borderRadius&edit=1&reset=1\" width=\"400\" height=\"400\" ></iframe>\n\n\n\n\n<h2 id=\"-\">交互能力</h2>\n<p>可视化作品的交互能力帮助用户探索了解作品,加深对于图表主旨的理解。</p>\n<h4 id=\"-\">状态管理</h4>\n<p>在 ECharts 4 中有高亮(emphasis)和普通(normal)两个交互的状态,在鼠标移到图形上的时候会进入高亮状态以区分该数据,开发者可以分别设置这两个状态的颜色,阴影等样式。</p>\n<p>这次在 Apache ECharts 5 中,我们在原先的鼠标 hover 高亮的基础上,新增加了<strong>淡出</strong>其它非相关元素的效果,从而可以达到聚焦目标数据的目的。</p>\n<p>比如在这个<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=bar-y-category-stack\" target=\"_blank\">柱状图</a>的例子中,鼠标移到一个系列上的时候,其它非相关的系列就会淡出,从而可以更清晰的突出聚焦系列中数据的对比。在关系图,树图,旭日图,桑基等更复杂数据结构的图上,也可以通过淡出非相关元素来观察数据之间的联系。而且颜色,阴影等在高亮(emphasis)中可以设置的样式,现在也可以在淡出(blur)状态中设置了。</p>\n<p>除此之外,我们为所有系列还添加了<strong>点击选中</strong>这个之前只有在饼图、地图等少数系列中才能开启的交互,开发者可以设置为单选或多选模式,并且通过监听 <code class=\"codespan\">selectchanged</code> 事件获取到选中的所有图形然后进行更进一步的处理。与高亮和淡出一样,选中的样式也可以在 <code class=\"codespan\">select</code> 中配置。</p>\n<h4 id=\"-\">性能提升</h4>\n<h5 id=\"-\">脏矩形渲染</h5>\n<p>Apache ECharts 5 新支持了脏矩形渲染,解决只有局部变化的场景下的性能瓶颈。在使用 Canvas 渲染器时,脏矩形渲染技术探测并只更新视图变化的部分,而不是任何变动都引起画布完全重绘。这能在一些特殊场景下帮助提高渲染帧率,例如在图形很多时候,鼠标频繁触发一些图形高亮的场景。以往这类场景,会使用额外的 Canvas 层以优化性能,但是这种方式不是所有场景都通用,而且对于复杂的样式的效果并不理想。脏矩形渲染很好地同时满足了性能和显示正确。</p>\n<p>脏矩形的可视化演示,红色框选部分为该帧重绘区域:</p>\n<p><img src=\"documents/asset/img/feature-v5/dirty-rect.gif\" width=\"500px\" /></p>\n<p>大家在新的示例页面选择开启脏矩形优化就可以看到该效果。</p>\n<h5 id=\"-\">实时时序数据的折线图性能优化</h5>\n<p>除此之外,海量数据下折线图的性能也有了大幅度的性能提升。我们经常碰到大量的实时时序数据的高性能绘制的需求,这些数据可能需要几百或者几十毫秒更新一次。</p>\n<p>Apache ECharts 5 对这些场景下的 CPU 消耗、内存占用、初始化时间都进行了深度的优化,使得百万量级的数据也能做到实时的更新(每次更新耗时少于 30ms),甚至对于千万级的数据,也可以在 1s 内渲染完,并且保持很小的内存占用以及流畅的提示框(tooltip)等交互。</p>\n<h2 id=\"-\">开发体验</h2>\n<p>我们希望如此强大的可视化工具可以被更多开发者以更简单的方式使用,因而开发者的开发体验也是我们非常关注的方面。</p>\n<h4 id=\"-\">数据集</h4>\n<p>ECharts 5 加强了数据集的数据转换能力,让开发者可以使用简单的方式实现常用的数据处理,如:数据过滤(filter)、排序(sort)、聚合(aggregate)、直方图(histogram)、简单聚类(clustering)、回归线计算(regression)等。开发者可以用统一的声明式方式来使用这些功能,可以方便地实现常用的数据操作。</p>\n<h4 id=\"-\">国际化</h4>\n<p>ECharts 原有的国际化方案,采用的是根据不同的语言参数打包出不同的部署文件的形式。​这种方式,使动态的语言和静态的代码包绑定在一起,使用的时候只能通过重新加载不同语言版本的 ECharts 代码来达到切换语言的目的。</p>\n<p>因此,从 Apache ECharts 5 开始,动态的语言包和静态的代码包分离开。切换语言的时候,只需要加载相应语言包​,通过类似挂载主题的方式,使用 <code class=\"codespan\">registerLocale</code> 函数挂载语言包对象​,重新初始化后就完成了语言的切换​。</p>\n<pre><code class=\"lang-js\">// import the lang object and set when init​\necharts.registerLocale(&#39;DE&#39;, lang);​\necharts.init(DomElement, null, {​\n   locale: &#39;DE&#39;​\n});\n</code></pre>\n<h4 id=\"typescript-\">TypeScript 重构</h4>\n<p>在近 8 年的时间里,Apache ECharts 已经发展成一个非常复杂的可视化库了,为了续可以更安全高效的进行重构和新功能的开发,我们在 Apache ECharts 5 的开发之初,使用 TypeScript 对代码进行了重写,TypeScript 所带来的强类型让我们更有信心地在 ECharts 5 开发的时候对代码进行大刀阔斧的重构以实现更多令人激动人心的特性。</p>\n<p>对于开发者,我们也可以从 TypeScript 代码直接生成更好更符合代码的<code class=\"codespan\">DTS</code>类型描述文件。在此之前,ECharts 的类型描述文件一直是由社区开发者帮我们维护并发布到<a href=\"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/echarts\" target=\"_blank\">DefinityTyped</a>,这个有着不小的工作量,非常感谢大家的贡献。</p>\n<p>除此之外,如果开发者的组件是按需引入的,我们还提供了一个 <code class=\"codespan\">ComposeOption</code> 类型方法,可以组合出一个只包含了引入组件的配置项类型,可以带来更严格的类型检查,帮助你提前检测到未引入的组件类型。</p>\n<h2 id=\"-\">可访问性</h2>\n<p>Apache ECharts 一直非常重视无障碍设计,我们希望让视觉障碍人士也能平等了解图表传递的信息。并且也希望图表的开发者能以极低的开发成本实现这一点,因而有利于让开发者更愿意为视觉障碍人士提供支持。</p>\n<p>在上一个大版本中,我们支持了根据不同的图表类型和数据自动一键智能生成图表描述的功能,帮助开发者非常方便地支持图表的 DOM 描述信息。在 ECharts 5 中,我们也做了更多提高可访问性的设计,帮助视觉障碍人士更好地理解图表内容。</p>\n<h4 id=\"-\">主题配色</h4>\n<p>我们在设计新版默认主题样式的时候,将无障碍设计作为一个重要的考量依据,对颜色的明度和色值都进行反复测试,帮助视觉辨识障碍用户清楚地识别图表数据。​</p>\n<p>并且,针对有更进一步无障碍需求的开发者,我们还提供了特殊的高对比度主题,以更高对比度颜色的主题将数据作进一步区分。</p>\n<h4 id=\"-\">贴花图案</h4>\n<p>ECharts 5 还新增提供了贴花的功能,用图案辅助颜色表达,进一步帮助用户区分数据。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/aria-decal-simple&edit=1&reset=1\" width=\"600\" height=\"350\" ></iframe>\n\n\n<p>此外,贴花图案还能在一些其他的场景下提供帮助,比如:在报纸、书籍之类只有单色或者非常少的颜色的印刷品中,帮助更好地区分数据;用图形元素方便用户对数据产生更直观的理解等。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/aria-decal-newspaper&edit=1&reset=1\" width=\"600\" height=\"350\" ></iframe>\n\n\n\n\n<h2 id=\"-\">小结</h2>\n<p>除了以上介绍的功能,Apache ECharts 还在非常多的细节中做了改进,帮助开发者更轻松地创建默认好用、配置灵活的图表,用图表讲述数据背后的故事。</p>\n<p>感谢所有使用过 ECharts,甚至参与过社区贡献的开发者,正是你们才使得 Apache ECharts 5 成为可能。我们会以更大的热情投入到未来的开发中,Apache ECharts 也会以更大的诚意和大家在 6 相见!</p>\n"},"ECharts 5 升级指南":{"type":["*"],"description":"<p>本指南面向那些希望将 echarts 4.x(以下简称 <code class=\"codespan\">v4</code>)升级到 echarts 5.x(以下简称 <code class=\"codespan\">v5</code>)的用户。大家可以在 <a href=\"tutorial.html#ECharts%205%20新特性\" target=\"_blank\">ECharts 5 新特性</a> 中了解这次<code class=\"codespan\">v5</code>带来了哪些值得升级的新特性。在绝大多数情况下,开发者用不着为这个升级做什么额外的事,因为 echarts 一直尽可能地保持 API 的稳定和向后兼容。但是,<code class=\"codespan\">v5</code> 仍然带来了一些非兼容改动,需要特别关注。此外,在一些情况下,<code class=\"codespan\">v5</code> 提供了更好的 API 用来取代之前的 API,这些被取代的 API 将不再被推荐使用(当然,我们尽量兼容了这些改动)。我们会在这篇文档里尽量详尽得解释这些改动。</p>\n<p>因为我们在 <code class=\"codespan\">v5.0.1</code> 增加了新的<a href=\"tutorial.html#%E5%9C%A8%E6%89%93%E5%8C%85%E7%8E%AF%E5%A2%83%E4%B8%AD%E4%BD%BF%E7%94%A8%20ECharts\" target=\"_blank\">按需引入接口</a>,所以本文档基于 <code class=\"codespan\">v5.0.1</code> 或者更高的版本。</p>\n<h2 id=\"-\">非兼容性改变</h2>\n<h4 id=\"-theme-\">默认主题(theme)</h4>\n<p>首先是默认主题的改动,<code class=\"codespan\">v5</code> 在配色等主题设计上做了很多的优化来达到更好的视觉效果。如果大家依旧想保留旧版本的颜色,可以手动声明颜色,如下:</p>\n<pre><code class=\"lang-js\">chart.setOption({\n    color: [\n        &#39;#c23531&#39;, &#39;#2f4554&#39;, &#39;#61a0a8&#39;, &#39;#d48265&#39;, &#39;#91c7ae&#39;, &#39;#749f83&#39;,\n        &#39;#ca8622&#39;, &#39;#bda29a&#39;, &#39;#6e7074&#39;, &#39;#546570&#39;, &#39;#c4ccd3&#39;\n    ],\n    // ...\n});\n</code></pre>\n<p>或者,做一个简单的 <code class=\"codespan\">v4</code> 主题:</p>\n<pre><code class=\"lang-js\">var themeEC4 = {\n    color: [\n        &#39;#c23531&#39;, &#39;#2f4554&#39;, &#39;#61a0a8&#39;, &#39;#d48265&#39;, &#39;#91c7ae&#39;, &#39;#749f83&#39;,\n        &#39;#ca8622&#39;, &#39;#bda29a&#39;, &#39;#6e7074&#39;, &#39;#546570&#39;, &#39;#c4ccd3&#39;\n    ]\n};\nvar chart = echarts.init(dom, themeEC4);\nchart.setOption(/* ... */);\n</code></pre>\n<h4 id=\"-echarts\">引用 ECharts</h4>\n<h5 id=\"-default-exports-\">去除 default exports 的支持</h5>\n<p>如果使用者在 <code class=\"codespan\">v4</code> 中这样引用了 echarts:</p>\n<pre><code class=\"lang-js\">import echarts from &#39;echarts&#39;;\n// 或者按需引入\nimport echarts from &#39;echarts/lib/echarts&#39;;\n</code></pre>\n<p>这两种方式,<code class=\"codespan\">v5</code> 中不再支持了。</p>\n<p>使用者需要如下更改代码解决这个问题:</p>\n<pre><code class=\"lang-js\">import * as echarts from &#39;echarts&#39;;\n// 按需引入\nimport * as echarts from &#39;echarts/lib/echarts&#39;;\n</code></pre>\n<h5 id=\"-\">按需引入</h5>\n<p>在 5.0.1 中,我们引入了新的<a href=\"tutorial.html#%E5%9C%A8%E6%89%93%E5%8C%85%E7%8E%AF%E5%A2%83%E4%B8%AD%E4%BD%BF%E7%94%A8%20ECharts\" target=\"_blank\">按需引入接口</a></p>\n<pre><code class=\"lang-js\">import * as echarts from &#39;echarts/core&#39;;\nimport { BarChart } from &#39;echarts/charts&#39;;\nimport { GridComponent } from &#39;echarts/components&#39;;\n// 注意,新的接口中默认不再包含 Canvas 渲染器,需要显示引入,如果需要使用 SVG 渲染模式则使用 SVGRenderer\nimport { CanvasRenderer } from &#39;echarts/renderers&#39;;\n\necharts.use([BarChart, GridComponent, CanvasRenderer]);\n</code></pre>\n<p>如果之前是使用<code class=\"codespan\">import &#39;echarts/lib/chart/bar&#39;</code>引入,新的接口对应的是<code class=\"codespan\">import {BarChart} from &#39;echarts/charts&#39;</code>;</p>\n<p>为了方便大家了解自己的配置项需要引入哪些模块,我们新的示例编辑页面添加了生成按需引入代码的功能,大家可以在示例编辑页的<code class=\"codespan\">完整代码</code>标签下选中按需引入后查看需要引入的模块以及相关代码。</p>\n<p>在大部分情况下,我们都推荐大家尽可能用这套新的按需引入接口,它可以最大程度的利用打包工具 tree-shaking 的能力,并且可以有效解决命名空间冲突的问题而且防止了内部结构的暴露。如果你依旧在使用 CommonJS 的模块写法,之前的方式我们也依旧是支持的:</p>\n<pre><code class=\"lang-js\">const echarts = require(&#39;echarts/lib/echarts&#39;);\nrequire(&#39;echarts/lib/chart/bar&#39;);\nrequire(&#39;echarts/lib/component/grid&#39;);\n</code></pre>\n<p>其次,因为我们的源代码已使用 TypeScript 重写,<code class=\"codespan\">v5</code> 将不再支持从 <code class=\"codespan\">echarts/src</code> 引用文件,需要改为从<code class=\"codespan\">echarts/lib</code>引入。</p>\n<h5 id=\"-\">依赖调整</h5>\n<blockquote>\n<p>注意:该部分只针对为了保证较小的打包体积而是用按需引入接口的开发者,如果是全量引入的不需要关注</p>\n</blockquote>\n<p>为了保证 tree-shaking 后的体积足够小,我们去除了一些之前会默认被打包进来的依赖。比如前面提到的在使用新的按需引入接口的时候,<code class=\"codespan\">CanvasRenderer</code>将不再被默认引入,这样可以保证只需要使用 SVG 渲染模式的时候不会把不需要的 Canvas 渲染代码也一起打包进来,除此之外,还有下面这些依赖的改动:</p>\n<ul>\n<li>在使用折线图,柱状图中不再默认引入直角坐标系组件,因此之前使用下面的引入方式<pre><code class=\"lang-js\">const echarts = require(&#39;echarts/lib/echarts&#39;);\nrequire(&#39;echarts/lib/chart/bar&#39;);\nrequire(&#39;echarts/lib/chart/line&#39;);\n</code></pre>\n需要再单独引入<code class=\"codespan\">grid</code>组件<pre><code class=\"lang-js\">require(&#39;echarts/lib/component/grid&#39;);\n</code></pre>\n</li>\n</ul>\n<p>参考 issue:<a href=\"https://github.com/apache/echarts/issues/14080\" target=\"_blank\">#14080</a>, <a href=\"https://github.com/apache/echarts/issues/13764\" target=\"_blank\">#13764</a></p>\n<ul>\n<li>默认不再引入<code class=\"codespan\">aria</code>组件,如果需要的话可以手动引入。<pre><code class=\"lang-js\">import { AriaComponent } from &#39;echarts/components&#39;;\necharts.use(AriaComponent);\n</code></pre>\n或者:<pre><code class=\"lang-js\">require(&#39;echarts/lib/component/aria&#39;);\n</code></pre>\n</li>\n</ul>\n<h4 id=\"-geojson\">去除内置的 geoJSON</h4>\n<p><code class=\"codespan\">v5</code> 移除了内置的 geoJSON(原先在 <code class=\"codespan\">echarts/map</code> 文件夹下)。这些 geoJSON 文件本就一直来源于第三方。如果使用者仍然需要他们,可以去从老版本中得到,或者自己寻找更合适的数据然后通过 registerMap 接口注册到 ECharts 中。</p>\n<h4 id=\"-\">浏览器兼容性</h4>\n<p><code class=\"codespan\">v5</code> 不再支持 IE8 浏览器。我们不再继续维护和升级之前的 <a href=\"https://github.com/ecomfe/zrender/tree/4.3.2/src/vml\" target=\"_blank\">VML 渲染器</a> 来着实现 IE8 的兼容。如果使用者确实有很强的需求,那么欢迎提 pull request 来升级 VML 渲染器,或者单独维护一个第三方 VML 渲染器,我们从 <code class=\"codespan\">v5.0.1</code> 开始支持注册独立的渲染器了。</p>\n<h4 id=\"echarts-\">ECharts 配置项调整</h4>\n<h5 id=\"-\">视觉样式设置的优先级改变</h5>\n<p><code class=\"codespan\">v5</code> 对调了 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap 组件</a> 和 <a href=\"option.html#series-scatter.itemStyle\" target=\"_blank\">itemStyle</a> | <a href=\"option.html#series-scatter.lineStyle\" target=\"_blank\">lineStyle</a> | <a href=\"option.html#series-scatter.areaStyle\" target=\"_blank\">areaStyle</a> 的视觉样式优先级。</p>\n<p>具体来说,<code class=\"codespan\">v4</code> 中,<a href=\"option.html#visualMap\" target=\"_blank\">visualMap 组件</a> 中生成的视觉样式(如,颜色、图形类型、图形尺寸等)的优先级,比开发者在 <a href=\"option.html#series-scatter.itemStyle\" target=\"_blank\">itemStyle</a> | <a href=\"option.html#series-scatter.lineStyle\" target=\"_blank\">lineStyle</a> | <a href=\"option.html#series-scatter.areaStyle\" target=\"_blank\">areaStyle</a> 中设置的样式的优先级高,也就是说如果他们同时设置的话,前者会生效而后者不会生效。这带来了些麻烦:假如使用者在使用 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap 组件</a> 时,又想针对某个数据项对应的图形,设置 <a href=\"option.html#series-scatter.itemStyle\" target=\"_blank\">itemStyle</a> 样式,则做不到。<code class=\"codespan\">v5</code> 中于是提高了 <a href=\"option.html#series-scatter.itemStyle\" target=\"_blank\">itemStyle</a> | <a href=\"option.html#series-scatter.lineStyle\" target=\"_blank\">lineStyle</a> | <a href=\"option.html#series-scatter.areaStyle\" target=\"_blank\">areaStyle</a> 的优先级,使他们能生效。</p>\n<p>在绝大多处情况下,这个变化并不会带来什么影响。但是为保险起见,使用者在升级 <code class=\"codespan\">v4</code> 到 <code class=\"codespan\">v5</code> 时,还是可以检查下,是否有同时使用 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a> 和 <a href=\"option.html#series-scatter.itemStyle\" target=\"_blank\">itemStyle</a> | <a href=\"option.html#series-scatter.lineStyle\" target=\"_blank\">lineStyle</a> | <a href=\"option.html#series-scatter.areaStyle\" target=\"_blank\">areaStyle</a> 的情况。</p>\n<h5 id=\"-padding\">富文本的 <code class=\"codespan\">padding</code></h5>\n<p><code class=\"codespan\">v5</code> 调整了 <a href=\"option.html#series-scatter.label.rich.&lt;style_name&gt;.padding\" target=\"_blank\">rich.?.padding</a> 的格式使其更符合 CSS 的规范。<code class=\"codespan\">v4</code> 里,例如 <code class=\"codespan\">rich.?.padding: [11, 22, 33, 44]</code> 表示 <code class=\"codespan\">padding-top</code> 是 <code class=\"codespan\">33</code> 且 <code class=\"codespan\">padding-bottom</code> 是 <code class=\"codespan\">11</code>。在 <code class=\"codespan\">v5</code> 中调整了上下的位置,<code class=\"codespan\">rich.?.padding: [11, 22, 33, 44]</code> 表示  <code class=\"codespan\">padding-top</code> 是 <code class=\"codespan\">11</code> 且 <code class=\"codespan\">padding-bottom</code> 是 <code class=\"codespan\">33</code>。</p>\n<p>如果使用者有在使用 <a href=\"option.html#series-scatter.label.rich.&lt;style_name&gt;.padding\" target=\"_blank\">rich.?.padding</a>,需要注意调整下这个顺序。</p>\n<h2 id=\"echarts-\">ECharts 的相关扩展</h2>\n<p>如果想要升级到 <code class=\"codespan\">v5</code> ,下面这些扩展需要升级到最新的版本实现兼容。</p>\n<ul>\n<li><a href=\"https://github.com/ecomfe/echarts-gl\" target=\"_blank\">echarts-gl</a></li>\n<li><a href=\"https://github.com/ecomfe/echarts-wordcloud\" target=\"_blank\">echarts-wordcloud</a></li>\n<li><a href=\"https://github.com/ecomfe/echarts-liquidfill\" target=\"_blank\">echarts-liquidfill</a></li>\n</ul>\n<h2 id=\"-api\">不再推荐使用的 API</h2>\n<p>一些 API(包括接口调用,事件监听和配置项)在 <code class=\"codespan\">v5</code> 中不再推荐使用。当然,使用者仍然可以用他们,只是会在 dev 模式下,在 console 中打印一些 warning,并不会影响功能。但是从长远维护考虑,我们还是推荐升级成新的 API。</p>\n<p>下面是不再推荐使用的 API 以及推荐的新 API:</p>\n<ul>\n<li>图形元素 transform 相关的属性被改变了:<ul>\n<li>变更点:<ul>\n<li><code class=\"codespan\">position: [number, number]</code> 改为 <code class=\"codespan\">x: number</code> / <code class=\"codespan\">y: number</code>。</li>\n<li><code class=\"codespan\">scale: [number, number]</code> 改为 <code class=\"codespan\">scaleX: number</code> / <code class=\"codespan\">scaleY: number</code>。</li>\n<li><code class=\"codespan\">origin: [number, number]</code> 改为 <code class=\"codespan\">originX: number</code> / <code class=\"codespan\">originY: number</code>。</li>\n</ul>\n</li>\n<li><code class=\"codespan\">position</code>、<code class=\"codespan\">scale</code> 和 <code class=\"codespan\">origin</code> 仍然支持,但已不推荐使用。</li>\n<li>它影响到这些地方:<ul>\n<li>在<code class=\"codespan\">graphic</code>组件中:每个元素的声明。</li>\n<li>在 <code class=\"codespan\">custom series</code> 中:<code class=\"codespan\">renderItem</code> 返回的每个元素的声明。</li>\n<li>直接使用 zrender 图形元素时。</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Text 相关的属性被改变:<ul>\n<li>变更点:<ul>\n<li>图形元素附带的文本的声明方式被改变:<ul>\n<li>除了 <code class=\"codespan\">Text</code> 元素之外,其他元素中的属性 <code class=\"codespan\">style.text</code> 都不推荐使用了。取而代之的是新属性 <code class=\"codespan\">textContent</code> 和 <code class=\"codespan\">textConfig</code>,他们能带来更丰富的功能。</li>\n<li>其中,下面左边部分的这些属性已不推荐使用或废弃。请使用下面的右边部分的属性:<ul>\n<li>textPosition =&gt; textConfig.position</li>\n<li>textOffset =&gt; textConfig.offset</li>\n<li>textRotation =&gt; textConfig.rotation</li>\n<li>textDistance =&gt; textConfig.distance</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>下面左边部分的属性在 <code class=\"codespan\">style</code> 和 <code class=\"codespan\">style.rich.?</code> 中已不推荐使用或废弃。请使用下面右边的属性:<ul>\n<li>textFill =&gt; fill</li>\n<li>textStroke =&gt; stroke</li>\n<li>textFont =&gt; font</li>\n<li>textStrokeWidth =&gt; lineWidth</li>\n<li>textAlign =&gt; align</li>\n<li>textVerticalAlign =&gt; verticalAlign</li>\n<li>textLineHeight =&gt;</li>\n<li>textWidth =&gt; width</li>\n<li>textHeight =&gt; hight</li>\n<li>textBackgroundColor =&gt; backgroundColor</li>\n<li>textPadding =&gt; padding</li>\n<li>textBorderColor =&gt; borderColor</li>\n<li>textBorderWidth =&gt; borderWidth</li>\n<li>textBorderRadius =&gt; borderRadius</li>\n<li>textBoxShadowColor =&gt; shadowColor</li>\n<li>textBoxShadowBlur =&gt; shadowBlur</li>\n<li>textBoxShadowOffsetX =&gt; shadowOffsetX</li>\n<li>textBoxShadowOffsetY =&gt; shadowOffsetY</li>\n</ul>\n</li>\n<li>注:这些属性并没有变化:<ul>\n<li>textShadowColor</li>\n<li>textShadowBlur</li>\n<li>textShadowOffsetX</li>\n<li>textShadowOffsetY</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>它影响到这些地方:<ul>\n<li>在 <code class=\"codespan\">graphic</code> 组件中:每个元素的声明。(原来的写法仍兼容,但在一些很复杂的情况下,可能效果不完全一致。)</li>\n<li>在自定义系列(<code class=\"codespan\">custom series</code>)中:<code class=\"codespan\">renderItem</code> 返回中的每个元素的声明。(原来的写法仍兼容,但在一些很复杂的情况下,可能效果不完全一致。)</li>\n<li>直接使用 zrender API 创建图形元素。(不再兼容,原写法被废弃。)</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>图表实例上的 API:<ul>\n<li><code class=\"codespan\">chart.one(...)</code> 已不推荐使用。</li>\n</ul>\n</li>\n<li><code class=\"codespan\">label</code>。<ul>\n<li>属性 <code class=\"codespan\">color</code>、<code class=\"codespan\">textBorderColor</code>、<code class=\"codespan\">backgroundColor</code>、<code class=\"codespan\">borderColor</code> 中,值 <code class=\"codespan\">auto</code> 已不推荐使用,而推荐使用 <code class=\"codespan\">&#39;inherit&#39;</code> 代替。</li>\n</ul>\n</li>\n<li><code class=\"codespan\">hoverAnimation</code>:<ul>\n<li>选项 <code class=\"codespan\">series.hoverAnimation</code> 已不推荐使用,使用 <code class=\"codespan\">series.emphasis.scale</code> 代替之。</li>\n</ul>\n</li>\n<li>折线图(<code class=\"codespan\">line series</code>):<ul>\n<li>选项 <code class=\"codespan\">series.clipOverflow</code> 已不推荐使用,使用 <code class=\"codespan\">series.clip</code> 代替之。</li>\n</ul>\n</li>\n<li>自定义系列(<code class=\"codespan\">custom series</code>)。<ul>\n<li>在 <code class=\"codespan\">renderItem</code> 中,<code class=\"codespan\">api.style(...)</code> 和 <code class=\"codespan\">api.styleEmphasis(...)</code> 已不推荐使用。因为这两个接口其实并不真正必要,也很难保证向后兼容。用户可以通过 <code class=\"codespan\">api.visual(...)</code> 获取系统自动分配的视觉信息。</li>\n</ul>\n</li>\n<li>旭日图(<code class=\"codespan\">sunburst</code>):<ul>\n<li>动作类型 <code class=\"codespan\">highlight</code> 已被弃用,请使用 <code class=\"codespan\">sunburstHighlight</code> 代替。</li>\n<li>动作类型 <code class=\"codespan\">downplay</code> 已被弃用,请使用 <code class=\"codespan\">sunburstUnhighlight</code> 代替。</li>\n<li>选项 <code class=\"codespan\">series.downplay</code> 已被弃用,请使用 <code class=\"codespan\">series.blur</code> 代替。</li>\n<li>选项 <code class=\"codespan\">series.highlightPolicy</code> 已不适用,请使用 <code class=\"codespan\">series.emphasis.focus</code> 代替。</li>\n</ul>\n</li>\n<li>饼图(<code class=\"codespan\">pie</code>):<ul>\n<li>下面左边部分的 action 名已经不推荐使用。请使用右边的 action 名。<ul>\n<li><code class=\"codespan\">pieToggleSelect</code> =&gt; <code class=\"codespan\">toggleSelect</code>。</li>\n<li><code class=\"codespan\">pieSelect</code> =&gt; <code class=\"codespan\">select</code>。</li>\n<li><code class=\"codespan\">pieUnSelect</code> =&gt; <code class=\"codespan\">unselect</code>。</li>\n</ul>\n</li>\n<li>下面左边部分的事件名已经不推荐使用。请使用右边的事件名。<ul>\n<li><code class=\"codespan\">pieselectchanged</code> =&gt; <code class=\"codespan\">selectchanged</code>。</li>\n<li><code class=\"codespan\">pieselected</code> =&gt; <code class=\"codespan\">selected</code>。</li>\n<li><code class=\"codespan\">pieunselected</code> =&gt; <code class=\"codespan\">unselected</code>。</li>\n</ul>\n</li>\n<li>选项 <code class=\"codespan\">series.label.margin</code> 已经不推荐使用。使用 <code class=\"codespan\">series.label.edgeDistance</code> 代替。</li>\n<li>选项 <code class=\"codespan\">series.clockWise</code> 已经不推荐使用。使用 <code class=\"codespan\">series.clockwise</code> 代替。</li>\n<li>选项 <code class=\"codespan\">series.hoverOffset</code> 已经不推荐使用。使用 <code class=\"codespan\">series.emphasis.scaleSize</code> 代替。</li>\n</ul>\n</li>\n<li>地图(<code class=\"codespan\">map series</code>):<ul>\n<li>下文左边部分的 action 名已经不推荐使用。请使用右边的 action 名。<ul>\n<li><code class=\"codespan\">mapToggleSelect</code> =&gt; <code class=\"codespan\">toggleSelect</code>。</li>\n<li><code class=\"codespan\">mapSelect</code> =&gt; <code class=\"codespan\">select</code>。</li>\n<li><code class=\"codespan\">mapUnSelect</code> =&gt; <code class=\"codespan\">unselect</code>。</li>\n</ul>\n</li>\n<li>下面左边部分的事件名已经不推荐使用。请使用右边的事件名。<ul>\n<li><code class=\"codespan\">mapselectchanged</code> =&gt; <code class=\"codespan\">selectchanged</code>。</li>\n<li><code class=\"codespan\">mapselected</code> =&gt; <code class=\"codespan\">selected</code>。</li>\n<li><code class=\"codespan\">mapunselected</code> =&gt; <code class=\"codespan\">unselected</code>。</li>\n</ul>\n</li>\n<li>选项 <code class=\"codespan\">series.mapType</code> 已经不推荐使用。使用 <code class=\"codespan\">series.map</code> 代替。</li>\n<li>选项 <code class=\"codespan\">series.mapLocation</code> 已经不推荐使用。</li>\n</ul>\n</li>\n<li>关系图(<code class=\"codespan\">graph series</code>):<ul>\n<li>选项 <code class=\"codespan\">series.focusNodeAdjacency</code> 已经不推荐使用。使用 <code class=\"codespan\">series.emphasis: { focus: &#39;adjacency&#39;}</code> 代替。</li>\n</ul>\n</li>\n<li>仪表盘(<code class=\"codespan\">gauge series</code>):<ul>\n<li>选项 <code class=\"codespan\">series.clockWise</code> 已经不推荐使用。使用 <code class=\"codespan\">series.clockwise</code> 代替。</li>\n<li>选项 <code class=\"codespan\">series.hoverOffset</code> 已经不推荐使用。使用 <code class=\"codespan\">series.emphasis.scaleSize</code> 代替。</li>\n</ul>\n</li>\n<li><code class=\"codespan\">dataZoom</code> 组件:<ul>\n<li>选项 <code class=\"codespan\">dataZoom.handleIcon</code> 如果使用 <code class=\"codespan\">SVGPath</code>,需要前缀 <code class=\"codespan\">path://</code>。</li>\n</ul>\n</li>\n<li>雷达图(<code class=\"codespan\">radar</code>):<ul>\n<li>选项 <code class=\"codespan\">radar.name</code> 已经不推荐使用。使用 <code class=\"codespan\">radar.axisName</code> 代替。</li>\n<li>选项 <code class=\"codespan\">radar.nameGap</code> 已经不推荐使用。使用 <code class=\"codespan\">radar.axisNameGap</code> 代替。</li>\n</ul>\n</li>\n<li>Parse and format:<ul>\n<li><code class=\"codespan\">echarts.format.formatTime</code> 已经不推荐使用。使用 <code class=\"codespan\">echarts.time.format</code> 代替。</li>\n<li><code class=\"codespan\">echarts.number.parseDate</code> 已经不推荐使用。使用 <code class=\"codespan\">echarts.time.parse</code> 代替。</li>\n<li><code class=\"codespan\">echarts.format.getTextRect</code> 已经不推荐使用。</li>\n</ul>\n</li>\n</ul>\n"},"在打包环境中使用 ECharts":{"type":["*"],"description":"<p>假如你的开发环境使用了<code class=\"codespan\">npm</code>或者<code class=\"codespan\">yarn</code>等包管理工具,并且使用 Webpack 等打包工具进行构建,本文将会介绍如何引入 Apache ECharts<sup>TM</sup> 并通过 treeshaking 只打包需要的模块。</p>\n<h2 id=\"npm-echarts\">NPM 安装 ECharts</h2>\n<p>你可以使用如下命令通过 npm 安装 ECharts</p>\n<pre><code class=\"lang-shell\">npm install echarts --save\n</code></pre>\n<h2 id=\"-echarts\">引入 ECharts</h2>\n<pre><code class=\"lang-js\">import * as echarts from &#39;echarts&#39;;\n\n// 基于准备好的dom,初始化echarts实例\nvar myChart = echarts.init(document.getElementById(&#39;main&#39;));\n// 绘制图表\nmyChart.setOption({\n    title: {\n        text: &#39;ECharts 入门示例&#39;\n    },\n    tooltip: {},\n    xAxis: {\n        data: [&#39;衬衫&#39;, &#39;羊毛衫&#39;, &#39;雪纺衫&#39;, &#39;裤子&#39;, &#39;高跟鞋&#39;, &#39;袜子&#39;]\n    },\n    yAxis: {},\n    series: [{\n        name: &#39;销量&#39;,\n        type: &#39;bar&#39;,\n        data: [5, 20, 36, 10, 10, 20]\n    }]\n});\n</code></pre>\n<h2 id=\"-echarts-\">按需引入 ECharts 图表和组件</h2>\n<p>上面的代码会引入所有 ECharts 中所有的图表和组件,但是假如你不想引入所有组件,也可以使用 ECharts 提供的按需引入的接口来打包必须的组件。</p>\n<pre><code class=\"lang-js\">// 引入 echarts 核心模块,核心模块提供了 echarts 使用必须要的接口。\nimport * as echarts from &#39;echarts/core&#39;;\n// 引入柱状图图表,图表后缀都为 Chart\nimport {\n    BarChart\n} from &#39;echarts/charts&#39;;\n// 引入提示框,标题,直角坐标系组件,组件后缀都为 Component\nimport {\n    TitleComponent,\n    TooltipComponent,\n    GridComponent\n} from &#39;echarts/components&#39;;\n// 引入 Canvas 渲染器,注意引入 CanvasRenderer 或者 SVGRenderer 是必须的一步\nimport {\n    CanvasRenderer\n} from &#39;echarts/renderers&#39;;\n\n// 注册必须的组件\necharts.use(\n    [TitleComponent, TooltipComponent, GridComponent, BarChart, CanvasRenderer]\n);\n\n// 接下来的使用就跟之前一样,初始化图表,设置配置项\nvar myChart = echarts.init(document.getElementById(&#39;main&#39;));\nmyChart.setOption({\n    ...\n});\n</code></pre>\n<blockquote>\n<p>需要注意的是注意为了保证打包的体积是最小的,ECharts 按需引入的时候不再提供任何渲染器,所以需要选择引入<code class=\"codespan\">CanvasRenderer</code>或者<code class=\"codespan\">SVGRenderer</code>作为渲染器。这样的好处是假如你只需要使用 svg 渲染模式,打包的结果中就不会再包含无需使用的<code class=\"codespan\">CanvasRenderer</code>模块。</p>\n</blockquote>\n<p>我们在示例编辑页的“完整代码”标签提供了非常方便的生成按需引入代码的功能。这个功能会根据当前的配置项动态生成最小的按需引入的代码。你可以直接在你的项目中使用。</p>\n<h2 id=\"-typescript-\">在 TypeScript 中按需引入</h2>\n<p>对于使用了 TypeScript 来开发 ECharts 的开发者,我们提供了类型接口来组合出最小的<code class=\"codespan\">EChartsOption</code>类型。这个更严格的类型可以有效帮助你检查出是否少加载了组件或者图表。</p>\n<pre><code class=\"lang-ts\">import * as echarts from &#39;echarts/core&#39;;\nimport {\n    BarChart,\n    // 系列类型的定义后缀都为 SeriesOption\n    BarSeriesOption,\n    LineChart,\n    LineSeriesOption\n} from &#39;echarts/charts&#39;;\nimport {\n    TitleComponent,\n    // 组件类型的定义后缀都为 ComponentOption\n    TitleComponentOption,\n    GridComponent,\n    GridComponentOption\n} from &#39;echarts/components&#39;;\nimport {\n    CanvasRenderer\n} from &#39;echarts/renderers&#39;;\n\n// 通过 ComposeOption 来组合出一个只有必须组件和图表的 Option 类型\ntype ECOption = echarts.ComposeOption&lt;\n  BarSeriesOption | LineSeriesOption | TitleComponentOption | GridComponentOption\n&gt;;\n\n// 注册必须的组件\necharts.use(\n    [TitleComponent, TooltipComponent, GridComponent, BarChart, CanvasRenderer]\n);\n\nvar option: ECOption = {\n    ...\n}\n</code></pre>\n"},"ECharts 基础概念概览":{"type":["*"],"description":"<p>本文介绍 Apache ECharts<sup>TM</sup> 最基本的名词和概念。</p>\n<h2 id=\"echarts-\">echarts 实例</h2>\n<p>一个网页中可以创建多个 <code class=\"codespan\">echarts 实例</code>。每个 <code class=\"codespan\">echarts 实例</code> 中可以创建多个图表和坐标系等等(用 <code class=\"codespan\">option</code> 来描述)。准备一个 DOM 节点(作为 echarts 的渲染容器),就可以在上面创建一个 echarts 实例。每个 echarts 实例独占一个 DOM 节点。</p>\n<p><br></p>\n<p><img width=\"500\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/multiple-ec-instance.jpg\"></p>\n<h2 id=\"-series-\">系列(series)</h2>\n<p><code class=\"codespan\">系列</code>(<a href=\"option.html#series\" target=\"_blank\">series</a>)是很常见的名词。在 echarts 里,<code class=\"codespan\">系列</code>(<a href=\"option.html#series\" target=\"_blank\">series</a>)是指:一组数值以及他们映射成的图。“系列”这个词原本可能来源于“一系列的数据”,而在 echarts 中取其扩展的概念,不仅表示数据,也表示数据映射成为的图。所以,一个 <code class=\"codespan\">系列</code> 包含的要素至少有:一组数值、图表类型(<code class=\"codespan\">series.type</code>)、以及其他的关于这些数据如何映射成图的参数。</p>\n<p>echarts 里系列类型(<code class=\"codespan\">series.type</code>)就是图表类型。系列类型(<code class=\"codespan\">series.type</code>)至少有:<a href=\"option.html#series-line\" target=\"_blank\">line</a>(折线图)、<a href=\"option.html#series-bar\" target=\"_blank\">bar</a>(柱状图)、<a href=\"option.html#series-pie\" target=\"_blank\">pie</a>(饼图)、<a href=\"option.html#series-scatter\" target=\"_blank\">scatter</a>(散点图)、<a href=\"option.html#series-graph\" target=\"_blank\">graph</a>(关系图)、<a href=\"option.html#series-tree\" target=\"_blank\">tree</a>(树图)、...</p>\n<p>如下图,右侧的 <code class=\"codespan\">option</code> 中声明了三个 <code class=\"codespan\">系列</code>(<a href=\"option.html#series\" target=\"_blank\">series</a>):<a href=\"option.html#series-pie\" target=\"_blank\">pie</a>(饼图系列)、<a href=\"option.html#series-line\" target=\"_blank\">line</a>(折线图系列)、<a href=\"option.html#series-bar\" target=\"_blank\">bar</a>(柱状图系列),每个系列中有他所需要的数据(<a href=\"option.html#series.data\" target=\"_blank\">series.data</a>)。</p>\n<p><br></p>\n<p><img width=\"700\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/series-all-a.jpg\"></p>\n<p><br></p>\n<p>类同地,下图中是另一种配置方式,系列的数据从 <a href=\"option.html#dataset\" target=\"_blank\">dataset</a> 中取:</p>\n<p><br></p>\n<p><img width=\"600\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/series-all-b.jpg\"></p>\n<h2 id=\"-component-\">组件(component)</h2>\n<p>在系列之上,echarts 中各种内容,被抽象为“组件”。例如,echarts 中至少有这些组件:<a href=\"option.html#xAxis\" target=\"_blank\">xAxis</a>(直角坐标系 X 轴)、<a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a>(直角坐标系 Y 轴)、<a href=\"option.html#grid\" target=\"_blank\">grid</a>(直角坐标系底板)、<a href=\"option.html#angleAxis\" target=\"_blank\">angleAxis</a>(极坐标系角度轴)、<a href=\"option.html#radiusAxis\" target=\"_blank\">radiusAxis</a>(极坐标系半径轴)、<a href=\"option.html#polar\" target=\"_blank\">polar</a>(极坐标系底板)、<a href=\"option.html#geo\" target=\"_blank\">geo</a>(地理坐标系)、<a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a>(数据区缩放组件)、<a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a>(视觉映射组件)、<a href=\"option.html#tooltip\" target=\"_blank\">tooltip</a>(提示框组件)、<a href=\"option.html#toolbox\" target=\"_blank\">toolbox</a>(工具栏组件)、<a href=\"option.html#series\" target=\"_blank\">series</a>(系列)、...</p>\n<p>我们注意到,其实系列(<a href=\"option.html#series\" target=\"_blank\">series</a>)也是一种组件,可以理解为:系列是专门绘制“图”的组件。</p>\n<p>如下图,右侧的 <code class=\"codespan\">option</code> 中声明了各个组件(包括系列),各个组件就出现在图中。</p>\n<p><br></p>\n<p><img width=\"800\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/components.jpg\"></p>\n<p><br></p>\n<p>注:因为系列是一种特殊的组件,所以有时候也会出现 “组件和系列” 这样的描述,这种语境下的 “组件” 是指:除了 “系列” 以外的其他组件。</p>\n<h2 id=\"-option-\">用 option 描述图表</h2>\n<p>上面已经出现了 <code class=\"codespan\">option</code> 这个概念。echarts 的使用者,使用 <code class=\"codespan\">option</code> 来描述其对图表的各种需求,包括:有什么数据、要画什么图表、图表长什么样子、含有什么组件、组件能操作什么事情等等。简而言之,<code class=\"codespan\">option</code> 表述了:<code class=\"codespan\">数据</code>、<code class=\"codespan\">数据如何映射成图形</code>、<code class=\"codespan\">交互行为</code>。</p>\n<pre><code class=\"lang-js\">// 创建 echarts 实例。\nvar dom = document.getElementById(&#39;dom-id&#39;);\nvar chart = echarts.init(dom);\n\n// 用 option 描述 `数据`、`数据如何映射成图形`、`交互行为` 等。\n// option 是个大的 JavaScript 对象。\nvar option = {\n    // option 每个属性是一类组件。\n    legend: {...},\n    grid: {...},\n    tooltip: {...},\n    toolbox: {...},\n    dataZoom: {...},\n    visualMap: {...},\n    // 如果有多个同类组件,那么就是个数组。例如这里有三个 X 轴。\n    xAxis: [\n        // 数组每项表示一个组件实例,用 type 描述“子类型”。\n        {type: &#39;category&#39;, ...},\n        {type: &#39;category&#39;, ...},\n        {type: &#39;value&#39;, ...}\n    ],\n    yAxis: [{...}, {...}],\n    // 这里有多个系列,也是构成一个数组。\n    series: [\n        // 每个系列,也有 type 描述“子类型”,即“图表类型”。\n        {type: &#39;line&#39;, data: [[&#39;AA&#39;, 332], [&#39;CC&#39;, 124], [&#39;FF&#39;, 412], ... ]},\n        {type: &#39;line&#39;, data: [2231, 1234, 552, ... ]},\n        {type: &#39;line&#39;, data: [[4, 51], [8, 12], ... ]}\n    }]\n};\n\n// 调用 setOption 将 option 输入 echarts,然后 echarts 渲染图表。\nchart.setOption(option);\n</code></pre>\n<p>系列里的 <a href=\"option.html#series.data\" target=\"_blank\">series.data</a> 是本系列的数据。而另一种描述方式,系列数据从 <a href=\"option.html#dataset\" target=\"_blank\">dataset</a> 中取:</p>\n<pre><code class=\"lang-js\">var option = {\n    dataset: {\n        source: [\n            [121, &#39;XX&#39;, 442, 43.11],\n            [663, &#39;ZZ&#39;, 311, 91.14],\n            [913, &#39;ZZ&#39;, 312, 92.12],\n            ...\n        ]\n    },\n    xAxis: {},\n    yAxis: {},\n    series: [\n        // 数据从 dataset 中取,encode 中的数值是 dataset.source 的维度 index (即第几列)\n        {type: &#39;bar&#39;, encode: {x: 1, y: 0}},\n        {type: &#39;bar&#39;, encode: {x: 1, y: 2}},\n        {type: &#39;scatter&#39;, encode: {x: 1, y: 3}},\n        ...\n    ]\n};\n</code></pre>\n<h2 id=\"-\">组件的定位</h2>\n<p>不同的组件、系列,常有不同的定位方式。</p>\n<p><br></p>\n<p><strong>[类 CSS 的绝对定位]</strong></p>\n<p><br></p>\n<p>多数组件和系列,都能够基于 <code class=\"codespan\">top</code> / <code class=\"codespan\">right</code> / <code class=\"codespan\">down</code> / <code class=\"codespan\">left</code> / <code class=\"codespan\">width</code> / <code class=\"codespan\">height</code> 绝对定位。\n这种绝对定位的方式,类似于 <code class=\"codespan\">CSS</code> 的绝对定位(<code class=\"codespan\">position: absolute</code>)。绝对定位基于的是 echarts 容器 DOM 节点。</p>\n<p>其中,他们每个值都可以是:</p>\n<ul>\n<li>绝对数值(例如 <code class=\"codespan\">bottom: 54</code> 表示:距离 echarts 容器底边界 <code class=\"codespan\">54</code> 像素)。</li>\n<li>或者基于 echarts 容器高宽的百分比(例如 <code class=\"codespan\">right: &#39;20%&#39;</code> 表示:距离 echarts 容器右边界的距离是 echarts 容器宽度的 <code class=\"codespan\">20%</code>)。</li>\n</ul>\n<p>如下图的例子,对 <a href=\"option.html#grid\" target=\"_blank\">grid</a> 组件(也就是直角坐标系的底板)设置 <code class=\"codespan\">left</code>、<code class=\"codespan\">right</code>、<code class=\"codespan\">height</code>、<code class=\"codespan\">bottom</code> 达到的效果。</p>\n<p><br></p>\n<p><img width=\"800\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/locate.jpg\"></p>\n<p><br></p>\n<p>我们可以注意到,<code class=\"codespan\">left</code> <code class=\"codespan\">right</code> <code class=\"codespan\">width</code> 是一组(横向)、<code class=\"codespan\">top</code> <code class=\"codespan\">bottom</code> <code class=\"codespan\">height</code> 是另一组(纵向)。这两组没有什么关联。每组中,至多设置两项就可以了,第三项会被自动算出。例如,设置了 <code class=\"codespan\">left</code> 和 <code class=\"codespan\">right</code> 就可以了,<code class=\"codespan\">width</code> 会被自动算出。</p>\n<p><br></p>\n<p><strong>[中心半径定位]</strong></p>\n<p><br></p>\n<p>少数圆形的组件或系列,可以使用“中心半径定位”,例如,<a href=\"option.html#series-pie\" target=\"_blank\">pie</a>(饼图)、<a href=\"option.html#series-sunburst\" target=\"_blank\">sunburst</a>(旭日图)、<a href=\"option.html#polar\" target=\"_blank\">polar</a>(极坐标系)。</p>\n<p>中心半径定位,往往依据 <a href=\"option.html#series-pie.center\" target=\"_blank\">center</a>(中心)、<a href=\"option.html#series-pie.radius\" target=\"_blank\">radius</a>(半径)来决定位置。</p>\n<p><br></p>\n<p><strong>[其他定位]</strong></p>\n<p><br></p>\n<p>少数组件和系列可能有自己的特殊的定位方式。在他们的文档中会有说明。</p>\n<h2 id=\"-\">坐标系</h2>\n<p>很多系列,例如 <a href=\"option.html#series-line\" target=\"_blank\">line</a>(折线图)、<a href=\"option.html#series-bar\" target=\"_blank\">bar</a>(柱状图)、<a href=\"option.html#series-scatter\" target=\"_blank\">scatter</a>(散点图)、<a href=\"option.html#series-heatmap\" target=\"_blank\">heatmap</a>(热力图)等等,需要运行在 “坐标系” 上。坐标系用于布局这些图,以及显示数据的刻度等等。例如 echarts 中至少支持这些坐标系:<a href=\"option.html#grid\" target=\"_blank\">直角坐标系</a>、<a href=\"option.html#polar\" target=\"_blank\">极坐标系</a>、<a href=\"option.html#geo\" target=\"_blank\">地理坐标系(GEO)</a>、<a href=\"option.html#singleAxis\" target=\"_blank\">单轴坐标系</a>、<a href=\"option.html#calendar\" target=\"_blank\">日历坐标系</a> 等。其他一些系列,例如 <a href=\"option.html#series-pie\" target=\"_blank\">pie</a>(饼图)、<a href=\"option.html#series-tree\" target=\"_blank\">tree</a>(树图)等等,并不依赖坐标系,能独立存在。还有一些图,例如 <a href=\"option.html#series-graph\" target=\"_blank\">graph</a>(关系图)等,既能独立存在,也能布局在坐标系中,依据用户的设定而来。</p>\n<p>一个坐标系,可能由多个组件协作而成。我们以最常见的直角坐标系来举例。直角坐标系中,包括有 <a href=\"option.html#xAxis\" target=\"_blank\">xAxis</a>(直角坐标系 X 轴)、<a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a>(直角坐标系 Y 轴)、<a href=\"option.html#grid\" target=\"_blank\">grid</a>(直角坐标系底板)三种组件。<code class=\"codespan\">xAxis</code>、<code class=\"codespan\">yAxis</code> 被 <code class=\"codespan\">grid</code> 自动引用并组织起来,共同工作。</p>\n<p>我们来看下图,这是最简单的使用直角坐标系的方式:只声明了 <code class=\"codespan\">xAxis</code>、<code class=\"codespan\">yAxis</code> 和一个 <code class=\"codespan\">scatter</code>(散点图系列),echarts 暗自为他们创建了 <code class=\"codespan\">grid</code> 并关联起他们:</p>\n<p><br></p>\n<p><img width=\"450\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/coord-sys-0.jpg\"></p>\n<p><br></p>\n<p>再来看下图,两个 <code class=\"codespan\">yAxis</code>,共享了一个 <code class=\"codespan\">xAxis</code>。两个 <code class=\"codespan\">series</code>,也共享了这个 <code class=\"codespan\">xAxis</code>,但是分别使用不同的 <code class=\"codespan\">yAxis</code>,使用 <a href=\"option.html#series-line.yAxisIndex\" target=\"_blank\">yAxisIndex</a> 来指定它自己使用的是哪个 <code class=\"codespan\">yAxis</code>:</p>\n<p><br></p>\n<p><img width=\"600\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/coord-sys-1.jpg\"></p>\n<p><br></p>\n<p>再来看下图,一个 echarts 实例中,有多个 <code class=\"codespan\">grid</code>,每个 <code class=\"codespan\">grid</code> 分别有 <code class=\"codespan\">xAxis</code>、<code class=\"codespan\">yAxis</code>,他们使用 <code class=\"codespan\">xAxisIndex</code>、<code class=\"codespan\">yAxisIndex</code>、<code class=\"codespan\">gridIndex</code> 来指定引用关系:</p>\n<p><br></p>\n<p><img width=\"600\" height=\"auto\" src=\"documents/asset/img/basic-concepts-overview/coord-sys-2.jpg\"></p>\n<p><br></p>\n<p>另外,一个系列,往往能运行在不同的坐标系中。例如,一个 <a href=\"option.html#series-scatter\" target=\"_blank\">scatter</a>(散点图)能运行在 <a href=\"option.html#grid\" target=\"_blank\">直角坐标系</a>、<a href=\"option.html#polar\" target=\"_blank\">极坐标系</a> 、<a href=\"option.html#geo\" target=\"_blank\">地理坐标系(GEO)</a> 等各种坐标系中。同样,一个坐标系,也能承载不同的系列,如上面出现的各种例子,<a href=\"option.html#grid\" target=\"_blank\">直角坐标系</a> 里承载了 <a href=\"option.html#series-line\" target=\"_blank\">line</a>(折线图)、<a href=\"option.html#series-bar\" target=\"_blank\">bar</a>(柱状图)等等。</p>\n"},"个性化图表的样式":{"type":["*"],"description":"<p>Apache ECharts<sup>TM</sup> 提供了丰富的自定义配置选项,并且能够从全局、系列、数据三个层级去设置数据图形的样式。下面我们来看如何使用 ECharts 实现下面这个南丁格尔图:</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=\"-\">绘制南丁格尔图</h2>\n<p><a href=\"#5%20%E5%88%86%E9%92%9F%E4%B8%8A%E6%89%8B%20ECharts\">5分钟上手ECharts</a> 中讲了如何绘制一个简单的柱状图,这次要画的是饼图,饼图主要是通过扇形的弧度表现不同类目的数据在总和中的占比,它的数据格式比柱状图更简单,只有一维的数值,不需要给类目。因为不在直角坐标系上,所以也不需要<code class=\"codespan\">xAxis</code>,<code class=\"codespan\">yAxis</code>。</p>\n<pre><code class=\"lang-js\">myChart.setOption({\n    series : [\n        {\n            name: &#39;访问来源&#39;,\n            type: &#39;pie&#39;,\n            radius: &#39;55%&#39;,\n            data:[\n                {value:235, name:&#39;视频广告&#39;},\n                {value:274, name:&#39;联盟广告&#39;},\n                {value:310, name:&#39;邮件营销&#39;},\n                {value:335, name:&#39;直接访问&#39;},\n                {value:400, name:&#39;搜索引擎&#39;}\n            ]\n        }\n    ]\n})\n</code></pre>\n<p>上面代码就能画出一个简单的饼图:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/tutorial-styling-step0&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<p>这里<code class=\"codespan\">data</code>属性值不像入门教程里那样每一项都是单个数值,而是一个包含 <code class=\"codespan\">name</code> 和 <code class=\"codespan\">value</code> 属性的对象,ECharts 中的数据项都是既可以只设成数值,也可以设成一个包含有名称、该数据图形的样式配置、标签配置的对象,具体见 <a href=\"option.html#series-pie.data\" target=\"_blank\">data</a> 文档。</p>\n<p>ECharts 中的<a href=\"option.html#series-pie\" target=\"_blank\">饼图</a>也支持通过设置 <a href=\"option.html#series-pie.roseType\" target=\"_blank\">roseType</a> 显示成南丁格尔图。</p>\n<pre><code class=\"lang-js\">roseType: &#39;angle&#39;\n</code></pre>\n<p>南丁格尔图会通过半径表示数据的大小。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/tutorial-styling-step1&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<h2 id=\"-\">阴影的配置</h2>\n<p>ECharts 中有一些通用的样式,诸如阴影、透明度、颜色、边框颜色、边框宽度等,这些样式一般都会在系列的 <a href=\"#series-pie.itemStyle\">itemStyle</a> 里设置。例如阴影的样式可以通过下面几个配置项设置:</p>\n<pre><code class=\"lang-js\">itemStyle: {\n    // 阴影的大小\n    shadowBlur: 200,\n    // 阴影水平方向上的偏移\n    shadowOffsetX: 0,\n    // 阴影垂直方向上的偏移\n    shadowOffsetY: 0,\n    // 阴影颜色\n    shadowColor: &#39;rgba(0, 0, 0, 0.5)&#39;\n}\n</code></pre>\n<p>加上阴影后的效果:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/tutorial-styling-step2&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<p><code class=\"codespan\">itemStyle</code>的<code class=\"codespan\">emphasis</code>是鼠标 hover 时候的高亮样式。这个示例里是正常的样式下加阴影,但是可能更多的时候是 hover 的时候通过阴影突出。</p>\n<pre><code class=\"lang-js\">itemStyle: {\n    emphasis: {\n        shadowBlur: 200,\n        shadowColor: &#39;rgba(0, 0, 0, 0.5)&#39;\n    }\n}\n</code></pre>\n<h2 id=\"-\">深色背景和浅色标签</h2>\n<p>现在我们需要把整个主题改成开始的示例中那样的深色主题,这就需要改背景色和文本颜色。</p>\n<p>背景色是全局的,所以直接在 option 下设置 <a href=\"option.html#backgroundColor\" target=\"_blank\">backgroundColor</a></p>\n<pre><code class=\"lang-js\">setOption({\n    backgroundColor: &#39;#2c343c&#39;\n})\n</code></pre>\n<p>文本的样式可以设置全局的 <a href=\"option.html#textStyle\" target=\"_blank\">textStyle</a>。</p>\n<pre><code class=\"lang-js\">setOption({\n    textStyle: {\n        color: &#39;rgba(255, 255, 255, 0.3)&#39;\n    }\n})\n</code></pre>\n<p>也可以每个系列分别设置,每个系列的文本设置在 <a href=\"option.html#series-pie.label.textStyle\" target=\"_blank\">label.textStyle</a>。</p>\n<pre><code class=\"lang-js\">label: {\n    textStyle: {\n        color: &#39;rgba(255, 255, 255, 0.3)&#39;\n    }\n}\n</code></pre>\n<p>饼图的话还要将标签的视觉引导线的颜色设为浅色。</p>\n<pre><code class=\"lang-js\">labelLine: {\n    lineStyle: {\n        color: &#39;rgba(255, 255, 255, 0.3)&#39;\n    }\n}\n</code></pre>\n<p>如下:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/tutorial-styling-step3&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<p>跟<code class=\"codespan\">itemStyle</code>一样,<code class=\"codespan\">label</code>和<code class=\"codespan\">labelLine</code>的样式也有<code class=\"codespan\">emphasis</code>状态。</p>\n<h2 id=\"-\">设置扇形的颜色</h2>\n<p>扇形的颜色也是在 itemStyle 中设置:</p>\n<pre><code class=\"lang-js\">itemStyle: {\n    // 设置扇形的颜色\n    color: &#39;#c23531&#39;,\n    shadowBlur: 200,\n    shadowColor: &#39;rgba(0, 0, 0, 0.5)&#39;\n}\n</code></pre>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/tutorial-styling-step4&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<p>跟我们要实现的效果已经挺像了,除了每个扇形的颜色,效果中阴影下面的扇形颜色更深,有种光线被遮住的感觉,从而会出现层次感和空间感。</p>\n<p>ECharts 中每个扇形颜色的可以通过分别设置 data 下的数据项实现。</p>\n<pre><code class=\"lang-js\">data: [{\n    value:400,\n    name:&#39;搜索引擎&#39;,\n    itemStyle: {\n        color: &#39;#c23531&#39;\n    }\n}, ...]\n</code></pre>\n<p>但是这次因为只有明暗度的变化,所以有一种更快捷的方式是通过 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a> 组件将数值的大小映射到明暗度。</p>\n<pre><code class=\"lang-js\">visualMap: {\n    // 不显示 visualMap 组件,只用于明暗度的映射\n    show: false,\n    // 映射的最小值为 80\n    min: 80,\n    // 映射的最大值为 600\n    max: 600,\n    inRange: {\n        // 明暗度的范围是 0 到 1\n        colorLightness: [0, 1]\n    }\n}\n</code></pre>\n<p>最终效果:</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\n\n\n"},"ECharts 中的样式简介":{"type":["*"],"description":"<p>本文主要是大略概述,用哪些方法,可以在 Apache ECharts<sup>TM</sup> 中设置样式,改变图形元素或者文字的颜色、明暗、大小等。</p>\n<blockquote>\n<p>之所以用“样式”这种可能不很符合数据可视化思维的词,是因为,比较通俗易懂。</p>\n</blockquote>\n<p>本文介绍这几种方式,他们的功能范畴可能会有交叉(即同一种细节的效果可能可以用不同的方式实现),但是他们各有各的场景偏好。</p>\n<ul>\n<li>颜色主题(Theme)</li>\n<li>调色盘</li>\n<li>直接样式设置(itemStyle、lineStyle、areaStyle、label、...)</li>\n<li>视觉映射(visualMap)</li>\n</ul>\n<p>其他关于样式的文章,参见:<a href=\"#%E4%B8%AA%E6%80%A7%E5%8C%96%E5%9B%BE%E8%A1%A8%E7%9A%84%E6%A0%B7%E5%BC%8F\">个性化图表的样式</a>,<a href=\"#%E6%95%B0%E6%8D%AE%E7%9A%84%E8%A7%86%E8%A7%89%E6%98%A0%E5%B0%84\">数据的视觉映射</a>。</p>\n<h2 id=\"-theme-\">颜色主题(Theme)</h2>\n<p>最简单的更改全局样式的方式,是直接采用颜色主题(theme)。例如,在 <a href=\"https://echarts.apache.org/examples/zh/index.html\" target=\"_blank\">示例集合</a> 中,可以选择 “Theme”,直接看到采用主题的效果。</p>\n<p>ECharts4 开始,除了一贯的默认主题外,新内置了两套主题,分别为 <code class=\"codespan\">&#39;light&#39;</code> 和 <code class=\"codespan\">&#39;dark&#39;</code>。可以这么来使用它们:</p>\n<pre><code class=\"lang-js\">var chart = echarts.init(dom, &#39;light&#39;);\n</code></pre>\n<p>或者</p>\n<pre><code class=\"lang-js\">var chart = echarts.init(dom, &#39;dark&#39;);\n</code></pre>\n<p>其他的主题,没有内置在 ECharts 中,需要自己加载。这些主题可以在 <a href=\"https://echarts.apache.org/zh/theme-builder.html\" target=\"_blank\">主题编辑器</a> 里访问到。也可以使用这个主题编辑器,自己编辑主题。下载下来的主题可以这样使用:</p>\n<p>如果主题保存为 JSON 文件,那么可以自行加载和注册,例如:</p>\n<pre><code class=\"lang-js\">// 假设主题名称是 &quot;vintage&quot;\n$.getJSON(&#39;xxx/xxx/vintage.json&#39;, function (themeJSON) {\n    echarts.registerTheme(&#39;vintage&#39;, JSON.parse(themeJSON))\n    var chart = echarts.init(dom, &#39;vintage&#39;);\n});\n</code></pre>\n<p>如果保存为 UMD 格式的 JS 文件,那么支持了自注册,直接引入 JS 文件即可:</p>\n<pre><code class=\"lang-js\">// HTML 引入 vintage.js 文件后(假设主题名称是 &quot;vintage&quot;)\nvar chart = echarts.init(dom, &#39;vintage&#39;);\n// ...\n</code></pre>\n<h2 id=\"-\">调色盘</h2>\n<p>调色盘,可以在 option 中设置。它给定了一组颜色,图形、系列会自动从其中选择颜色。\n可以设置全局的调色盘,也可以设置系列自己专属的调色盘。</p>\n<pre><code class=\"lang-js\">option = {\n    // 全局调色盘。\n    color: [&#39;#c23531&#39;,&#39;#2f4554&#39;, &#39;#61a0a8&#39;, &#39;#d48265&#39;, &#39;#91c7ae&#39;,&#39;#749f83&#39;,  &#39;#ca8622&#39;, &#39;#bda29a&#39;,&#39;#6e7074&#39;, &#39;#546570&#39;, &#39;#c4ccd3&#39;],\n\n    series: [{\n        type: &#39;bar&#39;,\n        // 此系列自己的调色盘。\n        color: [&#39;#dd6b66&#39;,&#39;#759aa0&#39;,&#39;#e69d87&#39;,&#39;#8dc1a9&#39;,&#39;#ea7e53&#39;,&#39;#eedd78&#39;,&#39;#73a373&#39;,&#39;#73b9bc&#39;,&#39;#7289ab&#39;, &#39;#91ca8c&#39;,&#39;#f49f42&#39;],\n        ...\n    }, {\n        type: &#39;pie&#39;,\n        // 此系列自己的调色盘。\n        color: [&#39;#37A2DA&#39;, &#39;#32C5E9&#39;, &#39;#67E0E3&#39;, &#39;#9FE6B8&#39;, &#39;#FFDB5C&#39;,&#39;#ff9f7f&#39;, &#39;#fb7293&#39;, &#39;#E062AE&#39;, &#39;#E690D1&#39;, &#39;#e7bcf3&#39;, &#39;#9d96f5&#39;, &#39;#8378EA&#39;, &#39;#96BFFF&#39;],\n        ...\n    }]\n}\n</code></pre>\n<h2 id=\"-itemstyle-linestyle-areastyle-label-\">直接的样式设置 itemStyle, lineStyle, areaStyle, label, ...</h2>\n<p>直接的样式设置是比较常用设置方式。纵观 ECharts 的 <a href=\"option.html\" target=\"_blank\">option</a> 中,很多地方可以设置 <a href=\"option.html#series.itemStyle\" target=\"_blank\">itemStyle</a>、<a href=\"option.html#series-line.lineStyle\" target=\"_blank\">lineStyle</a>、<a href=\"option.html#series-line.areaStyle\" target=\"_blank\">areaStyle</a>、<a href=\"option.html#series.label\" target=\"_blank\">label</a> 等等。这些的地方可以直接设置图形元素的颜色、线宽、点的大小、标签的文字、标签的样式等等。</p>\n<p>一般来说,ECharts 的各个系列和组件,都遵从这些命名习惯,虽然不同图表和组件中,<code class=\"codespan\">itemStyle</code>、<code class=\"codespan\">label</code> 等可能出现在不同的地方。</p>\n<p>直接样式设置的另一篇介绍,参见 <a href=\"#%E4%B8%AA%E6%80%A7%E5%8C%96%E5%9B%BE%E8%A1%A8%E7%9A%84%E6%A0%B7%E5%BC%8F\">个性化图表的样式</a>。</p>\n<h2 id=\"-emphasis\">高亮的样式:emphasis</h2>\n<p>在鼠标悬浮到图形元素上时,一般会出现高亮的样式。默认情况下,高亮的样式是根据普通样式自动生成的。但是高亮的样式也可以自己定义,主要是通过 <a href=\"option.html#series-scatter.emphasis\" target=\"_blank\">emphasis</a> 属性来定制。<a href=\"option.html#series-scatter.emphasis\" target=\"_blank\">emphsis</a> 中的结构,和普通样式的结构相同,例如:</p>\n<pre><code class=\"lang-js\">option = {\n    series: {\n        type: &#39;scatter&#39;,\n\n        // 普通样式。\n        itemStyle: {\n            // 点的颜色。\n            color: &#39;red&#39;\n        },\n        label: {\n            show: true,\n            // 标签的文字。\n            formatter: &#39;This is a normal label.&#39;\n        },\n\n        // 高亮样式。\n        emphasis: {\n            itemStyle: {\n                // 高亮时点的颜色。\n                color: &#39;blue&#39;\n            },\n            label: {\n                show: true,\n                // 高亮时标签的文字。\n                formatter: &#39;This is a emphasis label.&#39;\n            }\n        }\n    }\n}\n</code></pre>\n<p>注意:在 ECharts4 以前,高亮和普通样式的写法,是这样的:</p>\n<pre><code class=\"lang-js\">option = {\n    series: {\n        type: &#39;scatter&#39;,\n\n        itemStyle: {\n            // 普通样式。\n            normal: {\n                // 点的颜色。\n                color: &#39;red&#39;\n            },\n            // 高亮样式。\n            emphasis: {\n                // 高亮时点的颜色。\n                color: &#39;blue&#39;\n            }\n        },\n\n        label: {\n            // 普通样式。\n            normal: {\n                show: true,\n                // 标签的文字。\n                formatter: &#39;This is a normal label.&#39;\n            },\n            // 高亮样式。\n            emphasis: {\n                show: true,\n                // 高亮时标签的文字。\n                formatter: &#39;This is a emphasis label.&#39;\n            }\n        }\n    }\n}\n</code></pre>\n<p>这种写法 <strong>仍然被兼容</strong>,但是,不再推荐。事实上,多数情况下,使用者只会配置普通状态下的样式,而使用默认的高亮样式。所以在 ECharts4 中,支持不写 <code class=\"codespan\">normal</code> 的配置方法(即本文开头的那种写法),使得配置项更扁平简单。</p>\n<h2 id=\"-visualmap-\">通过 visualMap 组件设定样式</h2>\n<p><a href=\"option.html#visualMap\" target=\"_blank\">visualMap 组件</a> 能指定数据到颜色、图形尺寸的映射规则,详见 <a href=\"#%E6%95%B0%E6%8D%AE%E7%9A%84%E8%A7%86%E8%A7%89%E6%98%A0%E5%B0%84\">数据的视觉映射</a>。</p>\n"},"异步数据加载和更新":{"type":["*"],"description":"<h2 id=\"-\">异步加载</h2>\n<p><a href=\"#getting-started\">入门示例</a>中的数据是在初始化后 <code class=\"codespan\">setOption</code> 中直接填入的,但是很多时候可能数据需要异步加载后再填入。Apache ECharts<sup>TM</sup> 中实现异步数据的更新非常简单,在图表初始化后不管任何时候只要通过 jQuery 等工具异步获取数据后通过 <code class=\"codespan\">setOption</code> 填入数据和配置项就行。</p>\n<pre><code class=\"lang-js\">var myChart = echarts.init(document.getElementById(&#39;main&#39;));\n\n$.get(&#39;data.json&#39;).done(function (data) {\n    myChart.setOption({\n        title: {\n            text: &#39;异步数据加载示例&#39;\n        },\n        tooltip: {},\n        legend: {\n            data:[&#39;销量&#39;]\n        },\n        xAxis: {\n            data: data.categories\n        },\n        yAxis: {},\n        series: [{\n            name: &#39;销量&#39;,\n            type: &#39;bar&#39;,\n            data: data.data\n        }]\n    });\n});\n</code></pre>\n<p>或者先设置完其它的样式,显示一个空的直角坐标轴,然后获取数据后填入数据。</p>\n<pre><code class=\"lang-js\">var myChart = echarts.init(document.getElementById(&#39;main&#39;));\n// 显示标题,图例和空的坐标轴\nmyChart.setOption({\n    title: {\n        text: &#39;异步数据加载示例&#39;\n    },\n    tooltip: {},\n    legend: {\n        data:[&#39;销量&#39;]\n    },\n    xAxis: {\n        data: []\n    },\n    yAxis: {},\n    series: [{\n        name: &#39;销量&#39;,\n        type: &#39;bar&#39;,\n        data: []\n    }]\n});\n\n// 异步加载数据\n$.get(&#39;data.json&#39;).done(function (data) {\n    // 填入数据\n    myChart.setOption({\n        xAxis: {\n            data: data.categories\n        },\n        series: [{\n            // 根据名字对应到相应的系列\n            name: &#39;销量&#39;,\n            data: data.data\n        }]\n    });\n});\n</code></pre>\n<p>如下:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/tutorial-async&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<p>ECharts 中在更新数据的时候需要通过<code class=\"codespan\">name</code>属性对应到相应的系列,上面示例中如果<code class=\"codespan\">name</code>不存在也可以根据系列的顺序正常更新,但是更多时候推荐更新数据的时候加上系列的<code class=\"codespan\">name</code>数据。</p>\n<h2 id=\"loading-\">loading 动画</h2>\n<p>如果数据加载时间较长,一个空的坐标轴放在画布上也会让用户觉得是不是产生 bug 了,因此需要一个 loading 的动画来提示用户数据正在加载。</p>\n<p>ECharts 默认有提供了一个简单的加载动画。只需要调用 <a href=\"api.html#echartsInstance.showLoading\" target=\"_blank\">showLoading</a> 方法显示。数据加载完成后再调用 <a href=\"api.html#echartsInstance.hideLoading\" target=\"_blank\">hideLoading</a> 方法隐藏加载动画。</p>\n<pre><code class=\"lang-js\">myChart.showLoading();\n$.get(&#39;data.json&#39;).done(function (data) {\n    myChart.hideLoading();\n    myChart.setOption(...);\n});\n</code></pre>\n<p>效果如下:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/tutorial-loading&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n<h2 id=\"-\">数据的动态更新</h2>\n<p>ECharts 由数据驱动,数据的改变驱动图表展现的改变,因此动态数据的实现也变得异常简单。</p>\n<p>所有数据的更新都通过 <a href=\"#api.html#echartsInstance.setOption\">setOption</a>实现,你只需要定时获取数据,<a href=\"#api.html#echartsInstance.setOption\">setOption</a> 填入数据,而不用考虑数据到底产生了那些变化,ECharts 会找到两组数据之间的差异然后通过合适的动画去表现数据的变化。</p>\n<blockquote>\n<p>ECharts 3 中移除了 ECharts 2 中的 addData 方法。如果只需要加入单个数据,可以先 data.push(value) 后 setOption</p>\n</blockquote>\n<p>具体可以看下面示例:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/tutorial-dynamic-data&edit=1&reset=1\" width=\"400\" height=\"300\" ></iframe>\n\n\n\n"},"使用 dataset 管理数据":{"type":["*"],"description":"<p>Apache ECharts<sup>TM</sup> 4 开始支持了 <code class=\"codespan\">dataset</code> 组件用于单独的数据集声明,从而数据可以单独管理,被多个组件复用,并且可以基于数据指定数据到视觉的映射。这在不少场景下能带来使用上的方便。</p>\n<p>ECharts 4 以前,数据只能声明在各个“系列(series)”中,例如:</p>\n<pre><code class=\"lang-js\">option = {\n    xAxis: {\n        type: &#39;category&#39;,\n        data: [&#39;Matcha Latte&#39;, &#39;Milk Tea&#39;, &#39;Cheese Cocoa&#39;, &#39;Walnut Brownie&#39;]\n    },\n    yAxis: {},\n    series: [\n        {\n            type: &#39;bar&#39;,\n            name: &#39;2015&#39;,\n            data: [89.3, 92.1, 94.4, 85.4]\n        },\n        {\n            type: &#39;bar&#39;,\n            name: &#39;2016&#39;,\n            data: [95.8, 89.4, 91.2, 76.9]\n        },\n        {\n            type: &#39;bar&#39;,\n            name: &#39;2017&#39;,\n            data: [97.7, 83.1, 92.5, 78.1]\n        }\n    ]\n}\n</code></pre>\n<p>这种方式的优点是,直观易理解,以及适于对一些特殊图表类型进行一定的数据类型定制。但是缺点是,为匹配这种数据输入形式,常需要有数据处理的过程,把数据分割设置到各个系列(和类目轴)中。此外,不利于多个系列共享一份数据,也不利于基于原始数据进行图表类型、系列的映射安排。</p>\n<p>于是,ECharts 4 提供了 <code class=\"codespan\">数据集</code>(<code class=\"codespan\">dataset</code>)组件来单独声明数据,它带来了这些效果:</p>\n<ul>\n<li>能够贴近这样的数据可视化常见思维方式:(I) 提供数据,(II) 指定数据到视觉的映射,从而形成图表。</li>\n<li>数据和其他配置可以被分离开来。数据常变,其他配置常不变。分开易于分别管理。</li>\n<li>数据可以被多个系列或者组件复用,对于大数据量的场景,不必为每个系列创建一份数据。</li>\n<li>支持更多的数据的常用格式,例如二维数组、对象数组等,一定程度上避免使用者为了数据格式而进行转换。</li>\n</ul>\n<h2 id=\"-\">入门例子</h2>\n<p>下面是一个最简单的 <code class=\"codespan\">dataset</code> 的例子:</p>\n<pre><code class=\"lang-js\">option = {\n    legend: {},\n    tooltip: {},\n    dataset: {\n        // 提供一份数据。\n        source: [\n            [&#39;product&#39;, &#39;2015&#39;, &#39;2016&#39;, &#39;2017&#39;],\n            [&#39;Matcha Latte&#39;, 43.3, 85.8, 93.7],\n            [&#39;Milk Tea&#39;, 83.1, 73.4, 55.1],\n            [&#39;Cheese Cocoa&#39;, 86.4, 65.2, 82.5],\n            [&#39;Walnut Brownie&#39;, 72.4, 53.9, 39.1]\n        ]\n    },\n    // 声明一个 X 轴,类目轴(category)。默认情况下,类目轴对应到 dataset 第一列。\n    xAxis: {type: &#39;category&#39;},\n    // 声明一个 Y 轴,数值轴。\n    yAxis: {},\n    // 声明多个 bar 系列,默认情况下,每个系列会自动对应到 dataset 的每一列。\n    series: [\n        {type: &#39;bar&#39;},\n        {type: &#39;bar&#39;},\n        {type: &#39;bar&#39;}\n    ]\n}\n</code></pre>\n<p>效果如下:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=dataset-simple0&edit=1&reset=1\" width=\"500\" height=\"300\" ></iframe>\n\n\n<p>或者也可以使用常见的对象数组的格式:</p>\n<pre><code class=\"lang-js\">option = {\n    legend: {},\n    tooltip: {},\n    dataset: {\n        // 用 dimensions 指定了维度的顺序。直角坐标系中,\n        // 默认把第一个维度映射到 X 轴上,第二个维度映射到 Y 轴上。\n        // 如果不指定 dimensions,也可以通过指定 series.encode\n        // 完成映射,参见后文。\n        dimensions: [&#39;product&#39;, &#39;2015&#39;, &#39;2016&#39;, &#39;2017&#39;],\n        source: [\n            {product: &#39;Matcha Latte&#39;, &#39;2015&#39;: 43.3, &#39;2016&#39;: 85.8, &#39;2017&#39;: 93.7},\n            {product: &#39;Milk Tea&#39;, &#39;2015&#39;: 83.1, &#39;2016&#39;: 73.4, &#39;2017&#39;: 55.1},\n            {product: &#39;Cheese Cocoa&#39;, &#39;2015&#39;: 86.4, &#39;2016&#39;: 65.2, &#39;2017&#39;: 82.5},\n            {product: &#39;Walnut Brownie&#39;, &#39;2015&#39;: 72.4, &#39;2016&#39;: 53.9, &#39;2017&#39;: 39.1}\n        ]\n    },\n    xAxis: {type: &#39;category&#39;},\n    yAxis: {},\n    series: [\n        {type: &#39;bar&#39;},\n        {type: &#39;bar&#39;},\n        {type: &#39;bar&#39;}\n    ]\n};\n</code></pre>\n<h2 id=\"-\">数据到图形的映射</h2>\n<p>本篇里,我们制作数据可视化图表的逻辑是这样的:基于数据,在配置项中指定如何映射到图形。</p>\n<p>概略而言,可以进行这些映射:</p>\n<ul>\n<li>指定 dataset 的列(column)还是行(row)映射为图形系列(series)。这件事可以使用 <a href=\"option.html#series.seriesLayoutBy\" target=\"_blank\">series.seriesLayoutBy</a> 属性来配置。默认是按照列(column)来映射。</li>\n<li>指定维度映射的规则:如何从 dataset 的维度(一个“维度”的意思是一行/列)映射到坐标轴(如 X、Y 轴)、提示框(tooltip)、标签(label)、图形元素大小颜色等(visualMap)。这件事可以使用 <a href=\"option.html#series.encode\" target=\"_blank\">series.encode</a> 属性,以及 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a> 组件(如果有需要映射颜色大小等视觉维度的话)来配置。上面的例子中,没有给出这种映射配置,那么 ECharts 就按最常见的理解进行默认映射:X 坐标轴声明为类目轴,默认情况下会自动对应到 dataset.source 中的第一列;三个柱图系列,一一对应到 dataset.source 中后面每一列。</li>\n</ul>\n<p>下面详细解释。</p>\n<h2 id=\"-dataset-series-\">把数据集( dataset )的行或列映射为系列(series)</h2>\n<p>有了数据表之后,使用者可以灵活得配置:数据如何对应到轴和图形系列。</p>\n<p>用户可以使用 <code class=\"codespan\">seriesLayoutBy</code> 配置项,改变图表对于行列的理解。<code class=\"codespan\">seriesLayoutBy</code> 可取值:</p>\n<ul>\n<li>&#39;column&#39;: 默认值。系列被安放到 <code class=\"codespan\">dataset</code> 的列上面。</li>\n<li>&#39;row&#39;: 系列被安放到 <code class=\"codespan\">dataset</code> 的行上面。</li>\n</ul>\n<p>看这个例子:</p>\n<pre><code class=\"lang-js\">option = {\n    legend: {},\n    tooltip: {},\n    dataset: {\n        source: [\n            [&#39;product&#39;, &#39;2012&#39;, &#39;2013&#39;, &#39;2014&#39;, &#39;2015&#39;],\n            [&#39;Matcha Latte&#39;, 41.1, 30.4, 65.1, 53.3],\n            [&#39;Milk Tea&#39;, 86.5, 92.1, 85.7, 83.1],\n            [&#39;Cheese Cocoa&#39;, 24.1, 67.2, 79.5, 86.4]\n        ]\n    },\n    xAxis: [\n        {type: &#39;category&#39;, gridIndex: 0},\n        {type: &#39;category&#39;, gridIndex: 1}\n    ],\n    yAxis: [\n        {gridIndex: 0},\n        {gridIndex: 1}\n    ],\n    grid: [\n        {bottom: &#39;55%&#39;},\n        {top: &#39;55%&#39;}\n    ],\n    series: [\n        // 这几个系列会在第一个直角坐标系中,每个系列对应到 dataset 的每一行。\n        {type: &#39;bar&#39;, seriesLayoutBy: &#39;row&#39;},\n        {type: &#39;bar&#39;, seriesLayoutBy: &#39;row&#39;},\n        {type: &#39;bar&#39;, seriesLayoutBy: &#39;row&#39;},\n        // 这几个系列会在第二个直角坐标系中,每个系列对应到 dataset 的每一列。\n        {type: &#39;bar&#39;, xAxisIndex: 1, yAxisIndex: 1},\n        {type: &#39;bar&#39;, xAxisIndex: 1, yAxisIndex: 1},\n        {type: &#39;bar&#39;, xAxisIndex: 1, yAxisIndex: 1},\n        {type: &#39;bar&#39;, xAxisIndex: 1, yAxisIndex: 1}\n    ]\n}\n</code></pre>\n<p>效果如下:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=dataset-series-layout-by&edit=1&reset=1\" width=\"800\" height=\"600\" ></iframe>\n\n\n\n<h2 id=\"-dimension-\">维度(dimension)</h2>\n<p>介绍 <code class=\"codespan\">encode</code> 之前,首先要介绍“维度(dimension)”的概念。</p>\n<p>常用图表所描述的数据大部分是“二维表”结构,上述的例子中,我们都使用二维数组来容纳二维表。现在,当我们把系列(series)对应到“列”的时候,那么每一列就称为一个“维度(dimension)”,而每一行称为数据项(item)。反之,如果我们把系列(series)对应到表行,那么每一行就是“维度(dimension)”,每一列就是数据项(item)。</p>\n<p>维度可以有单独的名字,便于在图表中显示。维度名(dimension name)可以在定义在 dataset 的第一行(或者第一列)。例如上面的例子中,<code class=\"codespan\">&#39;score&#39;</code>、<code class=\"codespan\">&#39;amount&#39;</code>、<code class=\"codespan\">&#39;product&#39;</code> 就是维度名。从第二行开始,才是正式的数据。<code class=\"codespan\">dataset.source</code> 中第一行(列)到底包含不包含维度名,ECharts 默认会自动探测。当然也可以设置 <code class=\"codespan\">dataset.sourceHeader: true</code> 显示声明第一行(列)就是维度,或者 <code class=\"codespan\">dataset.sourceHeader: false</code> 表明第一行(列)开始就直接是数据。</p>\n<p>维度的定义,也可以使用单独的 <code class=\"codespan\">dataset.dimensions</code> 或者 <code class=\"codespan\">series.dimensions</code> 来定义,这样可以同时指定维度名,和维度的类型(dimension type):</p>\n<pre><code class=\"lang-js\">var option1 = {\n    dataset: {\n        dimensions: [\n            {name: &#39;score&#39;},\n            // 可以简写为 string,表示维度名。\n            &#39;amount&#39;,\n            // 可以在 type 中指定维度类型。\n            {name: &#39;product&#39;, type: &#39;ordinal&#39;}\n        ],\n        source: [...]\n    },\n    ...\n};\n\nvar option2 = {\n    dataset: {\n        source: [...]\n    },\n    series: {\n        type: &#39;line&#39;,\n        // 在系列中设置的 dimensions 会更优先采纳。\n        dimensions: [\n            null, // 可以设置为 null 表示不想设置维度名\n            &#39;amount&#39;,\n            {name: &#39;product&#39;, type: &#39;ordinal&#39;}\n        ]\n    },\n    ...\n};\n</code></pre>\n<p>大多数情况下,我们并不需要去设置维度类型,因为会自动判断。但是如果因为数据为空之类原因导致判断不足够准确时,可以手动设置维度类型。</p>\n<p>维度类型(dimension type)可以取这些值:</p>\n<ul>\n<li><code class=\"codespan\">&#39;number&#39;</code>: 默认,表示普通数据。</li>\n<li><code class=\"codespan\">&#39;ordinal&#39;</code>: 对于类目、文本这些 string 类型的数据,如果需要能在数轴上使用,须是 &#39;ordinal&#39; 类型。ECharts 默认会自动判断这个类型。但是自动判断也是不可能很完备的,所以使用者也可以手动强制指定。</li>\n<li><code class=\"codespan\">&#39;time&#39;</code>: 表示时间数据。设置成 <code class=\"codespan\">&#39;time&#39;</code> 则能支持自动解析数据成时间戳(timestamp),比如该维度的数据是 &#39;2017-05-10&#39;,会自动被解析。如果这个维度被用在时间数轴(<a href=\"option.html#xAxis.type\" target=\"_blank\">axis.type</a> 为 <code class=\"codespan\">&#39;time&#39;</code>)上,那么会被自动设置为 <code class=\"codespan\">&#39;time&#39;</code> 类型。时间类型的支持参见 <a href=\"option.html#series.data\" target=\"_blank\">data</a>。</li>\n<li><code class=\"codespan\">&#39;float&#39;</code>: 如果设置成 <code class=\"codespan\">&#39;float&#39;</code>,在存储时候会使用 <code class=\"codespan\">TypedArray</code>,对性能优化有好处。</li>\n<li><code class=\"codespan\">&#39;int&#39;</code>: 如果设置成 <code class=\"codespan\">&#39;int&#39;</code>,在存储时候会使用 <code class=\"codespan\">TypedArray</code>,对性能优化有好处。</li>\n</ul>\n<h2 id=\"-series-encode-\">数据到图形的映射( series.encode )</h2>\n<p>了解了维度的概念后,我们就可以使用 <a href=\"option.html#series.encode\" target=\"_blank\">encode</a> 来做映射。总体是这样的感觉:</p>\n<pre><code class=\"lang-js\">var option = {\n    dataset: {\n        source: [\n            [&#39;score&#39;, &#39;amount&#39;, &#39;product&#39;],\n            [89.3, 58212, &#39;Matcha Latte&#39;],\n            [57.1, 78254, &#39;Milk Tea&#39;],\n            [74.4, 41032, &#39;Cheese Cocoa&#39;],\n            [50.1, 12755, &#39;Cheese Brownie&#39;],\n            [89.7, 20145, &#39;Matcha Cocoa&#39;],\n            [68.1, 79146, &#39;Tea&#39;],\n            [19.6, 91852, &#39;Orange Juice&#39;],\n            [10.6, 101852, &#39;Lemon Juice&#39;],\n            [32.7, 20112, &#39;Walnut Brownie&#39;]\n        ]\n    },\n    xAxis: {},\n    yAxis: {type: &#39;category&#39;},\n    series: [\n        {\n            type: &#39;bar&#39;,\n            encode: {\n                // 将 &quot;amount&quot; 列映射到 X 轴。\n                x: &#39;amount&#39;,\n                // 将 &quot;product&quot; 列映射到 Y 轴。\n                y: &#39;product&#39;\n            }\n        }\n    ]\n};\n</code></pre>\n<p>效果如下:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/dataset-encode-simple0&edit=1&reset=1\" width=\"500\" height=\"300\" ></iframe>\n\n\n\n<p><code class=\"codespan\">series.encode</code> 声明的基本结构如下,其中冒号左边是坐标系、标签等特定名称,如 <code class=\"codespan\">&#39;x&#39;</code>, <code class=\"codespan\">&#39;y&#39;</code>, <code class=\"codespan\">&#39;tooltip&#39;</code> 等,冒号右边是数据中的维度名(string 格式)或者维度的序号(number 格式,从 0 开始计数),可以指定一个或多个维度(使用数组)。通常情况下,下面各种信息不需要所有的都写,按需写即可。</p>\n<p>下面是 <code class=\"codespan\">series.encode</code> 支持的属性:</p>\n<pre><code class=\"lang-js\">// 在任何坐标系和系列中,都支持:\nencode: {\n    // 使用 “名为 product 的维度” 和 “名为 score 的维度” 的值在 tooltip 中显示\n    tooltip: [&#39;product&#39;, &#39;score&#39;]\n    // 使用 “维度 1” 和 “维度 3” 的维度名连起来作为系列名。(有时候名字比较长,这可以避免在 series.name 重复输入这些名字)\n    seriesName: [1, 3],\n    // 表示使用 “维度2” 中的值作为 id。这在使用 setOption 动态更新数据时有用处,可以使新老数据用 id 对应起来,从而能够产生合适的数据更新动画。\n    itemId: 2,\n    // 指定数据项的名称使用 “维度3” 在饼图等图表中有用,可以使这个名字显示在图例(legend)中。\n    itemName: 3\n}\n\n// 直角坐标系(grid/cartesian)特有的属性:\nencode: {\n    // 把 “维度1”、“维度5”、“名为 score 的维度” 映射到 X 轴:\n    x: [1, 5, &#39;score&#39;],\n    // 把“维度0”映射到 Y 轴。\n    y: 0\n}\n\n// 单轴(singleAxis)特有的属性:\nencode: {\n    single: 3\n}\n\n// 极坐标系(polar)特有的属性:\nencode: {\n    radius: 3,\n    angle: 2\n}\n\n// 地理坐标系(geo)特有的属性:\nencode: {\n    lng: 3,\n    lat: 2\n}\n\n// 对于一些没有坐标系的图表,例如饼图、漏斗图等,可以是:\nencode: {\n    value: 3\n}\n</code></pre>\n<p>下面给出个更丰富的 <code class=\"codespan\">series.encode</code> 的示例:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=dataset-encode1&edit=1&reset=1\" width=\"800\" height=\"600\" ></iframe>\n\n\n\n<h2 id=\"-\">视觉通道(颜色、尺寸等)的映射</h2>\n<p>我们可以使用 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a> 组件进行视觉通道的映射。详见 <code class=\"codespan\">visualMap</code> 文档的介绍。这是一个示例:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=dataset-encode0&edit=1&reset=1\" width=\"500\" height=\"400\" ></iframe>\n\n\n\n<h2 id=\"-encode\">默认的 encode</h2>\n<p>值得一提的是,当 <code class=\"codespan\">series.encode</code> 并没有指定时,ECharts 针对最常见直角坐标系中的图表(折线图、柱状图、散点图、K线图等)、饼图、漏斗图,会采用一些默认的映射规则。默认的映射规则比较简单,大体是:</p>\n<ul>\n<li>在坐标系中(如直角坐标系、极坐标系等)<ul>\n<li>如果有类目轴(axis.type 为 &#39;category&#39;),则将第一列(行)映射到这个轴上,后续每一列(行)对应一个系列。</li>\n<li>如果没有类目轴,假如坐标系有两个轴(例如直角坐标系的 X Y 轴),则每两列对应一个系列,这两列分别映射到这两个轴上。</li>\n</ul>\n</li>\n<li>如果没有坐标系(如饼图)<ul>\n<li>取第一列(行)为名字,第二列(行)为数值(如果只有一列,则取第一列为数值)。</li>\n</ul>\n</li>\n</ul>\n<p>默认的规则不能满足要求时,就可以自己来配置 <code class=\"codespan\">encode</code>,也并不复杂。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=dataset-default&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n\n<h2 id=\"-series-encode-\">几个常见的 series.encode 设置方式举例</h2>\n<p>问:如何把第三列设置为 X 轴,第五列设置为 Y 轴?</p>\n<p>答:</p>\n<pre><code class=\"lang-js\">series: {\n    // 注意维度序号(dimensionIndex)从 0 开始计数,第三列是 dimensions[2]。\n    encode: {x: 2, y: 4},\n    ...\n}\n</code></pre>\n<p>问:如何把第三行设置为 X 轴,第五行设置为 Y 轴?</p>\n<p>答:</p>\n<pre><code class=\"lang-js\">series: {\n    encode: {x: 2, y: 4},\n    seriesLayoutBy: &#39;row&#39;,\n    ...\n}\n</code></pre>\n<p>问:如何把第二列设置为标签?</p>\n<p>答:\n关于标签的显示 <a href=\"option.html#series.label.formatter\" target=\"_blank\">label.formatter</a>,现在支持引用特定维度的值,例如:</p>\n<pre><code class=\"lang-js\">series: {\n    label: {\n        // `&#39;{@score}&#39;` 表示 “名为 score” 的维度里的值。\n        // `&#39;{@[4]}&#39;` 表示引用序号为 4 的维度里的值。\n        formatter: &#39;aaa{@product}bbb{@score}ccc{@[4]}ddd&#39;\n    }\n}\n</code></pre>\n<p>问:如何让第 2 列和第 3 列显示在提示框(tooltip)中?</p>\n<p>答:</p>\n<pre><code class=\"lang-js\">series: {\n    encode: {\n        tooltip: [1, 2]\n        ...\n    },\n    ...\n}\n</code></pre>\n<p>问:数据里没有维度名,那么怎么给出维度名?</p>\n<p>答:</p>\n<pre><code class=\"lang-js\">dataset: {\n    dimensions: [&#39;score&#39;, &#39;amount&#39;],\n    source: [\n        [89.3, 3371],\n        [92.1, 8123],\n        [94.4, 1954],\n        [85.4, 829]\n    ]\n}\n</code></pre>\n<p>问:如何把第三列映射为气泡图的点的大小?</p>\n<p>答:</p>\n<pre><code class=\"lang-js\">var option = {\n    dataset: {\n        source: [\n            [12, 323, 11.2],\n            [23, 167, 8.3],\n            [81, 284, 12],\n            [91, 413, 4.1],\n            [13, 287, 13.5]\n        ]\n    },\n    visualMap: {\n        show: false,\n        dimension: 2, // 指向第三列(列序号从 0 开始记,所以设置为 2)。\n        min: 2, // 需要给出数值范围,最小数值。\n        max: 15, // 需要给出数值范围,最大数值。\n        inRange: {\n            // 气泡尺寸:5 像素到 60 像素。\n            symbolSize: [5, 60]\n        }\n    },\n    xAxis: {},\n    yAxis: {},\n    series: {\n        type: &#39;scatter&#39;\n    }\n};\n</code></pre>\n<p>问:encode 里指定了映射,但是不管用?</p>\n<p>答:可以查查有没有拼错,比如,维度名是:<code class=\"codespan\">&#39;Life Expectancy&#39;</code>,encode 中拼成了 <code class=\"codespan\">&#39;Life Expectency&#39;</code>。</p>\n<h2 id=\"-\">数据的各种格式</h2>\n<p>多数常见图表中,数据适于用二维表的形式描述。广为使用的数据表格软件(如 MS Excel、Numbers)或者关系数据数据库都是二维表。他们的数据可以导出成 JSON 格式,输入到 <code class=\"codespan\">dataset.source</code> 中,在不少情况下可以免去一些数据处理的步骤。</p>\n<blockquote>\n<p>假如数据导出成 csv 文件,那么可以使用一些 csv 工具如 <a href=\"https://github.com/d3/d3-dsv\" target=\"_blank\">dsv</a> 或者 <a href=\"https://github.com/mholt/PapaParse\" target=\"_blank\">PapaParse</a> 将 csv 转成 JSON。</p>\n</blockquote>\n<p>在 JavaScript 常用的数据传输格式中,二维数组可以比较直观的存储二维表。前面的示例都是使用二维数组表示。</p>\n<p>除了二维数组以外,dataset 也支持例如下面 key-value 方式的数据格式,这类格式也非常常见。但是这类格式中,目前并不支持 <a href=\"option.html#series.seriesLayoutBy\" target=\"_blank\">seriesLayoutBy</a> 参数。</p>\n<pre><code class=\"lang-js\">dataset: [{\n    // 按行的 key-value 形式(对象数组),这是个比较常见的格式。\n    source: [\n        {product: &#39;Matcha Latte&#39;, count: 823, score: 95.8},\n        {product: &#39;Milk Tea&#39;, count: 235, score: 81.4},\n        {product: &#39;Cheese Cocoa&#39;, count: 1042, score: 91.2},\n        {product: &#39;Walnut Brownie&#39;, count: 988, score: 76.9}\n    ]\n}, {\n    // 按列的 key-value 形式。\n    source: {\n        &#39;product&#39;: [&#39;Matcha Latte&#39;, &#39;Milk Tea&#39;, &#39;Cheese Cocoa&#39;, &#39;Walnut Brownie&#39;],\n        &#39;count&#39;: [823, 235, 1042, 988],\n        &#39;score&#39;: [95.8, 81.4, 91.2, 76.9]\n    }\n}]\n</code></pre>\n<h2 id=\"-dataset-\">多个 dataset 以及如何引用他们</h2>\n<p>可以同时定义多个 dataset。系列可以通过 <a href=\"option.html#series.datasetIndex\" target=\"_blank\">series.datasetIndex</a> 来指定引用哪个 dataset。例如:</p>\n<pre><code class=\"lang-js\">var option = {\n    dataset: [{\n        // 序号为 0 的 dataset。\n        source: [...],\n    }, {\n        // 序号为 1 的 dataset。\n        source: [...]\n    }, {\n        // 序号为 2 的 dataset。\n        source: [...]\n    }],\n    series: [{\n        // 使用序号为 2 的 dataset。\n        datasetIndex: 2\n    }, {\n        // 使用序号为 1 的 dataset。\n        datasetIndex: 1\n    }]\n}\n</code></pre>\n<h2 id=\"echarts-3-series-data-\">ECharts 3 的数据设置方式(series.data)仍正常使用</h2>\n<p>ECharts 4 之前一直以来的数据声明方式仍然被正常支持,如果系列已经声明了 <a href=\"option.html#series.data\" target=\"_blank\">series.data</a>, 那么就会使用 <a href=\"option.html#series.data\" target=\"_blank\">series.data</a> 而非 <code class=\"codespan\">dataset</code>。</p>\n<pre><code class=\"lang-js\">{\n    xAxis: {\n        type: &#39;category&#39;\n        data: [&#39;Matcha Latte&#39;, &#39;Milk Tea&#39;, &#39;Cheese Cocoa&#39;, &#39;Walnut Brownie&#39;]\n    },\n    yAxis: {},\n    series: [{\n        type: &#39;bar&#39;,\n        name: &#39;2015&#39;,\n        data: [89.3, 92.1, 94.4, 85.4]\n    }, {\n        type: &#39;bar&#39;,\n        name: &#39;2016&#39;,\n        data: [95.8, 89.4, 91.2, 76.9]\n    }, {\n        type: &#39;bar&#39;,\n        name: &#39;2017&#39;,\n        data: [97.7, 83.1, 92.5, 78.1]\n    }]\n}\n</code></pre>\n<p>其实,<a href=\"option.html#series.data\" target=\"_blank\">series.data</a> 也是种会一直存在的重要设置方式。一些特殊的非 table 格式的图表,如 <a href=\"option.html#series-treemap\" target=\"_blank\">treemap</a>、<a href=\"option.html#series-graph\" target=\"_blank\">graph</a>、<a href=\"option.html#series-lines\" target=\"_blank\">lines</a> 等,现在仍不支持在 dataset 中设置,仍然需要使用 <a href=\"option.html#series.data\" target=\"_blank\">series.data</a>。另外,对于巨大数据量的渲染(如百万以上的数据量),需要使用 <a href=\"api.html#echartsInstance.appendData\" target=\"_blank\">appendData</a> 进行增量加载,这种情况不支持使用 <code class=\"codespan\">dataset</code>。</p>\n<h2 id=\"-data-transform-\">数据转换器( data transform )</h2>\n<p>参见 <a href=\"#%E4%BD%BF%E7%94%A8%20transform%20%E8%BF%9B%E8%A1%8C%E6%95%B0%E6%8D%AE%E8%BD%AC%E6%8D%A2\">data transform</a>。</p>\n<h2 id=\"-\">其他</h2>\n<p>目前并非所有图表都支持 dataset。支持 dataset 的图表有:\n<code class=\"codespan\">line</code>、<code class=\"codespan\">bar</code>、<code class=\"codespan\">pie</code>、<code class=\"codespan\">scatter</code>、<code class=\"codespan\">effectScatter</code>、<code class=\"codespan\">parallel</code>、<code class=\"codespan\">candlestick</code>、<code class=\"codespan\">map</code>、<code class=\"codespan\">funnel</code>、<code class=\"codespan\">custom</code>。\n后续会有更多的图表进行支持。</p>\n<p>最后,给出一个示例,多个图表共享一个 <code class=\"codespan\">dataset</code>,并带有联动交互:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=dataset-link&edit=1&reset=1\" width=\"800\" height=\"500\" ></iframe>\n\n\n\n\n"},"使用 transform 进行数据转换":{"type":["*"],"description":"<p>Apache ECharts<sup>TM</sup> 5 开始支持了“数据转换”( data transform )功能。在 echarts 中,“数据转换” 这个词指的是,给定一个已有的“数据集”(<a href=\"option.html#dataset\" target=\"_blank\">dataset</a>)和一个“转换方法”(<a href=\"option.html#dataset.transform\" target=\"_blank\">transform</a>),echarts 能生成一个新的“数据集”,然后可以使用这个新的“数据集”绘制图表。这些工作都可以声明式地完成。</p>\n<p>抽象地来说,数据转换是这样一种公式:<code class=\"codespan\">outData = f(inputData)</code>。<code class=\"codespan\">f</code> 是转换方法,例如:<code class=\"codespan\">filter</code>、<code class=\"codespan\">sort</code>、<code class=\"codespan\">regression</code>、<code class=\"codespan\">boxplot</code>、<code class=\"codespan\">cluster</code>、<code class=\"codespan\">aggregate</code>(todo) 等等。有了数据转换能力后,我们就至少可以做到这些事情:</p>\n<ul>\n<li>把数据分成多份用不同的饼图展现。</li>\n<li>进行一些数据统计运算,并展示结果。</li>\n<li>用某些数据可视化算法处理数据,并展示结果。</li>\n<li>数据排序。</li>\n<li>去除或直选择数据项。</li>\n<li>...</li>\n</ul>\n<h2 id=\"-\">数据转换基础使用</h2>\n<p>在 echarts 中,数据转换是依托于数据集(<a href=\"#dataset\">dataset</a>)来实现的. 我们可以设置 <a href=\"option.html#dataset.transform\" target=\"_blank\">dataset.transform</a> 来表示,此 dataset 的数据,来自于此 transform 的结果。例如。</p>\n<pre><code class=\"lang-js\">var option = {\n    dataset: [{\n        // 这个 dataset 的 index 是 `0`。\n        source: [\n            [&#39;Product&#39;, &#39;Sales&#39;, &#39;Price&#39;, &#39;Year&#39;],\n            [&#39;Cake&#39;, 123, 32, 2011],\n            [&#39;Cereal&#39;, 231, 14, 2011],\n            [&#39;Tofu&#39;, 235, 5, 2011],\n            [&#39;Dumpling&#39;, 341, 25, 2011],\n            [&#39;Biscuit&#39;, 122, 29, 2011],\n            [&#39;Cake&#39;, 143, 30, 2012],\n            [&#39;Cereal&#39;, 201, 19, 2012],\n            [&#39;Tofu&#39;, 255, 7, 2012],\n            [&#39;Dumpling&#39;, 241, 27, 2012],\n            [&#39;Biscuit&#39;, 102, 34, 2012],\n            [&#39;Cake&#39;, 153, 28, 2013],\n            [&#39;Cereal&#39;, 181, 21, 2013],\n            [&#39;Tofu&#39;, 395, 4, 2013],\n            [&#39;Dumpling&#39;, 281, 31, 2013],\n            [&#39;Biscuit&#39;, 92, 39, 2013],\n            [&#39;Cake&#39;, 223, 29, 2014],\n            [&#39;Cereal&#39;, 211, 17, 2014],\n            [&#39;Tofu&#39;, 345, 3, 2014],\n            [&#39;Dumpling&#39;, 211, 35, 2014],\n            [&#39;Biscuit&#39;, 72, 24, 2014],\n        ],\n        // id: &#39;a&#39;\n    }, {\n        // 这个 dataset 的 index 是 `1`。\n        // 这个 `transform` 配置,表示,此 dataset 的数据,来自于此 transform 的结果。\n        transform: {\n            type: &#39;filter&#39;,\n            config: { dimension: &#39;Year&#39;, value: 2011 }\n        },\n        // 我们还可以设置这些可选的属性: `fromDatasetIndex` 或 `fromDatasetId`。\n        // 这些属性,指定了,transform 的输入,来自于哪个 dataset。例如,\n        // `fromDatasetIndex: 0` 表示输入来自于 index 为 `0` 的 dataset 。又例如,\n        // `fromDatasetId: &#39;a&#39;` 表示输入来自于 `id: &#39;a&#39;` 的 dataset。\n        // 当这些属性都不指定时,默认认为,输入来自于 index 为 `0` 的 dataset 。\n    }, {\n        // 这个 dataset 的 index 是 `2`。\n        // 同样,这里因为 `fromDatasetIndex` 和 `fromDatasetId` 都没有被指定,\n        // 那么输入默认来自于 index 为 `0` 的 dataset 。\n        transform: {\n            // 这个类型为 &quot;filter&quot; 的 transform 能够遍历并筛选出满足条件的数据项。\n            type: &#39;filter&#39;,\n            // 每个 transform 如果需要有配置参数的话,都须配置在 `config` 里。\n            // 在这个 &quot;filter&quot; transform 中,`config` 用于指定筛选条件。\n            // 下面这个筛选条件是:选出维度( dimension )&#39;Year&#39; 中值为 2012 的所有\n            // 数据项。\n            config: { dimension: &#39;Year&#39;, value: 2012 }\n        }\n    }, {\n        // 这个 dataset 的 index 是 `3`。\n        transform: {\n            type: &#39;filter&#39;,\n            config: { dimension: &#39;Year&#39;, value: 2013 }\n        }\n    }],\n    series: [{\n        type: &#39;pie&#39;, radius: 50, center: [&#39;25%&#39;, &#39;50%&#39;],\n        // 这个饼图系列,引用了 index 为 `1` 的 dataset 。也就是,引用了上述\n        // 2011 年那个 &quot;filter&quot; transform 的结果。\n        datasetIndex: 1\n    }, {\n        type: &#39;pie&#39;, radius: 50, center: [&#39;50%&#39;, &#39;50%&#39;],\n        datasetIndex: 2\n    }, {\n        type: &#39;pie&#39;, radius: 50, center: [&#39;75%&#39;, &#39;50%&#39;],\n        datasetIndex: 3\n    }]\n};\n</code></pre>\n<p>下面是上述例子的效果,三个饼图分别显示了 2011、2012、2013 年的数据。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=data-transform-multiple-pie&reset=1&edit=1\" width=\"800\" height=\"300\" ></iframe>\n\n\n<p>现在我们简单总结下,使用 transform 时的几个要点:</p>\n<ul>\n<li>在一个空的 dataset 中声明 <code class=\"codespan\">transform</code>, <code class=\"codespan\">fromDatasetIndex</code>/<code class=\"codespan\">fromDatasetId</code> 来表示我们要生成新的数据。</li>\n<li>系列引用这个 dataset 。</li>\n</ul>\n<h2 id=\"-\">数据转换的进阶使用</h2>\n<h4 id=\"-transform\">链式声明 transform</h4>\n<p><code class=\"codespan\">transform</code> 可以被链式声明,这是一个语法糖。</p>\n<pre><code class=\"lang-js\">option: {\n    dataset: [{\n        source: [ ... ] // 原始数据\n    }, {\n        // 几个 transform 被声明成 array ,他们构成了一个链,\n        // 前一个 transform 的输出是后一个 transform 的输入。\n        transform: [{\n            type: &#39;filter&#39;,\n            config: { dimension: &#39;Product&#39;, value: &#39;Tofu&#39; }\n        }, {\n            type: &#39;sort&#39;,\n            config: { dimension: &#39;Year&#39;, order: &#39;desc&#39; }\n        }]\n    }],\n    series: {\n        type: &#39;pie&#39;,\n        // 这个系列引用上述 transform 的结果。\n        datasetIndex: 1\n    }\n}\n</code></pre>\n<blockquote>\n<p>注意:理论上,任何 transform 都可能有多个输入或多个输出。但是,如果一个 transform 被链式声明,它只能获取前一个 transform 的第一个输出作为输入(第一个 transform 除外),以及它只能把自己的第一个输出给到后一个 transform (最后一个 transform 除外)。</p>\n</blockquote>\n<h4 id=\"-transform-data\">一个 transform 输出多个 data</h4>\n<p>在大多数场景下,transform 只需输出一个 data 。但是也有一些场景,需要输出多个 data ,每个 data 可以被不同的 series 或者 dataset 所使用。</p>\n<p>例如,在内置的 &quot;boxplot&quot; transform 中,除了 boxplot 系列所需要的 data 外,离群点( outlier )也会被生成,并且可以用例如散点图系列显示出来。例如,<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=boxplot-light-velocity&amp;edit=1&amp;reset=1\" target=\"_blank\">example</a>。</p>\n<p>我们提供配置 <a href=\"option.html#dataset.fromTransformResult\" target=\"_blank\">dataset.fromTransformResult</a> 来满足这种情况,例如:</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        // 这个 dataset 的 index 为 `0`。\n        source: [...] // 原始数据\n    }, {\n        // 这个 dataset 的 index 为 `1`。\n        transform: {\n            type: &#39;boxplot&#39;\n        }\n        // 这个 &quot;boxplot&quot; transform 生成了两个数据:\n        // result[0]: boxplot series 所需的数据。\n        // result[1]: 离群点数据。\n        // 当其他 series 或者 dataset 引用这个 dataset 时,他们默认只能得到\n        // result[0] 。\n        // 如果想要他们得到 result[1] ,需要额外声明如下这样一个 dataset :\n    }, {\n        // 这个 dataset 的 index 为 `2`。\n        // 这个额外的 dataset 指定了数据来源于 index 为 `1` 的 dataset。\n        fromDatasetIndex: 1,\n        // 并且指定了获取 transform result[1] 。\n        fromTransformResult: 1\n    }],\n    xAxis: {\n        type: &#39;category&#39;\n    },\n    yAxis: {\n    },\n    series: [{\n        name: &#39;boxplot&#39;,\n        type: &#39;boxplot&#39;,\n        // Reference the data from result[0].\n        // 这个 series 引用 index 为 `1` 的 dataset 。\n        datasetIndex: 1\n    }, {\n        name: &#39;outlier&#39;,\n        type: &#39;scatter&#39;,\n        // 这个 series 引用 index 为 `2` 的 dataset 。\n        // 从而也就得到了上述的 transform result[1] (即离群点数据)\n        datasetIndex: 2\n    }]\n};\n</code></pre>\n<p>另外,<a href=\"option.html#dataset.fromTransformResult\" target=\"_blank\">dataset.fromTransformResult</a> 和 <a href=\"option.html#dataset.transform\" target=\"_blank\">dataset.transform</a> 能同时出现在一个 dataset 中,这表示,这个 transform 的输入,是上游的结果中以 <code class=\"codespan\">fromTransformResult</code> 获取的结果。例如:</p>\n<pre><code class=\"lang-js\">{\n    fromDatasetIndex: 1,\n    fromTransformResult: 1,\n    transform: {\n        type: &#39;sort&#39;,\n        config: { dimension: 2, order: &#39;desc&#39; }\n    }\n}\n</code></pre>\n<h4 id=\"-debug\">在开发环境中 debug</h4>\n<p>使用 transform 时,有时候我们会配不对,显示不出来结果,并且不知道哪里错了。所以,这里提供了一个配置项 <code class=\"codespan\">transform.print</code> 方便 debug 。这个配置项只在开发环境中生效。如下例:</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        source: [ ... ]\n    }, {\n        transform: {\n            type: &#39;filter&#39;,\n            config: { ... }\n            // 配置为 `true` 后, transform 的结果\n            // 会被 console.log 打印出来。\n            print: true\n        }\n    }],\n    ...\n}\n</code></pre>\n<h2 id=\"-filter\">数据转换器 &quot;filter&quot;</h2>\n<p>echarts 内置提供了能起过滤作用的数据转换器。我们只需声明 <code class=\"codespan\">transform.type: &quot;filter&quot;</code>,以及给出数据筛选条件。如下例:</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        source: [\n            [&#39;Product&#39;, &#39;Sales&#39;, &#39;Price&#39;, &#39;Year&#39;],\n            [&#39;Cake&#39;, 123, 32, 2011],\n            [&#39;Latte&#39;, 231, 14, 2011],\n            [&#39;Tofu&#39;, 235, 5, 2011],\n            [&#39;Milk Tee&#39;, 341, 25, 2011],\n            [&#39;Porridge&#39;, 122, 29, 2011],\n            [&#39;Cake&#39;, 143, 30, 2012],\n            [&#39;Latte&#39;, 201, 19, 2012],\n            [&#39;Tofu&#39;, 255, 7, 2012],\n            [&#39;Milk Tee&#39;, 241, 27, 2012],\n            [&#39;Porridge&#39;, 102, 34, 2012],\n            [&#39;Cake&#39;, 153, 28, 2013],\n            [&#39;Latte&#39;, 181, 21, 2013],\n            [&#39;Tofu&#39;, 395, 4, 2013],\n            [&#39;Milk Tee&#39;, 281, 31, 2013],\n            [&#39;Porridge&#39;, 92, 39, 2013],\n            [&#39;Cake&#39;, 223, 29, 2014],\n            [&#39;Latte&#39;, 211, 17, 2014],\n            [&#39;Tofu&#39;, 345, 3, 2014],\n            [&#39;Milk Tee&#39;, 211, 35, 2014],\n            [&#39;Porridge&#39;, 72, 24, 2014]\n        ]\n    }, {\n        transform: {\n            type: &#39;filter&#39;,\n            config: { dimension: &#39;Year&#39;, &#39;=&#39;: 2011 }\n            // 这个筛选条件表示,遍历数据,筛选出维度( dimension )\n            // &#39;Year&#39; 上值为 2011 的所有数据项。\n        }\n    }],\n    series: {\n        type: &#39;pie&#39;,\n        datasetIndex: 1\n    }\n};\n</code></pre>\n<p><br>\n<br>\n这是 filter 的另一个例子的效果:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=data-transform-filter&reset=1&edit=1\" width=\"600\" height=\"350\" ></iframe>\n\n\n\n<p>在 &quot;filter&quot; transform 中,有这些要素:</p>\n<p><strong>关于维度( dimension ):</strong></p>\n<p><code class=\"codespan\">config.dimension</code> 指定了维度,能设成这样的值:</p>\n<ul>\n<li>设定成声明在 dataset 中的维度名,例如 <code class=\"codespan\">config: { dimension: &#39;Year&#39;, &#39;=&#39;: 2011 }</code>。不过, dataset 中维度名的声明并非强制,所以我们也可以</li>\n<li>设定成 dataset 中的维度 index (index 值从 0 开始)例如 <code class=\"codespan\">config: { dimension: 3, &#39;=&#39;: 2011 }</code>。</li>\n</ul>\n<p><strong>关于关系比较操作符:</strong></p>\n<p>关系操作符,可以设定这些:\n<code class=\"codespan\">&gt;</code>(<code class=\"codespan\">gt</code>)、<code class=\"codespan\">&gt;=</code>(<code class=\"codespan\">gte</code>)、<code class=\"codespan\">&lt;</code>(<code class=\"codespan\">lt</code>)、<code class=\"codespan\">&lt;=</code>(<code class=\"codespan\">lte</code>)、<code class=\"codespan\">=</code>(<code class=\"codespan\">eq</code>)、<code class=\"codespan\">!=</code>(<code class=\"codespan\">ne</code>、<code class=\"codespan\">&lt;&gt;</code>)、<code class=\"codespan\">reg</code>。(小括号中的符号或名字,是别名,设置起来作用相同)。他们首先基本地能基于数值大小进行比较,然后也有些额外的功能特性:</p>\n<ul>\n<li>多个关系操作符能声明在一个 {} 中,例如 <code class=\"codespan\">{ dimension: &#39;Price&#39;, &#39;&gt;=&#39;: 20, &#39;&lt;&#39;: 30 }</code>。这表示“与”的关系,即,筛选出价格大于等于 20 小于 30 的数据项。</li>\n<li>data 里的值,不仅可以是数值( number ),也可以是“类数值的字符串”(“ numeric string ”)。“类数值的字符串”本身是一个字符串,但是可以被转换为字面所描述的数值,例如 <code class=\"codespan\">&#39; 123 &#39;</code>。转换过程中,空格(全角半角空格)和换行符都能被消除( trim )。</li>\n<li>如果我们需要对日期对象(JS <code class=\"codespan\">Date</code>)或者日期字符串(如 &#39;2012-05-12&#39;)进行比较,我们需要手动指定 <code class=\"codespan\">parser: &#39;time&#39;</code>,例如 <code class=\"codespan\">config: { dimension: 3, lt: &#39;2012-05-12&#39;, parser: &#39;time&#39; }</code>。</li>\n<li>纯字符串比较也被支持,但是只能用在 <code class=\"codespan\">=</code> 或 <code class=\"codespan\">!=</code> 上。而 <code class=\"codespan\">&gt;</code>, <code class=\"codespan\">&gt;=</code>, <code class=\"codespan\">&lt;</code>, <code class=\"codespan\">&lt;=</code> 并不支持纯字符串比较,也就是说,这四个操作符的右值,不能是字符串。</li>\n<li><code class=\"codespan\">reg</code> 操作符能提供正则表达式比较。例如, <code class=\"codespan\">{ dimension: &#39;Name&#39;, reg: /\\s+Müller\\s*$/ }</code> 能在 <code class=\"codespan\">&#39;Name&#39;</code> 维度上选出姓 <code class=\"codespan\">&#39;Müller&#39;</code> 的数据项。</li>\n</ul>\n<p><strong>关于逻辑比较:</strong></p>\n<p>我们也支持了逻辑比较操作符 <strong>与或非</strong>( <code class=\"codespan\">and</code> | <code class=\"codespan\">or</code> | <code class=\"codespan\">not</code> ):</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        source: [...]\n    }, {\n        transform: {\n            type: &#39;filter&#39;,\n            config: {\n                // 使用 and 操作符。\n                // 类似地,同样的位置也可以使用 “or” 或 “not”。\n                // 但是注意 “not” 后应该跟一个 {...} 而非 [...] 。\n                and: [\n                    { dimension: &#39;Year&#39;, &#39;=&#39;: 2011 },\n                    { dimension: &#39;Price&#39;, &#39;&gt;=&#39;: 20, &#39;&lt;&#39;: 30 }\n                ]\n            }\n            // 这个表达的是,选出 2011 年价格大于等于 20 但小于 30 的数据项。\n        }\n    }],\n    series: {\n        type: &#39;pie&#39;,\n        datasetIndex: 1\n    }\n};\n</code></pre>\n<p><code class=\"codespan\">and</code>/<code class=\"codespan\">or</code>/<code class=\"codespan\">not</code> 自然可以被嵌套,例如:</p>\n<pre><code class=\"lang-js\">transform: {\n    type: &#39;filter&#39;,\n    config: {\n        or: [{\n            and: [{\n                dimension: &#39;Price&#39;, &#39;&gt;=&#39;: 10, &#39;&lt;&#39;: 20\n            }, {\n                dimension: &#39;Sales&#39;, &#39;&lt;&#39;: 100\n            }, {\n                not: { dimension: &#39;Product&#39;, &#39;=&#39;: &#39;Tofu&#39; }\n            }]\n        }, {\n            and: [{\n                dimension: &#39;Price&#39;, &#39;&gt;=&#39;: 10, &#39;&lt;&#39;: 20\n            }, {\n                dimension: &#39;Sales&#39;, &#39;&lt;&#39;: 100\n            }, {\n                not: { dimension: &#39;Product&#39;, &#39;=&#39;: &#39;Cake&#39; }\n            }]\n        }]\n    }\n}\n</code></pre>\n<p><strong>关于解析器( parser ):</strong></p>\n<p>还可以指定“解析器”( parser )来对值进行解析后再做比较。现在支持的解析器有:</p>\n<ul>\n<li><code class=\"codespan\">parser: &#39;time&#39;</code>:把原始值解析成时间戳( timestamp )后再做比较。这个解析器的行为,和 <code class=\"codespan\">echarts.time.parse</code> 相同,即,当原始值为时间对象( JS <code class=\"codespan\">Date</code> 实例),或者是时间戳,或者是描述时间的字符串(例如 <code class=\"codespan\">&#39;2012-05-12 03:11:22&#39;</code> ),都可以被解析为时间戳,然后就可以基于数值大小进行比较。如果原始数据是其他不可解析为时间戳的值,那么会被解析为 NaN。</li>\n<li><code class=\"codespan\">parser: &#39;trim&#39;</code>:如果原始数据是字符串,则把字符串两端的空格(全角半角)和换行符去掉。如果不是字符串,还保持为原始数据。</li>\n<li><code class=\"codespan\">parser: &#39;number&#39;</code>:强制把原始数据转成数值。如果不能转成有意义的数值,那么转成 <code class=\"codespan\">NaN</code>。在大多数场景下,我们并不需要这个解析器,因为按默认策略,“像数值的字符串”就会被转成数值。但是默认策略比较严格,这个解析器比较宽松,如果我们遇到含有尾缀的字符串(例如 <code class=\"codespan\">&#39;33%&#39;</code>, <code class=\"codespan\">12px</code>),我们需要手动指定 <code class=\"codespan\">parser: &#39;number&#39;</code>,从而去掉尾缀转为数值才能比较。</li>\n</ul>\n<p>这个例子显示了如何使用 <code class=\"codespan\">parser: &#39;time&#39;</code>:</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        source: [\n            [&#39;Product&#39;, &#39;Sales&#39;, &#39;Price&#39;, &#39;Date&#39;],\n            [&#39;Milk Tee&#39;, 311, 21, &#39;2012-05-12&#39;],\n            [&#39;Cake&#39;, 135, 28, &#39;2012-05-22&#39;],\n            [&#39;Latte&#39;, 262, 36, &#39;2012-06-02&#39;],\n            [&#39;Milk Tee&#39;, 359, 21, &#39;2012-06-22&#39;],\n            [&#39;Cake&#39;, 121, 28, &#39;2012-07-02&#39;],\n            [&#39;Latte&#39;, 271, 36, &#39;2012-06-22&#39;],\n            ...\n        ]\n    }, {\n        transform: {\n            type: &#39;filter&#39;,\n            config: {\n                { dimension: &#39;Date&#39;, &#39;&gt;=&#39;: &#39;2012-05&#39;, &#39;&lt;&#39;: &#39;2012-06&#39;, parser: &#39;time&#39; }\n            }\n        }\n    }]\n}\n</code></pre>\n<p><strong>形式化定义:</strong></p>\n<p>最后,我们给出,数据转换器 &quot;filter&quot; 的 config 的形式化定义:</p>\n<pre><code class=\"lang-ts\">type FilterTransform = {\n    type: &#39;filter&#39;;\n    config: ConditionalExpressionOption;\n};\ntype ConditionalExpressionOption =\n    true | false | RelationalExpressionOption | LogicalExpressionOption;\ntype RelationalExpressionOption = {\n    dimension: DimensionName | DimensionIndex;\n    parser?: &#39;time&#39; | &#39;trim&#39; | &#39;number&#39;;\n    lt?: DataValue; // less than\n    lte?: DataValue; // less than or equal\n    gt?: DataValue; // greater than\n    gte?: DataValue; // greater than or equal\n    eq?: DataValue; // equal\n    ne?: DataValue; // not equal\n    &#39;&lt;&#39;?: DataValue; // lt\n    &#39;&lt;=&#39;?: DataValue; // lte\n    &#39;&gt;&#39;?: DataValue; // gt\n    &#39;&gt;=&#39;?: DataValue; // gte\n    &#39;=&#39;?: DataValue; // eq\n    &#39;!=&#39;?: DataValue; // ne\n    &#39;&lt;&gt;&#39;?: DataValue; // ne (SQL style)\n    reg?: RegExp | string; // RegExp\n};\ntype LogicalExpressionOption = {\n    and?: ConditionalExpressionOption[];\n    or?: ConditionalExpressionOption[];\n    not?: ConditionalExpressionOption;\n};\ntype DataValue = string | number | Date;\ntype DimensionName = string;\ntype DimensionIndex = number;\n</code></pre>\n<h2 id=\"-sort\">数据转换器 &quot;sort&quot;</h2>\n<p>&quot;sort&quot; 是另一个内置的数据转换器,用于排序数据。目前主要能用于在类目轴( <code class=\"codespan\">axis.type: &#39;category&#39;</code> )中显示排过序的数据。例如:</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        dimensions: [&#39;name&#39;, &#39;age&#39;, &#39;profession&#39;, &#39;score&#39;, &#39;date&#39;],\n        source: [\n            [&#39; Hannah Krause &#39;, 41, &#39;Engineer&#39;, 314, &#39;2011-02-12&#39;],\n            [&#39;Zhao Qian &#39;, 20, &#39;Teacher&#39;, 351, &#39;2011-03-01&#39;],\n            [&#39; Jasmin Krause &#39;, 52, &#39;Musician&#39;, 287, &#39;2011-02-14&#39;],\n            [&#39;Li Lei&#39;, 37, &#39;Teacher&#39;, 219, &#39;2011-02-18&#39;],\n            [&#39; Karle Neumann &#39;, 25, &#39;Engineer&#39;, 253, &#39;2011-04-02&#39;],\n            [&#39; Adrian Groß&#39;, 19, &#39;Teacher&#39;, null, &#39;2011-01-16&#39;],\n            [&#39;Mia Neumann&#39;, 71, &#39;Engineer&#39;, 165, &#39;2011-03-19&#39;],\n            [&#39; Böhm Fuchs&#39;, 36, &#39;Musician&#39;, 318, &#39;2011-02-24&#39;],\n            [&#39;Han Meimei &#39;, 67, &#39;Engineer&#39;, 366, &#39;2011-03-12&#39;],\n        ]\n    }, {\n        transform: {\n            type: &#39;sort&#39;,\n            // 按分数排序\n            config: { dimension: &#39;score&#39;, order: &#39;asc&#39; }\n        }\n    }],\n    series: {\n        type: &#39;bar&#39;,\n        datasetIndex: 1\n    },\n    ...\n};\n</code></pre>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=data-transform-sort-bar&reset=1&edit=1\" width=\"600\" height=\"350\" ></iframe>\n\n\n\n<p>数据转换器 &quot;sort&quot; 还有一些额外的功能:</p>\n<ul>\n<li>可以多重排序,多个维度一起排序。见下面的例子。</li>\n<li>排序规则是这样的:<ul>\n<li>默认按照数值大小排序。其中,“可转为数值的字符串”也被转换成数值,和其他数值一起按大小排序。</li>\n<li>对于其他“不能转为数值的字符串”,也能在它们之间按字符串进行排序。这个特性有助于这种场景:把相同标签的数据项排到一起,尤其是当多个维度共同排序时。见下面的例子。</li>\n<li>当“数值及可转为数值的字符串”和“不能转为数值的字符串”进行排序时,或者它们和“其他类型的值”进行比较时,它们本身是不知如何进行比较的。那么我们称呼“后者”为“incomparable”,并且可以设置 <code class=\"codespan\">incomparable: &#39;min&#39; | &#39;max&#39;</code> 来指定一个“incomparable”在这个比较中是最大还是最小,从而能使它们能产生比较结果。这个设定的用途,比如可以是,决定空值(例如 <code class=\"codespan\">null</code>, <code class=\"codespan\">undefined</code>, <code class=\"codespan\">NaN</code>, <code class=\"codespan\">&#39;&#39;</code>, <code class=\"codespan\">&#39;-&#39;</code>)在排序的头还是尾。</li>\n</ul>\n</li>\n<li>过滤器 <code class=\"codespan\">filter: &#39;time&#39; | &#39;trim&#39; | &#39;number&#39;</code> 可以被使用,和数据转换器 &quot;filter&quot; 中的情况一样。<ul>\n<li>如果要对时间进行排序(例如,值为 JS <code class=\"codespan\">Date</code> 实例或者时间字符串如 <code class=\"codespan\">&#39;2012-03-12 11:13:54&#39;</code>),我们需要声明 <code class=\"codespan\">parser: &#39;time&#39;</code>。</li>\n<li>如果需要对有后缀的数值进行排序(如 <code class=\"codespan\">&#39;33%&#39;</code>, <code class=\"codespan\">&#39;16px&#39;</code>)我们需要声明 <code class=\"codespan\">parser: &#39;number&#39;</code>。</li>\n</ul>\n</li>\n</ul>\n<p>这是一个“多维度排序”的例子。</p>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        dimensions: [&#39;name&#39;, &#39;age&#39;, &#39;profession&#39;, &#39;score&#39;, &#39;date&#39;],\n        source: [\n            [&#39; Hannah Krause &#39;, 41, &#39;Engineer&#39;, 314, &#39;2011-02-12&#39;],\n            [&#39;Zhao Qian &#39;, 20, &#39;Teacher&#39;, 351, &#39;2011-03-01&#39;],\n            [&#39; Jasmin Krause &#39;, 52, &#39;Musician&#39;, 287, &#39;2011-02-14&#39;],\n            [&#39;Li Lei&#39;, 37, &#39;Teacher&#39;, 219, &#39;2011-02-18&#39;],\n            [&#39; Karle Neumann &#39;, 25, &#39;Engineer&#39;, 253, &#39;2011-04-02&#39;],\n            [&#39; Adrian Groß&#39;, 19, &#39;Teacher&#39;, null, &#39;2011-01-16&#39;],\n            [&#39;Mia Neumann&#39;, 71, &#39;Engineer&#39;, 165, &#39;2011-03-19&#39;],\n            [&#39; Böhm Fuchs&#39;, 36, &#39;Musician&#39;, 318, &#39;2011-02-24&#39;],\n            [&#39;Han Meimei &#39;, 67, &#39;Engineer&#39;, 366, &#39;2011-03-12&#39;],\n        ]\n    }, {\n        transform: {\n            type: &#39;sort&#39;,\n            config: [\n                // 对两个维度按声明的优先级分别排序。\n                { dimension: &#39;profession&#39;, order: &#39;desc&#39; },\n                { dimension: &#39;score&#39;, order: &#39;desc&#39; }\n            ]\n        }\n    }],\n    series: {\n        type: &#39;bar&#39;,\n        datasetIndex: 1\n    },\n    ...\n};\n</code></pre>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/data-transform-multiple-sort-bar&reset=1&edit=1\" width=\"600\" height=\"350\" ></iframe>\n\n\n\n<p>最后,我们给出数据转换器 &quot;sort&quot; 的 config 的形式化定义。</p>\n<pre><code class=\"lang-ts\">type SortTransform = {\n    type: &#39;filter&#39;;\n    config: OrderExpression | OrderExpression[];\n};\ntype OrderExpression = {\n    dimension: DimensionName | DimensionIndex;\n    order: &#39;asc&#39; | &#39;desc&#39;;\n    incomparable?: &#39;min&#39; | &#39;max&#39;;\n    parser?: &#39;time&#39; | &#39;trim&#39; | &#39;number&#39;;\n};\ntype DimensionName = string;\ntype DimensionIndex = number;\n</code></pre>\n<h2 id=\"-\">使用外部的数据转换器</h2>\n<p>除了上述的内置的数据转换器外,我们也可以使用外部的数据转换器。外部数据转换器能提供或自己定制更丰富的功能。下面的例子中,我们使用第三方库 <a href=\"https://github.com/ecomfe/echarts-stat\" target=\"_blank\">ecStat</a> 提供的数据转换器。</p>\n<p>生成数据的回归线:</p>\n<pre><code class=\"lang-js\">// 首先要注册外部数据转换器。\necharts.registerTransform(ecStatTransform(ecStat).regression);\n</code></pre>\n<pre><code class=\"lang-js\">option = {\n    dataset: [{\n        source: rawData\n    }, {\n        transform: {\n            // 引用注册的数据转换器。\n            // 注意,每个外部的数据转换器,都有名空间(如 &#39;ecStat:xxx&#39;,&#39;ecStat&#39; 是名空间)。\n            // 而内置数据转换器(如 &#39;filter&#39;, &#39;sort&#39;)没有名空间。\n            type: &#39;ecStat:regression&#39;,\n            config: {\n                // 这里是此外部数据转换器所需的参数。\n                method: &#39;exponential&#39;\n            }\n        }\n    }],\n    xAxis: { type: &#39;category&#39; },\n    yAxis: {},\n    series: [{\n        name: &#39;scatter&#39;,\n        type: &#39;scatter&#39;,\n        datasetIndex: 0\n    }, {\n        name: &#39;regression&#39;,\n        type: &#39;line&#39;,\n        symbol: &#39;none&#39;,\n        datasetIndex: 1\n    }]\n};\n</code></pre>\n<p>一些使用外部转换器的例子:</p>\n<ul>\n<li><a href=\"https://echarts.apache.org/examples/zh/editor.html?c=data-transform-aggregate&amp;edit=1&amp;reset=1\" target=\"_blank\">聚集</a></li>\n<li><a href=\"https://echarts.apache.org/examples/zh/editor.html?c=bar-histogram&amp;edit=1&amp;reset=1\" target=\"_blank\">直方图</a></li>\n<li><a href=\"https://echarts.apache.org/examples/zh/editor.html?c=scatter-clustering&amp;edit=1&amp;reset=1\" target=\"_blank\">简单聚类</a></li>\n<li><a href=\"https://echarts.apache.org/examples/zh/editor.html?c=scatter-linear-regression&amp;edit=1&amp;reset=1\" target=\"_blank\">线性回归线</a></li>\n<li><a href=\"https://echarts.apache.org/examples/zh/editor.html?c=scatter-exponential-regression&amp;edit=1&amp;reset=1\" target=\"_blank\">指数回归线</a></li>\n<li><a href=\"https://echarts.apache.org/examples/zh/editor.html?c=scatter-logarithmic-regression&amp;edit=1&amp;reset=1\" target=\"_blank\">对数回归线</a></li>\n<li><a href=\"https://echarts.apache.org/examples/zh/editor.html?c=scatter-polynomial-regression&amp;edit=1&amp;reset=1\" target=\"_blank\">多项式回归线</a></li>\n</ul>\n"},"在图表中加入交互组件":{"type":["*"],"description":"<p>除了图表外 Apache ECharts<sup>TM</sup> 中,提供了很多交互组件。例如:</p>\n<p><code class=\"codespan\">图例组件</code> <a href=\"option.html#legend\" target=\"_blank\">legend</a>、<code class=\"codespan\">标题组件</code> <a href=\"option.html#title\" target=\"_blank\">title</a>、<code class=\"codespan\">视觉映射组件</code> <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a>、<code class=\"codespan\">数据区域缩放组件</code> <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a>、<code class=\"codespan\">时间线组件</code> <a href=\"option.html#timeline\" target=\"_blank\">timeline</a></p>\n<p>下面以 <code class=\"codespan\">数据区域缩放组件</code> <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a> 为例,介绍如何加入这种组件。</p>\n<h2 id=\"-datazoom-\">数据区域缩放组件(dataZoom)介绍</h2>\n<p>『概览数据整体,按需关注数据细节』是数据可视化的基本交互需求。<code class=\"codespan\">dataZoom</code> 组件能够在直角坐标系(<a href=\"option.html#grid\" target=\"_blank\">grid</a>)、极坐标系(<a href=\"option.html#polar\" target=\"_blank\">polar</a>)中实现这一功能。</p>\n<p><strong>如下例子:</strong></p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/scatter-dataZoom-all&edit=1&reset=1\" width=\"600\" height=\"400\" ></iframe>\n\n\n<p><br></p>\n<ul>\n<li><code class=\"codespan\">dataZoom</code> 组件是对 <code class=\"codespan\">数轴(axis)</code> 进行『数据窗口缩放』『数据窗口平移』操作。</li>\n</ul>\n<blockquote>\n<p>可以通过 <a href=\"option.html#dataZoom.xAxisIndex\" target=\"_blank\">dataZoom.xAxisIndex</a> 或 <a href=\"option.html#dataZoom.yAxisIndex\" target=\"_blank\">dataZoom.yAxisIndex</a> 来指定 <code class=\"codespan\">dataZoom</code> 控制哪个或哪些数轴。</p>\n</blockquote>\n<ul>\n<li><p><code class=\"codespan\">dataZoom</code> 组件可同时存在多个,起到共同控制的作用。控制同一个数轴的组件,会自动联动。下面例子中会详细说明。</p>\n</li>\n<li><p><code class=\"codespan\">dataZoom</code> 的运行原理是通过『数据过滤』来达到『数据窗口缩放』的效果。</p>\n<p>  数据过滤模式的设置不同,效果也不同,参见:<a href=\"option.html#dataZoom.filterMode\" target=\"_blank\">dataZoom.filterMode</a>。</p>\n</li>\n<li><p><code class=\"codespan\">dataZoom</code> 的数据窗口范围的设置,目前支持两种形式:</p>\n<ul>\n<li><p>百分比形式:参见 <a href=\"option.html#dataZoom.start\" target=\"_blank\">dataZoom.start</a> 和 <a href=\"option.html#dataZoom.end\" target=\"_blank\">dataZoom.end</a>。</p>\n</li>\n<li><p>绝对数值形式:参见 <a href=\"option.html#dataZoom.startValue\" target=\"_blank\">dataZoom.startValue</a> 和 <a href=\"option.html#dataZoom.endValue\" target=\"_blank\">dataZoom.endValue</a>。</p>\n</li>\n</ul>\n</li>\n</ul>\n<p><strong>dataZoom 组件现在支持几种子组件:</strong></p>\n<ul>\n<li><p><a href=\"option.html#dataZoom-inside\" target=\"_blank\">内置型数据区域缩放组件(dataZoomInside)</a>:内置于坐标系中。</p>\n</li>\n<li><p><a href=\"option.html#dataZoom-slider\" target=\"_blank\">滑动条型数据区域缩放组件(dataZoomSlider)</a>:有单独的滑动条操作。</p>\n</li>\n<li><p><a href=\"option.html#toolbox.feature.dataZoom\" target=\"_blank\">框选型数据区域缩放组件(dataZoomSelect)</a>:全屏的选框进行数据区域缩放。入口和配置项均在 <code class=\"codespan\">toolbox</code>中。</p>\n</li>\n</ul>\n<h2 id=\"-datazoom-\">在代码加入 dataZoom 组件</h2>\n<p>先只在对单独一个横轴,加上 dataZoom 组件,代码示例如下:</p>\n<pre><code class=\"lang-javascript\">\noption = {\n    xAxis: {\n        type: &#39;value&#39;\n    },\n    yAxis: {\n        type: &#39;value&#39;\n    },\n    dataZoom: [\n        {   // 这个dataZoom组件,默认控制x轴。\n            type: &#39;slider&#39;, // 这个 dataZoom 组件是 slider 型 dataZoom 组件\n            start: 10,      // 左边在 10% 的位置。\n            end: 60         // 右边在 60% 的位置。\n        }\n    ],\n    series: [\n        {\n            type: &#39;scatter&#39;, // 这是个『散点图』\n            itemStyle: {\n                opacity: 0.8\n            },\n            symbolSize: function (val) {\n                return val[2] * 40;\n            },\n            data: [[&quot;14.616&quot;,&quot;7.241&quot;,&quot;0.896&quot;],[&quot;3.958&quot;,&quot;5.701&quot;,&quot;0.955&quot;],[&quot;2.768&quot;,&quot;8.971&quot;,&quot;0.669&quot;],[&quot;9.051&quot;,&quot;9.710&quot;,&quot;0.171&quot;],[&quot;14.046&quot;,&quot;4.182&quot;,&quot;0.536&quot;],[&quot;12.295&quot;,&quot;1.429&quot;,&quot;0.962&quot;],[&quot;4.417&quot;,&quot;8.167&quot;,&quot;0.113&quot;],[&quot;0.492&quot;,&quot;4.771&quot;,&quot;0.785&quot;],[&quot;7.632&quot;,&quot;2.605&quot;,&quot;0.645&quot;],[&quot;14.242&quot;,&quot;5.042&quot;,&quot;0.368&quot;]]\n        }\n    ]\n}\n</code></pre>\n<p>可以看到如下结果:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/scatter-tutorial-dataZoom-1&edit=1&reset=1\" width=\"600\" height=\"300\" ></iframe>\n\n\n<p><br></p>\n<p>上面的图只能拖动 dataZoom 组件导致窗口变化。如果想在坐标系内进行拖动,以及用滚轮(或移动触屏上的两指滑动)进行缩放,那么要再加上一个 inside 型的 dataZoom组件。直接在上面的 <code class=\"codespan\">option.dataZoom</code> 中增加即可:</p>\n<pre><code class=\"lang-javascript\">option = {\n    ...,\n    dataZoom: [\n        {   // 这个dataZoom组件,默认控制x轴。\n            type: &#39;slider&#39;, // 这个 dataZoom 组件是 slider 型 dataZoom 组件\n            start: 10,      // 左边在 10% 的位置。\n            end: 60         // 右边在 60% 的位置。\n        },\n        {   // 这个dataZoom组件,也控制x轴。\n            type: &#39;inside&#39;, // 这个 dataZoom 组件是 inside 型 dataZoom 组件\n            start: 10,      // 左边在 10% 的位置。\n            end: 60         // 右边在 60% 的位置。\n        }\n    ],\n    ...\n}\n</code></pre>\n<p>可以看到如下结果(能在坐标系中进行滑动,以及使用滚轮缩放了):</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/scatter-tutorial-dataZoom-2&edit=1&reset=1\" width=\"600\" height=\"300\" ></iframe>\n\n\n\n<p><br></p>\n<p>如果想 y 轴也能够缩放,那么在 y 轴上也加上 dataZoom 组件:</p>\n<pre><code class=\"lang-javascript\">option = {\n    ...,\n    dataZoom: [\n        {\n            type: &#39;slider&#39;,\n            xAxisIndex: 0,\n            start: 10,\n            end: 60\n        },\n        {\n            type: &#39;inside&#39;,\n            xAxisIndex: 0,\n            start: 10,\n            end: 60\n        },\n        {\n            type: &#39;slider&#39;,\n            yAxisIndex: 0,\n            start: 30,\n            end: 80\n        },\n        {\n            type: &#39;inside&#39;,\n            yAxisIndex: 0,\n            start: 30,\n            end: 80\n        }\n    ],\n    ...\n}\n</code></pre>\n<p>可以看到如下结果:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/scatter-tutorial-dataZoom-3&edit=1&reset=1\" width=\"600\" height=\"300\" ></iframe>\n\n\n\n\n\n\n\n"},"移动端自适应":{"type":["*"],"description":"<p>Apache ECharts<sup>TM</sup> 工作在用户指定高宽的 DOM 节点(容器)中。ECharts 的『组件』和『系列』都在这个 DOM 节点中,每个节点都可以由用户指定位置。图表库内部并不适宜实现 DOM 文档流布局,因此采用类似绝对布局的简单容易理解的布局方式。但是有时候容器尺寸极端时,这种方式并不能自动避免组件重叠的情况,尤其在移动端小屏的情况下。</p>\n<p>另外,有时会出现一个图表需要同时在PC、移动端上展现的场景。这需要 ECharts 内部组件随着容器尺寸变化而变化的能力。</p>\n<p>为了解决这个问题,ECharts 完善了组件的定位设置,并且实现了类似 <a href=\"https://www.w3.org/TR/css3-mediaqueries/\" target=\"_blank\">CSS Media Query</a> 的自适应能力。</p>\n<h2 id=\"echarts-\">ECharts组件的定位和布局</h2>\n<p>大部分『组件』和『系列』会遵循两种定位方式:</p>\n<p><br>\n<strong>left/right/top/bottom/width/height 定位方式:</strong></p>\n<p>这六个量中,每个量都可以是『绝对值』或者『百分比』或者『位置描述』。</p>\n<ul>\n<li><p>绝对值</p>\n<p>  单位是浏览器像素(px),用 <code class=\"codespan\">number</code> 形式书写(不写单位)。例如 <code class=\"codespan\">{left: 23, height: 400}</code>。</p>\n</li>\n<li><p>百分比</p>\n<p>  表示占 DOM 容器高宽的百分之多少,用 <code class=\"codespan\">string</code> 形式书写。例如 <code class=\"codespan\">{right: &#39;30%&#39;, bottom: &#39;40%&#39;}</code>。</p>\n</li>\n<li><p>位置描述</p>\n<ul>\n<li>可以设置 <code class=\"codespan\">left: &#39;center&#39;</code>,表示水平居中。</li>\n<li>可以设置 <code class=\"codespan\">top: &#39;middle&#39;</code>,表示垂直居中。</li>\n</ul>\n</li>\n</ul>\n<p>这六个量的概念,和 CSS 中六个量的概念类似:</p>\n<ul>\n<li>left:距离 DOM 容器左边界的距离。</li>\n<li>right:距离 DOM 容器右边界的距离。</li>\n<li>top:距离 DOM 容器上边界的距离。</li>\n<li>bottom:距离 DOM 容器下边界的距离。</li>\n<li>width:宽度。</li>\n<li>height:高度。</li>\n</ul>\n<p>在横向,<code class=\"codespan\">left</code>、<code class=\"codespan\">right</code>、<code class=\"codespan\">width</code> 三个量中,只需两个量有值即可,因为任两个量可以决定组件的位置和大小,例如 <code class=\"codespan\">left</code> 和 <code class=\"codespan\">right</code> 或者 <code class=\"codespan\">right</code> 和 <code class=\"codespan\">width</code> 都可以决定组件的位置和大小。\n纵向,<code class=\"codespan\">top</code>、<code class=\"codespan\">bottom</code>、<code class=\"codespan\">height</code> 三个量,和横向类同不赘述。</p>\n<p><br>\n<strong><code class=\"codespan\">center</code> / <code class=\"codespan\">radius</code> 定位方式:</strong></p>\n<ul>\n<li><p><code class=\"codespan\">center</code></p>\n<p>  是一个数组,表示 <code class=\"codespan\">[x, y]</code>,其中,<code class=\"codespan\">x</code>、<code class=\"codespan\">y</code>可以是『绝对值』或者『百分比』,含义和前述相同。</p>\n</li>\n<li><p><code class=\"codespan\">radius</code></p>\n<p>  是一个数组,表示 <code class=\"codespan\">[内半径, 外半径]</code>,其中,内外半径可以是『绝对值』或者『百分比』,含义和前述相同。</p>\n<p>  在自适应容器大小时,百分比设置是很有用的。</p>\n</li>\n</ul>\n<p><br>\n<strong>横向(horizontal)和纵向(vertical)</strong></p>\n<p>ECharts的『外观狭长』型的组件(如 <code class=\"codespan\">legend</code>、<code class=\"codespan\">visualMap</code>、<code class=\"codespan\">dataZoom</code>、<code class=\"codespan\">timeline</code>等),大多提供了『横向布局』『纵向布局』的选择。例如,在细长的移动端屏幕上,可能适合使用『纵向布局』;在PC宽屏上,可能适合使用『横向布局』。</p>\n<p>横纵向布局的设置,一般在『组件』或者『系列』的 <code class=\"codespan\">orient</code> 或者 <code class=\"codespan\">layout</code> 配置项上,设置为 <code class=\"codespan\">&#39;horizontal&#39;</code> 或者 <code class=\"codespan\">&#39;vertical&#39;</code>。</p>\n<p><br>\n<strong>与 ECharts2 的兼容:</strong></p>\n<p>ECharts2 中的 <code class=\"codespan\">x/x2/y/y2</code> 的命名方式仍被兼容,对应于 <code class=\"codespan\">left/right/top/bottom</code>。但是建议写 <code class=\"codespan\">left/right/top/bottom</code>。</p>\n<p>位置描述中,为兼容 ECharts2,可以支持一些看起来略奇怪的设置:<code class=\"codespan\">left: &#39;right&#39;</code>、<code class=\"codespan\">left: &#39;left&#39;</code>、<code class=\"codespan\">top: &#39;bottom&#39;</code>、<code class=\"codespan\">top: &#39;top&#39;</code>。这些语句分别等效于:<code class=\"codespan\">right: 0</code>、<code class=\"codespan\">left: 0</code>、<code class=\"codespan\">bottom: 0</code>、<code class=\"codespan\">top: 0</code>,写成后者就不奇怪了。</p>\n<h2 id=\"media-query\">Media Query</h2>\n<p><a href=\"https://www.w3.org/TR/css3-mediaqueries/#media1\" target=\"_blank\">Media Query</a> 提供了『随着容器尺寸改变而改变』的能力。</p>\n<p>如下例子,可尝试拖动<strong>右下角的圆点</strong>,随着尺寸变化,legend 和 系列会自动改变布局位置和方式。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/pie-media&edit=1&reset=1\" width=\"750\" height=\"600\" ></iframe>\n\n\n<p>要在 option 中设置 Media Query 须遵循如下格式:</p>\n<pre><code class=\"lang-javascript\">option = {\n    // 这里是基本的『原子option』。\n    title: {...},\n    legend: {...},\n    series: [{...}, {...}, ...],\n    ...,\n    media: [ // 这里定义了 media query 的逐条规则。\n        {\n            query: {...},   // 这里写规则。\n            option: {       // 这里写此规则满足下的option。\n                legend: {...},\n                ...\n            }\n        },\n        {\n            query: {...},   // 第二个规则。\n            option: {       // 第二个规则对应的option。\n                legend: {...},\n                ...\n            }\n        },\n        {                   // 这条里没有写规则,表示『默认』,\n            option: {       // 即所有规则都不满足时,采纳这个option。\n                legend: {...},\n                ...\n            }\n        }\n    ]\n};\n</code></pre>\n<p>上面的例子中,<code class=\"codespan\">baseOption</code>、以及 <code class=\"codespan\">media</code> 每个 option 都是『原子 option』,即普通的含有各组件、系列定义的 option。而由『原子option』组合成的整个 option,我们称为『复合 option』。<code class=\"codespan\">baseOption</code> 是必然被使用的,此外,满足了某个 <code class=\"codespan\">query</code> 条件时,对应的 option 会被使用 <code class=\"codespan\">chart.mergeOption()</code> 来 merge 进去。</p>\n<p><strong>query:</strong></p>\n<p>每个 <code class=\"codespan\">query</code> 类似于这样:</p>\n<pre><code class=\"lang-javascript\">{\n    minWidth: 200,\n    maxHeight: 300,\n    minAspectRatio: 1.3\n}\n</code></pre>\n<p>现在支持三个属性:<code class=\"codespan\">width</code>、<code class=\"codespan\">height</code>、<code class=\"codespan\">aspectRatio</code>(长宽比)。每个属性都可以加上 <code class=\"codespan\">min</code> 或 <code class=\"codespan\">max</code> 前缀。比如,<code class=\"codespan\">minWidth: 200</code> 表示『大于等于200px宽度』。两个属性一起写表示『并且』,比如:<code class=\"codespan\">{minWidth: 200, maxHeight: 300}</code> 表示『大于等于200px宽度,并且小于等于300px高度』。</p>\n<p><strong>option:</strong></p>\n<p><code class=\"codespan\">media</code>中的 option 既然是『原子 option』,理论上可以写任何 option 的配置项。但是一般我们只写跟布局定位相关的,例如截取上面例子中的一部分 query option:</p>\n<pre><code class=\"lang-javascript\">media: [\n    ...,\n    {\n        query: {\n            maxAspectRatio: 1           // 当长宽比小于1时。\n        },\n        option: {\n            legend: {                   // legend 放在底部中间。\n                right: &#39;center&#39;,\n                bottom: 0,\n                orient: &#39;horizontal&#39;    // legend 横向布局。\n            },\n            series: [                   // 两个饼图左右布局。\n                {\n                    radius: [20, &#39;50%&#39;],\n                    center: [&#39;50%&#39;, &#39;30%&#39;]\n                },\n                {\n                    radius: [30, &#39;50%&#39;],\n                    center: [&#39;50%&#39;, &#39;70%&#39;]\n                }\n            ]\n        }\n    },\n    {\n        query: {\n            maxWidth: 500               // 当容器宽度小于 500 时。\n        },\n        option: {\n            legend: {\n                right: 10,              // legend 放置在右侧中间。\n                top: &#39;15%&#39;,\n                orient: &#39;vertical&#39;      // 纵向布局。\n            },\n            series: [                   // 两个饼图上下布局。\n                {\n                    radius: [20, &#39;50%&#39;],\n                    center: [&#39;50%&#39;, &#39;30%&#39;]\n                },\n                {\n                    radius: [30, &#39;50%&#39;],\n                    center: [&#39;50%&#39;, &#39;75%&#39;]\n                }\n            ]\n        }\n    },\n    ...\n]\n</code></pre>\n<p><strong>多个 query 被满足时的优先级:</strong></p>\n<p>注意,可以有多个 <code class=\"codespan\">query</code> 同时被满足,会都被 <code class=\"codespan\">mergeOption</code>,定义在后的后被 merge(即优先级更高)。</p>\n<p><strong>默认 query:</strong></p>\n<p>如果 <code class=\"codespan\">media</code> 中有某项不写 <code class=\"codespan\">query</code>,则表示『默认值』,即所有规则都不满足时,采纳这个option。</p>\n<p><strong>容器大小实时变化时的注意事项:</strong></p>\n<p>在不少情况下,并不需要容器DOM节点任意随着拖拽变化大小,而是只是根据不同终端设置几个典型尺寸。</p>\n<p>但是如果容器DOM节点需要能任意随着拖拽变化大小,那么目前使用时需要注意这件事:某个配置项,如果在某一个 <code class=\"codespan\">query option</code> 中出现,那么在其他 <code class=\"codespan\">query option</code> 中也必须出现,否则不能够回归到原来的状态。(<code class=\"codespan\">left/right/top/bottom/width/height</code> 不受这个限制。)</p>\n<p><strong>『复合 option』 中的 <code class=\"codespan\">media</code> 不支持 merge</strong></p>\n<p>也就是说,当第二(或三、四、五 ...)次 <code class=\"codespan\">chart.setOption(rawOption)</code> 时,如果 <code class=\"codespan\">rawOption</code> 是 <code class=\"codespan\">复合option</code>(即包含 <code class=\"codespan\">media</code> 列表),那么新的 <code class=\"codespan\">rawOption.media</code> 列表不会和老的 <code class=\"codespan\">media</code> 列表进行 merge,而是简单替代。当然,<code class=\"codespan\">baseOption</code> 仍然会正常和老的 option 进行merge。</p>\n<p>其实,很少有场景需要使用『复合 option』来多次 <code class=\"codespan\">setOption</code>,而我们推荐的做法是,使用 mediaQuery 时,第一次setOption使用『复合 option』,后面 <code class=\"codespan\">setOption</code> 时仅使用 『原子 option』,也就是仅仅用 setOption 来改变 <code class=\"codespan\">baseOption</code>。</p>\n<p><br>\n最后看一个和时间轴结合的例子:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/bar-media-timeline&edit=1&reset=1\" width=\"750\" height=\"700\" ></iframe>\n\n\n\n\n"},"数据的视觉映射":{"type":["*"],"description":"<p>数据可视化是 <strong>数据</strong> 到 <strong>视觉元素</strong> 的映射过程(这个过程也可称为视觉编码,视觉元素也可称为视觉通道)。</p>\n<p>Apache ECharts<sup>TM</sup> 的每种图表本身就内置了这种映射过程,比如折线图把数据映射到『线』,柱状图把数据映射到『长度』。一些更复杂的图表,如 <code class=\"codespan\">graph</code>、<code class=\"codespan\">事件河流图</code>、<code class=\"codespan\">treemap</code> 也都会做出他们内置的映射。</p>\n<p>此外,ECharts 还提供了 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap 组件</a> 来提供通用的视觉映射。<code class=\"codespan\">visualMap</code> 组件中可以使用的视觉元素有:<br>\n<code class=\"codespan\">图形类别(symbol)</code>、<code class=\"codespan\">图形大小(symbolSize)</code><br>\n<code class=\"codespan\">颜色(color)</code>、<code class=\"codespan\">透明度(opacity)</code>、<code class=\"codespan\">颜色透明度(colorAlpha)</code>、<br>\n<code class=\"codespan\">颜色明暗度(colorLightness)</code>、<code class=\"codespan\">颜色饱和度(colorSaturation)</code>、<code class=\"codespan\">色调(colorHue)</code></p>\n<p>下面对 <code class=\"codespan\">visualMap</code> 组件的使用方式进行简要的介绍。</p>\n<h2 id=\"-\">数据和维度</h2>\n<p>ECharts中的数据,一般存放于 <a href=\"option.html#series.data\" target=\"_blank\">series.data</a> 中。根据图表类型不同,数据的具体形式也可能有些许差异。比如可能是『线性表』、『树』、『图』等。但他们都有个共性:都是『数据项(dataItem)』的集合。每个数据项含有『数据值(value)』和其他信息(如果需要的话)。每个数据值,可以是单一的数值(一维)或者一个数组(多维)。</p>\n<p>例如,<a href=\"option.html#series.data\" target=\"_blank\">series.data</a> 最常见的形式,是『线性表』,即一个普通数组:</p>\n<pre><code class=\"lang-javascript\">series: {\n    data: [\n        {       // 这里每一个项就是数据项(dataItem)\n            value: 2323, // 这是数据项的数据值(value)\n            itemStyle: {...}\n        },\n        1212,   // 也可以直接是 dataItem 的 value,这更常见。\n        2323,   // 每个 value 都是『一维』的。\n        4343,\n        3434\n    ]\n}\n</code></pre>\n<pre><code class=\"lang-javascript\">series: {\n    data: [\n        {                        // 这里每一个项就是数据项(dataItem)\n            value: [3434, 129,  &#39;圣马力诺&#39;], // 这是数据项的数据值(value)\n            itemStyle: {...}\n        },\n        [1212, 5454, &#39;梵蒂冈&#39;],   // 也可以直接是 dataItem 的 value,这更常见。\n        [2323, 3223, &#39;瑙鲁&#39;],     // 每个 value 都是『三维』的,每列是一个维度。\n        [4343, 23,   &#39;图瓦卢&#39;]    // 假如是『气泡图』,常见第一维度映射到x轴,\n                                 // 第二维度映射到y轴,\n                                 // 第三维度映射到气泡半径(symbolSize)\n    ]\n}\n</code></pre>\n<p>在图表中,往往默认把 value 的前一两个维度进行映射,比如取第一个维度映射到x轴,取第二个维度映射到y轴。如果想要把更多的维度展现出来,可以借助 <code class=\"codespan\">visualMap</code> 。最常见的情况,<a href=\"option.html#series-scatter\" target=\"_blank\">气泡图(scatter)</a> 使用半径展现了第三个维度。</p>\n<h2 id=\"visualmap-\">visualMap 组件</h2>\n<p>visualMap 组件定义了把数据的『哪个维度』映射到『什么视觉元素上』。</p>\n<p>现在提供如下两种类型的visualMap组件,通过 <a href=\"option.html#visualMap.type\" target=\"_blank\">visualMap.type</a> 来区分。</p>\n<p>其定义结构例如:</p>\n<pre><code class=\"lang-javascript\">option = {\n    visualMap: [ // 可以同时定义多个 visualMap 组件。\n        { // 第一个 visualMap 组件\n            type: &#39;continuous&#39;, // 定义为连续型 visualMap\n            ...\n        },\n        { // 第二个 visualMap 组件\n            type: &#39;piecewise&#39;, // 定义为分段型 visualMap\n            ...\n        }\n    ],\n    ...\n};\n</code></pre>\n<p><a href=\"option.html#visualMap-continuous\" target=\"_blank\">连续型(visualMapContinuous)</a></p>\n<p><a href=\"option.html#visualMap-piecewise\" target=\"_blank\">分段型(visualMapPiecewise)</a>:</p>\n<p>分段型视觉映射组件(visualMapPiecewise),有三种模式:</p>\n<ul>\n<li>连续型数据平均分段: 依据 <a href=\"option.html#visualMap-piecewise.splitNumber\" target=\"_blank\">visualMap-piecewise.splitNumber</a> 来自动平均分割成若干块。</li>\n<li>连续型数据自定义分段: 依据 <a href=\"option.html#visualMap-piecewise.pieces\" target=\"_blank\">visualMap-piecewise.pieces</a> 来定义每块范围。</li>\n<li>离散数据(类别性数据): 类别定义在 <a href=\"option.html#visualMap-piecewise.categories\" target=\"_blank\">visualMap-piecewise.categories</a> 中。</li>\n</ul>\n<p><br>\n<strong>视觉映射方式的配置</strong></p>\n<p>既然是『数据』到『视觉元素』的映射,<code class=\"codespan\">visualMap</code> 中可以指定数据的『哪个维度』(参见<a href=\"#visualMap.dimension\">visualMap.dimension</a>)映射到哪些『视觉元素』(参见 <a href=\"option.html#visualMap.inRange\" target=\"_blank\">visualMap.inRange</a> 和 <a href=\"option.html#visualMap.outOfRange\" target=\"_blank\">visualMap.outOfRange</a>)中。</p>\n<p>例一:</p>\n<pre><code class=\"lang-javascript\">option = {\n    visualMap: [\n        {\n            type: &#39;piecewise&#39;,\n            min: 0,\n            max: 5000,\n            dimension: 3,       // series.data 的第四个维度(即 value[3])被映射\n            seriesIndex: 4,     // 对第四个系列进行映射。\n            inRange: {          // 选中范围中的视觉配置\n                color: [&#39;blue&#39;, &#39;#121122&#39;, &#39;red&#39;], // 定义了图形颜色映射的颜色列表,\n                                                    // 数据最小值映射到&#39;blue&#39;上,\n                                                    // 最大值映射到&#39;red&#39;上,\n                                                    // 其余自动线性计算。\n                symbolSize: [30, 100]               // 定义了图形尺寸的映射范围,\n                                                    // 数据最小值映射到30上,\n                                                    // 最大值映射到100上,\n                                                    // 其余自动线性计算。\n            },\n            outOfRange: {       // 选中范围外的视觉配置\n                symbolSize: [30, 100]\n            }\n        },\n        ...\n    ]\n};\n</code></pre>\n<p>例二:</p>\n<pre><code class=\"lang-javascript\">option = {\n    visualMap: [\n        {\n            ...,\n            inRange: {          // 选中范围中的视觉配置\n                colorLightness: [0.2, 1], // 映射到明暗度上。也就是对本来的颜色进行明暗度处理。\n                                          // 本来的颜色可能是从全局色板中选取的颜色,visualMap组件并不关心。\n                symbolSize: [30, 100]\n            },\n            ...\n        },\n        ...\n    ]\n};\n</code></pre>\n<p>更多详情,参见 <a href=\"option.html#visualMap.inRange\" target=\"_blank\">visualMap.inRange</a> 和 <a href=\"option.html#visualMap.outOfRange\" target=\"_blank\">visualMap.outOfRange</a>。</p>\n"},"ECharts 中的事件和行为":{"type":["*"],"description":"<p>在 Apache ECharts<sup>TM</sup> 的图表中用户的操作将会触发相应的事件。开发者可以监听这些事件,然后通过回调函数做相应的处理,比如跳转到一个地址,或者弹出对话框,或者做数据下钻等等。</p>\n<p>在 ECharts 3 中绑定事件跟 2 一样都是通过 <a href=\"api.html#EChartsInstance.on\" target=\"_blank\">on</a> 方法,但是事件名称比 2 更加简单了。ECharts 3 中,事件名称对应 DOM 事件名称,均为小写的字符串,如下是一个绑定点击操作的示例。</p>\n<pre><code class=\"lang-js\">myChart.on(&#39;click&#39;, function (params) {\n    // 控制台打印数据的名称\n    console.log(params.name);\n});\n</code></pre>\n<p>在 ECharts 中事件分为两种类型,一种是用户鼠标操作点击,或者 hover 图表的图形时触发的事件,还有一种是用户在使用可以交互的组件后触发的行为事件,例如在切换图例开关时触发的 <a href=\"api.html#events.legendselectchanged\" target=\"_blank\">&#39;legendselectchanged&#39;</a> 事件(这里需要注意切换图例开关是不会触发<code class=\"codespan\">&#39;legendselected&#39;</code>事件的),数据区域缩放时触发的 <a href=\"api.html#events.legendselectchanged\" target=\"_blank\">&#39;datazoom&#39;</a> 事件等等。</p>\n<h2 id=\"-\">鼠标事件的处理</h2>\n<p>ECharts 支持常规的鼠标事件类型,包括 <code class=\"codespan\">&#39;click&#39;</code>、<code class=\"codespan\">&#39;dblclick&#39;</code>、<code class=\"codespan\">&#39;mousedown&#39;</code>、<code class=\"codespan\">&#39;mousemove&#39;</code>、<code class=\"codespan\">&#39;mouseup&#39;</code>、<code class=\"codespan\">&#39;mouseover&#39;</code>、<code class=\"codespan\">&#39;mouseout&#39;</code>、<code class=\"codespan\">&#39;globalout&#39;</code>、<code class=\"codespan\">&#39;contextmenu&#39;</code> 事件。下面先来看一个简单的点击柱状图后打开相应的百度搜索页面的示例。</p>\n<pre><code class=\"lang-js\">// 基于准备好的dom,初始化ECharts实例\nvar myChart = echarts.init(document.getElementById(&#39;main&#39;));\n\n// 指定图表的配置项和数据\nvar option = {\n    xAxis: {\n        data: [&quot;衬衫&quot;,&quot;羊毛衫&quot;,&quot;雪纺衫&quot;,&quot;裤子&quot;,&quot;高跟鞋&quot;,&quot;袜子&quot;]\n    },\n    yAxis: {},\n    series: [{\n        name: &#39;销量&#39;,\n        type: &#39;bar&#39;,\n        data: [5, 20, 36, 10, 10, 20]\n    }]\n};\n// 使用刚指定的配置项和数据显示图表。\nmyChart.setOption(option);\n// 处理点击事件并且跳转到相应的百度搜索页面\nmyChart.on(&#39;click&#39;, function (params) {\n    window.open(&#39;https://www.baidu.com/s?wd=&#39; + encodeURIComponent(params.name));\n});\n</code></pre>\n<p>所有的鼠标事件包含参数 <code class=\"codespan\">params</code>,这是一个包含点击图形的数据信息的对象,如下格式:</p>\n<pre><code class=\"lang-js\">{\n    // 当前点击的图形元素所属的组件名称,\n    // 其值如 &#39;series&#39;、&#39;markLine&#39;、&#39;markPoint&#39;、&#39;timeLine&#39; 等。\n    componentType: string,\n    // 系列类型。值可能为:&#39;line&#39;、&#39;bar&#39;、&#39;pie&#39; 等。当 componentType 为 &#39;series&#39; 时有意义。\n    seriesType: string,\n    // 系列在传入的 option.series 中的 index。当 componentType 为 &#39;series&#39; 时有意义。\n    seriesIndex: number,\n    // 系列名称。当 componentType 为 &#39;series&#39; 时有意义。\n    seriesName: string,\n    // 数据名,类目名\n    name: string,\n    // 数据在传入的 data 数组中的 index\n    dataIndex: number,\n    // 传入的原始数据项\n    data: Object,\n    // sankey、graph 等图表同时含有 nodeData 和 edgeData 两种 data,\n    // dataType 的值会是 &#39;node&#39; 或者 &#39;edge&#39;,表示当前点击在 node 还是 edge 上。\n    // 其他大部分图表中只有一种 data,dataType 无意义。\n    dataType: string,\n    // 传入的数据值\n    value: number|Array\n    // 数据图形的颜色。当 componentType 为 &#39;series&#39; 时有意义。\n    color: string\n}\n</code></pre>\n<p>如何区分鼠标点击到了哪里:</p>\n<pre><code class=\"lang-js\">myChart.on(&#39;click&#39;, function (params) {\n    if (params.componentType === &#39;markPoint&#39;) {\n        // 点击到了 markPoint 上\n        if (params.seriesIndex === 5) {\n            // 点击到了 index 为 5 的 series 的 markPoint 上。\n        }\n    }\n    else if (params.componentType === &#39;series&#39;) {\n        if (params.seriesType === &#39;graph&#39;) {\n            if (params.dataType === &#39;edge&#39;) {\n                // 点击到了 graph 的 edge(边)上。\n            }\n            else {\n                // 点击到了 graph 的 node(节点)上。\n            }\n        }\n    }\n});\n</code></pre>\n<p>使用 <code class=\"codespan\">query</code> 只对指定的组件的图形元素的触发回调:</p>\n<pre><code class=\"lang-js\">chart.on(eventName, query, handler);\n</code></pre>\n<p><code class=\"codespan\">query</code> 可为 <code class=\"codespan\">string</code> 或者 <code class=\"codespan\">Object</code>。</p>\n<p>如果为 <code class=\"codespan\">string</code> 表示组件类型。格式可以是 &#39;mainType&#39; 或者 &#39;mainType.subType&#39;。例如:</p>\n<pre><code class=\"lang-js\">chart.on(&#39;click&#39;, &#39;series&#39;, function () {...});\nchart.on(&#39;click&#39;, &#39;series.line&#39;, function () {...});\nchart.on(&#39;click&#39;, &#39;dataZoom&#39;, function () {...});\nchart.on(&#39;click&#39;, &#39;xAxis.category&#39;, function () {...});\n</code></pre>\n<p>如果为 <code class=\"codespan\">Object</code>,可以包含以下一个或多个属性,每个属性都是可选的:</p>\n<pre><code class=\"lang-js\">{\n    &lt;mainType&gt;Index: number // 组件 index\n    &lt;mainType&gt;Name: string // 组件 name\n    &lt;mainType&gt;Id: string // 组件 id\n    dataIndex: number // 数据项 index\n    name: string // 数据项 name\n    dataType: string // 数据项 type,如关系图中的 &#39;node&#39;, &#39;edge&#39;\n    element: string // 自定义系列中的 el 的 name\n}\n</code></pre>\n<p>例如:</p>\n<pre><code class=\"lang-js\">chart.setOption({\n    // ...\n    series: [{\n        name: &#39;uuu&#39;\n        // ...\n    }]\n});\nchart.on(&#39;mouseover&#39;, {seriesName: &#39;uuu&#39;}, function () {\n    // series name 为 &#39;uuu&#39; 的系列中的图形元素被 &#39;mouseover&#39; 时,此方法被回调。\n});\n</code></pre>\n<p>例如:</p>\n<pre><code class=\"lang-js\">chart.setOption({\n    // ...\n    series: [{\n        // ...\n    }, {\n        // ...\n        data: [\n            {name: &#39;xx&#39;, value: 121},\n            {name: &#39;yy&#39;, value: 33}\n        ]\n    }]\n});\nchart.on(&#39;mouseover&#39;, {seriesIndex: 1, name: &#39;xx&#39;}, function () {\n    // series index 1 的系列中的 name 为 &#39;xx&#39; 的元素被 &#39;mouseover&#39; 时,此方法被回调。\n});\n</code></pre>\n<p>例如:</p>\n<pre><code class=\"lang-js\">chart.setOption({\n    // ...\n    series: [{\n        type: &#39;graph&#39;,\n        nodes: [{name: &#39;a&#39;, value: 10}, {name: &#39;b&#39;, value: 20}],\n        edges: [{source: 0, target: 1}]\n    }]\n});\nchart.on(&#39;click&#39;, {dataType: &#39;node&#39;}, function () {\n    // 关系图的节点被点击时此方法被回调。\n});\nchart.on(&#39;click&#39;, {dataType: &#39;edge&#39;}, function () {\n    // 关系图的边被点击时此方法被回调。\n});\n</code></pre>\n<p>例如:</p>\n<pre><code class=\"lang-js\">chart.setOption({\n    // ...\n    series: {\n        // ...\n        type: &#39;custom&#39;,\n        renderItem: function (params, api) {\n            return {\n                type: &#39;group&#39;,\n                children: [{\n                    type: &#39;circle&#39;,\n                    name: &#39;my_el&#39;,\n                    // ...\n                }, {\n                    // ...\n                }]\n            }\n        },\n        data: [[12, 33]]\n    }\n})\nchart.on(&#39;mouseup&#39;, {element: &#39;my_el&#39;}, function () {\n    // name 为 &#39;my_el&#39; 的元素被 &#39;mouseup&#39; 时,此方法被回调。\n});\n</code></pre>\n<p>你可以在回调函数中获得这个对象中的数据名、系列名称后在自己的数据仓库中索引得到其它的信息候更新图表,显示浮层等等,如下示例代码:</p>\n<pre><code class=\"lang-js\">myChart.on(&#39;click&#39;, function (parmas) {\n    $.get(&#39;detail?q=&#39; + params.name, function (detail) {\n        myChart.setOption({\n            series: [{\n                name: &#39;pie&#39;,\n                // 通过饼图表现单个柱子中的数据分布\n                data: [detail.data]\n            }]\n        });\n    });\n});\n</code></pre>\n<h2 id=\"-\">组件交互的行为事件</h2>\n<p>在 ECharts 中基本上所有的组件交互行为都会触发相应的事件,常用的事件和事件对应参数在 <a href=\"api.html#events\" target=\"_blank\">events</a> 文档中有列出。</p>\n<p>下面是监听一个图例开关的示例:</p>\n<pre><code class=\"lang-js\">// 图例开关的行为只会触发 legendselectchanged 事件\nmyChart.on(&#39;legendselectchanged&#39;, function (params) {\n    // 获取点击图例的选中状态\n    var isSelected = params.selected[params.name];\n    // 在控制台中打印\n    console.log((isSelected ? &#39;选中了&#39; : &#39;取消选中了&#39;) + &#39;图例&#39; + params.name);\n    // 打印所有图例的状态\n    console.log(params.selected);\n});\n</code></pre>\n<h2 id=\"-echarts-\">代码触发 ECharts 中组件的行为</h2>\n<p>上面提到诸如<code class=\"codespan\">&#39;legendselectchanged&#39;</code>事件会由组件交互的行为触发,那除了用户的交互操作,有时候也会有需要在程序里调用方法触发图表的行为,诸如显示 tooltip,选中图例。</p>\n<p>在 ECharts 2.x 是通过 <code class=\"codespan\">myChart.component.tooltip.showTip</code> 这种形式调用相应的接口触发图表行为,入口很深,而且涉及到内部组件的组织。相对地,在 ECharts 3 里改为通过调用 <code class=\"codespan\">myChart.dispatchAction({ type: &#39;&#39; })</code> 触发图表行为,统一管理了所有动作,也可以方便地根据需要去记录用户的行为路径。</p>\n<p>常用的动作和动作对应参数在 <a href=\"api.html#action\" target=\"_blank\">action</a> 文档中有列出。</p>\n<p>下面示例演示了如何通过<code class=\"codespan\">dispatchAction</code>去轮流高亮饼图的每个扇形。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/pie-highlight&edit=1&reset=1\" width=\"600\" height=\"400\" ></iframe>\n\n\n\n<h2 id=\"-\">监听“空白处”的事件</h2>\n<p>有时候,开发者需要监听画布的“空白处”所触发的事件。比如,当需要在用户点击“空白处”的时候重置图表时。</p>\n<p>在讨论这个功能之前,我们需要先明确两种事件。<code class=\"codespan\">zrender 事件</code>和<code class=\"codespan\">echarts 事件</code>。</p>\n<pre><code class=\"lang-js\">myChart.getZr().on(&#39;click&#39;, function (event) {\n    // 该监听器正在监听一个`zrender 事件`。\n});\nmyChart.on(&#39;click&#39;, function (event) {\n    // 该监听器正在监听一个`echarts 事件`。\n});\n</code></pre>\n<p><code class=\"codespan\">zrender 事件</code>与<code class=\"codespan\">echarts 事件</code>不同。前者是当鼠标在任何地方都会被触发,而后者是只有当鼠标在图形元素上时才能被触发。事实上,<code class=\"codespan\">echarts 事件</code> 是在 <code class=\"codespan\">zrender 事件</code> 的基础上实现的,也就是说,当一个 <code class=\"codespan\">zrender 事件</code> 在图形元素上被触发时,<code class=\"codespan\">echarts</code> 将触发一个 <code class=\"codespan\">echarts 事件</code> 给开发者。</p>\n<p>有了 <code class=\"codespan\">zrender事件</code>,我们就可以实现 “监听空白处的事件”,具体如下:</p>\n<pre><code class=\"lang-js\">myChart.getZr().on(&#39;click&#39;, function (event) {\n    // 没有 target 意味着鼠标/指针不在任何一个图形元素上,它是从“空白处”触发的。\n    if (!event.target) {\n        // 点击在了空白处,做些什么。\n    }\n});\n</code></pre>\n"},"动态排序柱状图":{"type":["*"],"description":"<p>动态排序柱状图是一种展示随时间变化的数据排名变化的图表,从 ECharts 5 开始内置支持。</p>\n<blockquote>\n<p>动态排序柱状图通常是横向的柱条,如果想要采用纵向的柱条,只要把本教程中的 X 轴和 Y 轴相反设置即可。</p>\n</blockquote>\n<ol>\n<li><code class=\"codespan\">yAxis.realtimeSort</code> 设为 <code class=\"codespan\">true</code>,表示开启 Y 轴的动态排序效果</li>\n<li><code class=\"codespan\">yAxis.inverse</code> 设为 <code class=\"codespan\">true</code>,表示 Y 轴从下往上是从小到大的排列</li>\n<li><code class=\"codespan\">yAxis.animationDuration</code> 建议设为 <code class=\"codespan\">300</code>,表示第一次柱条排序动画的时长</li>\n<li><code class=\"codespan\">yAxis.animationDurationUpdate</code> 建议设为 <code class=\"codespan\">300</code>,表示第一次后柱条排序动画的时长</li>\n<li>如果想只显示前 <em>n</em> 名,将 <code class=\"codespan\">yAxis.max</code> 设为 <em>n - 1</em>,否则显示所有柱条</li>\n<li><code class=\"codespan\">xAxis.max</code> 建议设为 <code class=\"codespan\">&#39;dataMax&#39;</code> 表示用数据的最大值作为 X 轴最大值,视觉效果更好</li>\n<li>如果想要实时改变标签,需要将 <code class=\"codespan\">series.label.valueAnimation</code> 设为 <code class=\"codespan\">true</code></li>\n<li><code class=\"codespan\">animationDuration</code> 设为 <code class=\"codespan\">0</code>,表示第一份数据不需要从 <code class=\"codespan\">0</code> 开始动画(如果希望从 <code class=\"codespan\">0</code> 开始则设为和 <code class=\"codespan\">animationDurationUpdate</code> 相同的值)</li>\n<li><code class=\"codespan\">animationDurationUpdate</code> 建议设为 <code class=\"codespan\">3000</code> 表示每次更新动画时长,这一数值应与调用 <code class=\"codespan\">setOption</code> 改变数据的频率相同</li>\n<li>以 <code class=\"codespan\">animationDurationUpdate</code> 的频率调用 <code class=\"codespan\">setInterval</code>,更新数据值,显示下一个时间点对应的柱条排序</li>\n</ol>\n<p>完整的例子如下:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=bar-race&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n<p>以上的设置项比较多,如果手动设置比较繁琐,之后我们也会推出不用写代码就能实现动态排序柱状图的工具,敬请期待!</p>\n"},"小例子:自己实现拖拽":{"type":["*"],"description":"<p>介绍一个实现拖拽的小例子。这个例子是在原生 Apache ECharts<sup>TM</sup> 基础上做了些小小扩展,带有一定的交互性。通过这个例子,我们可以了解到,如何使用 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>这个例子主要做到了这样一件事,用鼠标可以拖拽曲线的点,从而改变曲线的形状。例子很简单,但是有了这个基础我们还可以做更多的事情,比如在图中可视化得编辑。所以我们从这个简单的例子开始。</p>\n<p>echarts 本身没有提供封装好的『拖拽改变图表』功能,因为现在认为这个功能并不足够有通用性。那么这个功能就留给开发者用 API 实现,这也有助于开发者按自己的需要个性定制。</p>\n<h2 id=\"-\">(一)实现基本的拖拽功能</h2>\n<p>在这个例子中,基础的图表是一个 <a href=\"option.html#series-line\" target=\"_blank\">折线图 (series-line)</a>。参见如下配置:</p>\n<pre><code class=\"lang-js\">var symbolSize = 20;\n\n// 这个 data 变量在这里单独声明,在后面也会用到。\nvar data = [[15, 0], [-50, 10], [-56.5, 20], [-46.5, 30], [-22.1, 40]];\n\nmyChart.setOption({\n    xAxis: {\n        min: -100,\n        max: 80,\n        type: &#39;value&#39;,\n        axisLine: {onZero: false}\n    },\n    yAxis: {\n        min: -30,\n        max: 60,\n        type: &#39;value&#39;,\n        axisLine: {onZero: false}\n    },\n    series: [\n        {\n            id: &#39;a&#39;,\n            type: &#39;line&#39;,\n            smooth: true,\n            symbolSize: symbolSize, // 为了方便拖拽,把 symbolSize 尺寸设大了。\n            data: data\n        }\n    ]\n});\n</code></pre>\n<p>既然折线中原生的点没有拖拽功能,我们就为它加上拖拽功能:用 <a href=\"option.html#graphic\" target=\"_blank\">graphic</a> 组件,在每个点上面,覆盖一个隐藏的可拖拽的圆点。</p>\n<pre><code class=\"lang-js\">myChart.setOption({\n    // 声明一个 graphic component,里面有若干个 type 为 &#39;circle&#39; 的 graphic elements。\n    // 这里使用了 echarts.util.map 这个帮助方法,其行为和 Array.prototype.map 一样,但是兼容 es5 以下的环境。\n    // 用 map 方法遍历 data 的每项,为每项生成一个圆点。\n    graphic: echarts.util.map(data, function (dataItem, dataIndex) {\n        return {\n            // &#39;circle&#39; 表示这个 graphic element 的类型是圆点。\n            type: &#39;circle&#39;,\n\n            shape: {\n                // 圆点的半径。\n                r: symbolSize / 2\n            },\n            // 用 transform 的方式对圆点进行定位。position: [x, y] 表示将圆点平移到 [x, y] 位置。\n            // 这里使用了 convertToPixel 这个 API 来得到每个圆点的位置,下面介绍。\n            position: myChart.convertToPixel(&#39;grid&#39;, dataItem),\n\n            // 这个属性让圆点不可见(但是不影响他响应鼠标事件)。\n            invisible: true,\n            // 这个属性让圆点可以被拖拽。\n            draggable: true,\n            // 把 z 值设得比较大,表示这个圆点在最上方,能覆盖住已有的折线图的圆点。\n            z: 100,\n            // 此圆点的拖拽的响应事件,在拖拽过程中会不断被触发。下面介绍详情。\n            // 这里使用了 echarts.util.curry 这个帮助方法,意思是生成一个与 onPointDragging\n            // 功能一样的新的函数,只不过第一个参数永远为此时传入的 dataIndex 的值。\n            ondrag: echarts.util.curry(onPointDragging, dataIndex)\n        };\n    })\n});\n</code></pre>\n<p>上面的代码中,使用 <a href=\"api.html#echartsInstance.convertToPixel\" target=\"_blank\">convertToPixel</a> 这个 API,进行了从 data 到『像素坐标』的转换,从而得到了每个圆点应该在的位置,从而能绘制这些圆点。<code class=\"codespan\">myChart.convertToPixel(&#39;grid&#39;, dataItem)</code> 这句话中,第一个参数 <code class=\"codespan\">&#39;grid&#39;</code> 表示 <code class=\"codespan\">dataItem</code> 在 <a href=\"option.html#grid\" target=\"_blank\">grid</a> 这个组件中(即直角坐标系)中进行转换。所谓『像素坐标』,就是以 echarts 容器 dom element 的左上角为零点的以像素为单位的坐标系中的坐标。</p>\n<p>注意这件事需要在第一次 setOption 后再进行,也就是说,须在坐标系(<a href=\"option.html#grid\" target=\"_blank\">grid</a>)初始化后才能调用 <code class=\"codespan\">myChart.convertToPixel(&#39;grid&#39;, dataItem)</code>。</p>\n<p>有了这段代码后,就有了诸个能拖拽的点。接下来要为每个点,加上拖拽响应的事件:</p>\n<pre><code class=\"lang-js\">// 拖拽某个圆点的过程中会不断调用此函数。\n// 此函数中会根据拖拽后的新位置,改变 data 中的值,并用新的 data 值,重绘折线图,从而使折线图同步于被拖拽的隐藏圆点。\nfunction onPointDragging(dataIndex) {\n    // 这里的 data 就是本文最初的代码块中声明的 data,在这里会被更新。\n    // 这里的 this 就是被拖拽的圆点。this.position 就是圆点当前的位置。\n    data[dataIndex] = myChart.convertFromPixel(&#39;grid&#39;, this.position);\n    // 用更新后的 data,重绘折线图。\n    myChart.setOption({\n        series: [{\n            id: &#39;a&#39;,\n            data: data\n        }]\n    });\n}\n</code></pre>\n<p>上面的代码中,使用了 <a href=\"api.html#echartsInstance.convertFromPixel\" target=\"_blank\">convertFromPixel</a> 这个 API。它是 <a href=\"api.html#echartsInstance.convertToPixel\" target=\"_blank\">convertToPixel</a> 的逆向过程。<code class=\"codespan\">myChart.convertFromPixel(&#39;grid&#39;, this.position)</code> 表示把当前像素坐标转换成 <a href=\"option.html#grid\" target=\"_blank\">grid</a> 组件中直角坐标系的 dataItem 值。</p>\n<p>最后,为了使 dom 尺寸改变时,图中的元素能自适应得变化,加上这些代码:</p>\n<pre><code class=\"lang-js\">window.addEventListener(&#39;resize&#39;, function () {\n    // 对每个拖拽圆点重新计算位置,并用 setOption 更新。\n    myChart.setOption({\n        graphic: echarts.util.map(data, function (item, dataIndex) {\n            return {\n                position: myChart.convertToPixel(&#39;grid&#39;, item)\n            };\n        })\n    });\n});\n\n</code></pre>\n<h2 id=\"-tooltip-\">(二)添加 tooltip 组件</h2>\n<p>到此,拖拽的基本功能就完成了。但是想要更进一步得实时看到拖拽过程中,被拖拽的点的 data 值的变化状况,我们可以使用 <a href=\"option.html#tooltip\" target=\"_blank\">tooltip</a> 组件来实时显示这个值。但是,tooltip 有其默认的『显示』『隐藏』触发规则,在我们拖拽的场景中并不适用,所以我们还要手动定制 tooltip 的『显示』『隐藏』行为。</p>\n<p>在上述代码中分别添加如下定义:</p>\n<pre><code class=\"lang-js\">myChart.setOption({\n    ...,\n    tooltip: {\n        // 表示不使用默认的『显示』『隐藏』触发规则。\n        triggerOn: &#39;none&#39;,\n        formatter: function (params) {\n            return &#39;X: &#39; + params.data[0].toFixed(2) + &#39;&lt;br&gt;Y: &#39; + params.data[1].toFixed(2);\n        }\n    }\n});\n</code></pre>\n<pre><code class=\"lang-js\">myChart.setOption({\n    graphic: echarts.util.map(data, function (item, dataIndex) {\n        return {\n            type: &#39;circle&#39;,\n            ...,\n            // 在 mouseover 的时候显示,在 mouseout 的时候隐藏。\n            onmousemove: echarts.util.curry(showTooltip, dataIndex),\n            onmouseout: echarts.util.curry(hideTooltip, dataIndex),\n        };\n    })\n});\n\nfunction showTooltip(dataIndex) {\n    myChart.dispatchAction({\n        type: &#39;showTip&#39;,\n        seriesIndex: 0,\n        dataIndex: dataIndex\n    });\n}\n\nfunction hideTooltip(dataIndex) {\n    myChart.dispatchAction({\n        type: &#39;hideTip&#39;\n    });\n}\n</code></pre>\n<p>这里使用了 <a href=\"api.html#echartsInstance.dispatchAction\" target=\"_blank\">dispatchAction</a> 来显示隐藏 tooltip。用到了 <a href=\"api.html#action.tooltip.showTip\" target=\"_blank\">showTip</a>、<a href=\"api.html#action.tooltip.hideTip\" target=\"_blank\">hideTip</a>。</p>\n<h2 id=\"-\">(三)全部代码</h2>\n<p>总结一下,全部的代码如下:</p>\n<pre><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n    &lt;meta charset=&quot;utf-8&quot;&gt;\n    &lt;script src=&quot;dist/echarts.min.js&quot;&gt;&lt;/script&gt;\n&lt;/head&gt;\n&lt;body&gt;\n    &lt;div id=&quot;main&quot; style=&quot;width: 600px;height:400px;&quot;&gt;&lt;/div&gt;\n    &lt;script type=&quot;text/javascript&quot;&gt;\n\n    var symbolSize = 20;\n    var data = [[15, 0], [-50, 10], [-56.5, 20], [-46.5, 30], [-22.1, 40]];\n\n    var myChart = echarts.init(document.getElementById(&#39;main&#39;));\n\n    myChart.setOption({\n        tooltip: {\n            triggerOn: &#39;none&#39;,\n            formatter: function (params) {\n                return &#39;X: &#39; + params.data[0].toFixed(2) + &#39;&lt;br&gt;Y: &#39; + params.data[1].toFixed(2);\n            }\n        },\n        xAxis: {\n            min: -100,\n            max: 80,\n            type: &#39;value&#39;,\n            axisLine: {onZero: false}\n        },\n        yAxis: {\n            min: -30,\n            max: 60,\n            type: &#39;value&#39;,\n            axisLine: {onZero: false}\n        },\n        series: [\n            {\n                id: &#39;a&#39;,\n                type: &#39;line&#39;,\n                smooth: true,\n                symbolSize: symbolSize,\n                data: data\n            }\n        ],\n    });\n\n    myChart.setOption({\n        graphic: echarts.util.map(data, function (item, dataIndex) {\n            return {\n                type: &#39;circle&#39;,\n                position: myChart.convertToPixel(&#39;grid&#39;, item),\n                shape: {\n                    r: symbolSize / 2\n                },\n                invisible: true,\n                draggable: true,\n                ondrag: echarts.util.curry(onPointDragging, dataIndex),\n                onmousemove: echarts.util.curry(showTooltip, dataIndex),\n                onmouseout: echarts.util.curry(hideTooltip, dataIndex),\n                z: 100\n            };\n        })\n    });\n\n    window.addEventListener(&#39;resize&#39;, function () {\n        myChart.setOption({\n            graphic: echarts.util.map(data, function (item, dataIndex) {\n                return {\n                    position: myChart.convertToPixel(&#39;grid&#39;, item)\n                };\n            })\n        });\n    });\n\n    function showTooltip(dataIndex) {\n        myChart.dispatchAction({\n            type: &#39;showTip&#39;,\n            seriesIndex: 0,\n            dataIndex: dataIndex\n        });\n    }\n\n    function hideTooltip(dataIndex) {\n        myChart.dispatchAction({\n            type: &#39;hideTip&#39;\n        });\n    }\n\n    function onPointDragging(dataIndex, dx, dy) {\n        data[dataIndex] = myChart.convertFromPixel(&#39;grid&#39;, this.position);\n        myChart.setOption({\n            series: [{\n                id: &#39;a&#39;,\n                data: data\n            }]\n        });\n    }\n\n&lt;/script&gt;\n&lt;/body&gt;\n&lt;/html&gt;\n</code></pre><p><br></p>\n<p>有了这些基础,就可以定制更多的功能了。可以加 <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a> 组件,可以制作一个直角坐标系上的绘图板等等。可以发挥想象力。</p>\n"},"小例子:实现日历图":{"type":["*"],"description":"<p>在 Apache ECharts<sup>TM</sup> 中,我们新增了日历坐标系,如何快速写出一个日历图呢?</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=calendar-simple&edit=1&reset=1\" width=\"800\" height=\"300\" ></iframe>\n\n\n<p>通过以下三个步骤即可实现上述效果:</p>\n<h2 id=\"-js-\">第一步:引入js文件</h2>\n<p>下载的最新完整版本 echarts.min.js 即可,无需再单独引入其他文件哦</p>\n<pre><code class=\"lang-html\">&lt;script src=&quot;echarts.min.js&quot;&gt;&lt;/script&gt;\n&lt;script&gt;\n    // ...\n&lt;/script&gt;\n</code></pre>\n<h2 id=\"-dom-\">第二步:指定DOM元素作为图表容器</h2>\n<p>和ECharts中的其他图表一样,创建一个DOM来作为绘制图表的容器</p>\n<pre><code class=\"lang-html\">&lt;div id=&quot;main&quot; style=&quot;width=100%; height = 400px&quot;&gt;&lt;/div&gt;\n</code></pre>\n<p>使用ECharts进行初始化</p>\n<pre><code class=\"lang-js\">var myChart = echarts.init(document.getElementById(&#39;main&#39;));\n</code></pre>\n<h2 id=\"-\">第三步:配置参数</h2>\n<p>以常见的日历图为例: calendar坐标 + heatmap图</p>\n<pre><code class=\"lang-js\">var option = {\n    visualMap: {\n        show: false\n        min: 0,\n        max: 1000\n    },\n    calendar: {\n        range: &#39;2017&#39;\n    },\n    series: {\n        type: &#39;heatmap&#39;,\n        coordinateSystem: &#39;calendar&#39;,\n        data: [[&#39;2017-01-02&#39;, 900], [&#39;2017-01-02&#39;, 877], [&#39;2017-01-02&#39;, 699], ...]\n    }\n}\nmyChart.setOption(option);\n</code></pre>\n<p>在heatmap图的基础上,加上<code class=\"codespan\">coordinateSystem: &#39;calendar&#39;,</code>和<code class=\"codespan\">calendar: { range: &#39;2017&#39; }</code>heatmap图就秒变为日历图了。</p>\n<blockquote>\n<p>若发现图表没有正确显示,你可以检查以下几种可能:</p>\n<ul>\n<li>JS文件是否正确加载;</li>\n<li><code class=\"codespan\">echarts</code> 变量是否存在;</li>\n<li>控制台是否报错;</li>\n<li>DOM 元素在 <code class=\"codespan\">echarts.init</code> 的时候是否有高度和宽度。</li>\n<li>若为 <code class=\"codespan\">type: heatmap</code>,检查是否配置了 <code class=\"codespan\">visualMap</code>。</li>\n</ul>\n</blockquote>\n<p><strong>附完整示例代码</strong></p>\n<pre><code class=\"lang-html\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n    &lt;meta charset=&quot;utf-8&quot;&gt;\n    &lt;title&gt;ECharts&lt;/title&gt;\n    &lt;script src=&quot;echarts.min.js&quot;&gt;&lt;/script&gt;\n&lt;/head&gt;\n&lt;body&gt;\n    &lt;div id=&quot;main&quot; style=&quot;width:100%;height:400px;&quot;&gt;&lt;/div&gt;\n    &lt;script type=&quot;text/javascript&quot;&gt;\n        var myChart = echarts.init(document.getElementById(&#39;main&#39;));\n\n        // 模拟数据\n        function getVirtulData(year) {\n            year = year || &#39;2017&#39;;\n            var date = +echarts.number.parseDate(year + &#39;-01-01&#39;);\n            var end = +echarts.number.parseDate(year + &#39;-12-31&#39;);\n            var dayTime = 3600 * 24 * 1000;\n            var data = [];\n            for (var time = date; time &lt;= end; time += dayTime) {\n                data.push([\n                    echarts.format.formatTime(&#39;yyyy-MM-dd&#39;, time),\n                    Math.floor(Math.random() * 10000)\n                ]);\n            }\n            return data;\n        }\n        var option = {\n            visualMap: {\n                show: false,\n                min: 0,\n                max: 10000\n            },\n            calendar: {\n                range: &#39;2017&#39;\n            },\n            series: {\n                type: &#39;heatmap&#39;,\n                coordinateSystem: &#39;calendar&#39;,\n                data: getVirtulData(2017)\n            }\n        };\n        myChart.setOption(option);\n    &lt;/script&gt;\n&lt;/body&gt;\n&lt;/html&gt;\n\n</code></pre>\n<p>以上就是绘制最简日历图的步骤了,如若还想进一步私人定制,还可以通过自定义配置参数来实现</p>\n<h2 id=\"-\">自定义配置参数</h2>\n<p>使用日历坐标绘制日历图时,支持自定义各项属性:</p>\n<ul>\n<li><p><a href=\"option.html#calendar.range\" target=\"_blank\">range</a>: <code class=\"codespan\">设置时间的范围,可支持某年、某月、某天,还可支持跨年</code></p>\n</li>\n<li><p><a href=\"option.html#calendar.cellSize\" target=\"_blank\">cellSize</a>: <code class=\"codespan\">设置日历格的大小,可支持设置不同高宽,还可支持自适应auto</code></p>\n</li>\n<li><p><a href=\"option.html#calendar.width\" target=\"_blank\">width</a>、<a href=\"http://xxx\" target=\"_blank\">height</a>: <code class=\"codespan\">也可以直接设置改日历图的整体高宽,让其基于已有的高宽全部自适应</code></p>\n</li>\n<li><p><a href=\"option.html#calendar.orient\" target=\"_blank\">orient</a>: <code class=\"codespan\">设置坐标的方向,既可以横着也可以竖着</code></p>\n</li>\n<li><p><a href=\"option.html#calendar.splitLine\" target=\"_blank\">splitLine</a>: <code class=\"codespan\">设置分隔线样式,也可以直接不显示</code></p>\n</li>\n<li><p><a href=\"option.html#calendar.itemStyle\" target=\"_blank\">itemStyle</a>: <code class=\"codespan\">设置日历格的样式,背景色、方框线颜色大小类型、透明度均可自定义,甚至还能加阴影</code></p>\n</li>\n<li><p><a href=\"option.html#calendar.dayLabel\" target=\"_blank\">dayLabel</a>: <code class=\"codespan\">设置坐标中 星期样式,可以设置星期从第几天开始,快捷设置中英文、甚至是自定义中英文混搭、或局部不显示、通过formatter 可以想怎么显示就怎么显示;</code></p>\n</li>\n<li><p><a href=\"option.html#calendar.monthLabel\" target=\"_blank\">monthLabel</a>: <code class=\"codespan\">设置坐标中 月样式,和星期一样,可快捷设置中英文和自定义混搭</code></p>\n</li>\n<li><p><a href=\"option.html#calendar.yearLabel\" target=\"_blank\">yearLabel</a>: <code class=\"codespan\">设置坐标中 年样式,默认显示一年,通过formatter 文字可以想显示什么就能通过string function任性自定义,上下左右方位随便选;</code></p>\n</li>\n</ul>\n<p>完整的配置项参数参见:<a href=\"option.html#calendar\" target=\"_blank\">calendar API</a></p>\n<h2 id=\"-\">日历坐标系的其他形式</h2>\n<p>日历坐标系是一种新的 <code class=\"codespan\">ECharts</code> 坐标系,提供了在日历上绘制图表的能力; 所以除了制作常用的日历图外,我们可以在热力图、散点图、关系图中使用日历坐标系。</p>\n<p>在日历坐标系中使用热力图:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=calendar-heatmap&edit=1&reset=1\" width=\"800\" height=\"300\" ></iframe>\n\n\n<p>在日历坐标系中使用散点图:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=calendar-effectscatter&edit=1&reset=1\" width=\"800\" height=\"600\" ></iframe>\n\n\n<p>还可以混合放置不同的图表,例如下例子,同时放置了热力图和关系图:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=calendar-graph&edit=1&reset=1\" width=\"800\" height=\"600\" ></iframe>\n\n\n<p><strong>其他更丰富的效果</strong></p>\n<p>灵活利用 <code class=\"codespan\">ECharts</code> 图表和坐标系的组合,以及 API,还可以实现更丰富的效果。</p>\n<p>例如,制作农历:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=calendar-lunar&edit=1&reset=1\" width=\"600\" height=\"500\" ></iframe>\n\n\n<p>例如,使用 <code class=\"codespan\">chart.convertToPixel</code> 接口,在日历坐标系绘制饼图。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=calendar-pie&edit=1&reset=1\" width=\"800\" height=\"640\" ></iframe>\n\n\n\n\n\n\n\n"},"旭日图":{"type":["*"],"description":"<p><a href=\"https://en.wikipedia.org/wiki/Pie_chart#Ring_chart_/_Sunburst_chart_/_Multilevel_pie_chart\" target=\"_blank\">旭日图(Sunburst)</a>由多层的环形图组成,在数据结构上,内圈是外圈的父节点。因此,它既能像<a href=\"option.html#series-pie\" target=\"_blank\">饼图</a>一样表现局部和整体的占比,又能像<a href=\"option.html#series-treemap\" target=\"_blank\">矩形树图</a>一样表现层级关系。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=sunburst-monochrome&edit=1&reset=1\" width=\"700\" height=\"500\" ></iframe>\n\n\n<h2 id=\"-\">引入相关文件</h2>\n<p>旭日图是 Apache ECharts<sup>TM</sup> 4.0 新增的图表类型,从 <a href=\"https://www.jsdelivr.com/package/npm/echarts\" target=\"_blank\">CDN</a> 引入完整版的 <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js\" target=\"_blank\">echarts.min.js</a></p>\n<h2 id=\"-\">最简单的旭日图</h2>\n<p>创建旭日图需要在 <code class=\"codespan\">series</code> 配置项中声明类型为 <code class=\"codespan\">&#39;sunburst&#39;</code> 的系列,并且以树形结构声明其 <code class=\"codespan\">data</code>:</p>\n<pre><code class=\"lang-js\">var option = {\n    series: {\n        type: &#39;sunburst&#39;,\n        data: [{\n            name: &#39;A&#39;,\n            value: 10,\n            children: [{\n                value: 3,\n                name: &#39;Aa&#39;\n            }, {\n                value: 5,\n                name: &#39;Ab&#39;\n            }]\n        }, {\n            name: &#39;B&#39;,\n            children: [{\n                name: &#39;Ba&#39;,\n                value: 4\n            }, {\n                name: &#39;Bb&#39;,\n                value: 2\n            }]\n        }, {\n            name: &#39;C&#39;,\n            value: 3\n        }]\n    }\n};\n</code></pre>\n<p>得到以下结果:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/sunburst-simple&edit=1&reset=1\" width=\"700\" height=\"400\" ></iframe>\n\n\n<h2 id=\"-\">颜色等样式调整</h2>\n<p>默认情况下会使用全局调色盘 <a href=\"option.html#color\" target=\"_blank\">color</a> 分配最内层的颜色,其余层则与其父元素同色。在旭日图中,扇形块的颜色有以下三种设置方式:</p>\n<ul>\n<li>在 <a href=\"option.html#series-sunburst.data.itemStyle\" target=\"_blank\">series.data.itemStyle</a> 中设置每个扇形块的样式;</li>\n<li>在 <a href=\"option.html#series-sunburst.levels.itemStyle\" target=\"_blank\">series.levels.itemStyle</a> 中设置每一层的样式;</li>\n<li>在 <a href=\"option.html#series-sunburst.itemStyle\" target=\"_blank\">series.itemStyle</a> 中设置整个旭日图的样式。</li>\n</ul>\n<p>上述三者的优先级是从高到低的,也就是说,配置了 <code class=\"codespan\">series.data.itemStyle</code> 的扇形块将会覆盖 <code class=\"codespan\">series.levels.itemStyle</code> 和 <code class=\"codespan\">series.itemStyle</code> 的设置。</p>\n<p>下面,我们将整体的颜色设为灰色 <code class=\"codespan\">&#39;#aaa&#39;</code>,将最内层的颜色设为蓝色 <code class=\"codespan\">&#39;blue&#39;</code>,将 <code class=\"codespan\">Aa</code>、<code class=\"codespan\">B</code> 这两块设为红色 <code class=\"codespan\">&#39;red&#39;</code>。</p>\n<pre><code class=\"lang-js\">var option = {\n    series: {\n        type: &#39;sunburst&#39;,\n        data: [{\n            name: &#39;A&#39;,\n            value: 10,\n            children: [{\n                value: 3,\n                name: &#39;Aa&#39;,\n                itemStyle: {\n                    color: &#39;red&#39;\n                }\n            }, {\n                value: 5,\n                name: &#39;Ab&#39;\n            }]\n        }, {\n            name: &#39;B&#39;,\n            children: [{\n                name: &#39;Ba&#39;,\n                value: 4\n            }, {\n                name: &#39;Bb&#39;,\n                value: 2\n            }],\n            itemStyle: {\n                color: &#39;red&#39;\n            }\n        }, {\n            name: &#39;C&#39;,\n            value: 3\n        }],\n        itemStyle: {\n            color: &#39;#aaa&#39;\n        },\n        levels: [{\n            // 留给数据下钻的节点属性\n        }, {\n            itemStyle: {\n                color: &#39;blue&#39;\n            }\n        }]\n    }\n};\n</code></pre>\n<p>效果为:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/sunburst-color&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n\n<h2 id=\"-\">按层配置样式</h2>\n<p>旭日图是一种有层次的结构,为了方便同一层样式的配置,我们提供了 <a href=\"option.html#series-sunburst.levels\" target=\"_blank\">levels</a> 配置项。它是一个数组,其中的第 0 项表示数据下钻后返回上级的图形,其后的每一项分别表示从圆心向外层的层级。</p>\n<p>例如,假设我们没有数据下钻功能,并且希望将最内层的扇形块的颜色设为红色,文字设为蓝色,可以这样设置:</p>\n<pre><code class=\"lang-js\">series: {\n    // ...\n    levels: [\n        {\n            // 留给数据下钻点的空白配置\n        },\n        {\n            // 最靠内测的第一层\n            itemStyle: {\n                color: &#39;red&#39;\n            },\n            label: {\n                color: &#39;blue&#39;\n            }\n        },\n        {\n            // 第二层 ...\n        }\n    ]\n}\n</code></pre>\n<p>在实际使用的过程中,你会发现按层配置样式是一个很常用的功能,能够很大程度上提高配置的效率。</p>\n<h2 id=\"-\">数据下钻</h2>\n<p>旭日图默认支持数据下钻,也就是说,当点击了扇形块之后,将以该扇形块的数据作为根节点,便于进一步了解该数据的细节。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=sunburst-simple&edit=1&reset=1\" width=\"700\" height=\"500\" ></iframe>\n\n\n<p>当数据下钻后,中间会出现一个用于返回上一层的图形,该图形的样式可以通过 <a href=\"option.html#series-sunburst.levels\" target=\"_blank\">levels[0]</a> 配置。</p>\n<p>如果不需要数据下钻功能,可以通过将 <a href=\"option.html#series-sunburst.nodeClick\" target=\"_blank\">nodeClick</a> 设置为 <code class=\"codespan\">false</code> 关闭;或者将其设为 <code class=\"codespan\">&#39;link&#39;</code>,并将 <a href=\"option.html#series-sunburst.data.link\" target=\"_blank\">data.link</a> 设为点击扇形块对应打开的链接。</p>\n<h2 id=\"-\">高亮相关扇形块</h2>\n<p>旭日图支持鼠标移动到某扇形块时,高亮相关数据块的操作,可以通过设置 <a href=\"option.html#series-sunburst.highlightPolicy\" target=\"_blank\">highlightPolicy</a>,包括以下几种高亮方式:</p>\n<ul>\n<li><code class=\"codespan\">&#39;descendant&#39;</code>(默认值):高亮鼠标移动所在扇形块与其后代元素;</li>\n<li><code class=\"codespan\">&#39;ancestor&#39;</code>:高亮鼠标所在扇形块与其祖先元素;</li>\n<li><code class=\"codespan\">&#39;self&#39;</code>:仅高亮鼠标所在扇形块;</li>\n<li><code class=\"codespan\">&#39;none&#39;</code>:不会淡化(downplay)其他元素。</li>\n</ul>\n<p>上面提到的“高亮”,对于鼠标所在的扇形块,会使用 <code class=\"codespan\">emphasis</code> 样式;对于其他相关扇形块,则会使用 <code class=\"codespan\">highlight</code> 样式。通过这种方式,可以很方便地实现突出显示相关数据的需求。</p>\n<p>具体来说,对于配置项:</p>\n<pre><code class=\"lang-js\">itemStyle: {\n    color: &#39;yellow&#39;,\n    borderWidth: 2,\n    emphasis: {\n        color: &#39;red&#39;\n    },\n    highlight: {\n        color: &#39;orange&#39;\n    },\n    downplay: {\n        color: &#39;#ccc&#39;\n    }\n}\n</code></pre>\n<p><code class=\"codespan\">highlightPolicy</code> 为 <code class=\"codespan\">&#39;descendant&#39;</code> 或 <code class=\"codespan\">&#39;ancestor&#39;</code> 的效果分别为:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/sunburst-highlight-descendant&edit=1&reset=1\" width=\"700\" height=\"350\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/sunburst-highlight-ancestor&edit=1&reset=1\" width=\"700\" height=\"350\" ></iframe>\n\n\n<h2 id=\"-\">总结</h2>\n<p>上面的教程主要讲述的是如何入门使用旭日图,感兴趣的用户可以在 <a href=\"option.html#series-sunburst\" target=\"_blank\">配置项手册</a> 查看更完整的文档。在灵活应用这些配置项之后,就能做出丰富多彩的旭日图了!</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=sunburst-book&edit=1&reset=1\" width=\"700\" height=\"600\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=sunburst-drink&edit=1&reset=1\" width=\"700\" height=\"600\" ></iframe>\n\n\n\n\n\n\n\n\n\n"},"自定义系列":{"type":["*"],"description":"<p><a href=\"option.html#series-custom\" target=\"_blank\">自定义系列(custom series)</a>,是一种系列的类型。它把绘制图形元素这一步留给开发者去做,从而开发者能在坐标系中自由绘制出自己需要的图表。</p>\n<p>Apache ECharts<sup>TM</sup> 为什么会要支持 <code class=\"codespan\">自定义系列</code> 呢?</p>\n<p>ECharts 内置支持的图表类型是最常见的图表类型,但是图表类型是难于穷举的,有很多小众的需求 echarts 并不能内置的支持。那么就需要提供一种方式来让开发者自己扩展。另一方面,所提供的扩展方式要尽可能得简单,例如图形元素创建和释放、过渡动画、tooltip、<a href=\"option.html#dataZoom\" target=\"_blank\">数据区域缩放(dataZoom)</a>、<a href=\"option.html#visualMap\" target=\"_blank\">视觉映射(visualMap)</a>等功能,尽量在 ECharts 中内置得处理,使开发者不必纠结于这些细节。综上考虑形成了 <a href=\"option.html#series-custom\" target=\"_blank\">自定义系列(custom series)</a>。</p>\n<p><strong>例如,下面的例子使用 custom series 扩展出了 x-range 图:</strong></p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=custom-profile&reset=1&edit=1\" width=\"800\" height=\"500\" ></iframe>\n\n\n<p><strong>更多的例子参见:<a href=\"https://echarts.apache.org/examples/zh/index.html#chart-type-custom\" target=\"_blank\">custom examples</a></strong></p>\n<p>下面来介绍开发者怎么使用 <a href=\"option.html#series-custom\" target=\"_blank\">自定义系列(custom series)</a>。</p>\n<h2 id=\"-renderitem-\">(一)renderItem 方法</h2>\n<p>开发者自定义的图形元素渲染逻辑,是通过书写 <code class=\"codespan\">renderItem</code> 函数实现的,例如:</p>\n<pre><code class=\"lang-js\">var option = {\n    ...,\n    series: [{\n        type: &#39;custom&#39;,\n        renderItem: function (params, api) {\n            // ...\n        },\n        data: data\n    }]\n}\n</code></pre>\n<p>在渲染阶段,对于 <a href=\"option.html#series-custom.data\" target=\"_blank\">series.data</a> 中的每个数据项(为方便描述,这里称为 <code class=\"codespan\">dataItem</code>),会调用此 <a href=\"option.html#series-custom.renderItem\" target=\"_blank\">renderItem</a> 函数。这个 <code class=\"codespan\">renderItem</code> 函数的职责,就是返回一个(或者一组)<code class=\"codespan\">图形元素定义</code>,<code class=\"codespan\">图形元素定义</code> 中包括图形元素的类型、位置、尺寸、样式等。echarts 会根据这些 <code class=\"codespan\">图形元素定义</code> 来渲染出图形元素。如下的示意:</p>\n<pre><code class=\"lang-js\">var option = {\n    ...,\n    series: [{\n        type: &#39;custom&#39;,\n        renderItem: function (params, api) {\n            // 对于 data 中的每个 dataItem,都会调用这个 renderItem 函数。\n            // (但是注意,并不一定是按照 data 的顺序调用)\n\n            // 这里进行一些处理,例如,坐标转换。\n            // 这里使用 api.value(0) 取出当前 dataItem 中第一个维度的数值。\n            var categoryIndex = api.value(0);\n            // 这里使用 api.coord(...) 将数值在当前坐标系中转换成为屏幕上的点的像素值。\n            var startPoint = api.coord([api.value(1), categoryIndex]);\n            var endPoint = api.coord([api.value(2), categoryIndex]);\n            // 这里使用 api.size(...) 获得 Y 轴上数值范围为 1 的一段所对应的像素长度。\n            var height = api.size([0, 1])[1] * 0.6;\n\n            // shape 属性描述了这个矩形的像素位置和大小。\n            // 其中特殊得用到了 echarts.graphic.clipRectByRect,意思是,\n            // 如果矩形超出了当前坐标系的包围盒,则剪裁这个矩形。\n            // 如果矩形完全被剪掉,会返回 undefined.\n            var rectShape = echarts.graphic.clipRectByRect({\n                // 矩形的位置和大小。\n                x: startPoint[0],\n                y: startPoint[1] - height / 2,\n                width: endPoint[0] - startPoint[0],\n                height: height\n            }, {\n                // 当前坐标系的包围盒。\n                x: params.coordSys.x,\n                y: params.coordSys.y,\n                width: params.coordSys.width,\n                height: params.coordSys.height\n            });\n\n            // 这里返回为这个 dataItem 构建的图形元素定义。\n            return rectShape &amp;&amp; {\n                // 表示这个图形元素是矩形。还可以是 &#39;circle&#39;, &#39;sector&#39;, &#39;polygon&#39; 等等。\n                type: &#39;rect&#39;,\n                shape: rectShape,\n                // 用 api.style(...) 得到默认的样式设置。这个样式设置包含了\n                // option 中 itemStyle 的配置和视觉映射得到的颜色。\n                style: api.style()\n            };\n        },\n        data: [\n            [12, 44, 55, 60], // 这是第一个 dataItem\n            [53, 31, 21, 56], // 这是第二个 dataItem\n            [71, 33, 10, 20], // 这是第三个 dataItem\n            ...\n        ]\n    }]\n}\n</code></pre>\n<p><a href=\"option.html#series-custom.renderItem\" target=\"_blank\">renderItem</a> 函数提供了两个参数:</p>\n<ul>\n<li><a href=\"option.html#series-custom.renderItem.arguments.params\" target=\"_blank\">params</a>:包含了当前数据信息(如 <code class=\"codespan\">seriesIndex</code>、<code class=\"codespan\">dataIndex</code> 等等)和坐标系的信息(如坐标系包围盒的位置和尺寸)。</li>\n<li><a href=\"option.html#series-custom.renderItem.arguments.api\" target=\"_blank\">api</a>:是一些开发者可调用的方法集合(如 <code class=\"codespan\">api.value()</code>、<code class=\"codespan\">api.coord()</code>)。</li>\n</ul>\n<p><a href=\"option.html#series-custom.renderItem\" target=\"_blank\">renderItem</a> 函数须返回根据此 <code class=\"codespan\">dataItem</code> 绘制出的图形元素的定义信息,参见 <a href=\"option.html#series-custom.renderItem.return\" target=\"_blank\">renderItem.return</a>。</p>\n<p>一般来说,<a href=\"option.html#series-custom.renderItem\" target=\"_blank\">renderItem</a> 函数的主要逻辑,是将 <code class=\"codespan\">dataItem</code> 里的值映射到坐标系上的图形元素。这一般需要用到 <a href=\"option.html#series-custom.renderItem.arguments.api\" target=\"_blank\">renderItem.arguments.api</a> 中的两个函数:</p>\n<ul>\n<li><a href=\"option.html#series-custom.renderItem.arguments.api.value\" target=\"_blank\">api.value(...)</a>,意思是取出 <code class=\"codespan\">dataItem</code> 中的数值。例如 <code class=\"codespan\">api.value(0)</code> 表示取出当前 <code class=\"codespan\">dataItem</code> 中第一个维度的数值。</li>\n<li><a href=\"option.html#series-custom.renderItem.arguments.api.coord\" target=\"_blank\">api.coord(...)</a>,意思是进行坐标转换计算。例如 <code class=\"codespan\">var point = api.coord([api.value(0), api.value(1)])</code> 表示 <code class=\"codespan\">dataItem</code> 中的数值转换成坐标系上的点。</li>\n</ul>\n<p>有时候还需要用到 <a href=\"option.html#series-custom.renderItem.arguments.api.size\" target=\"_blank\">api.size(...)</a> 函数,表示得到坐标系上一段数值范围对应的长度。</p>\n<p>返回值中样式的设置可以使用 <a href=\"option.html#series-custom.renderItem.arguments.api.style\" target=\"_blank\">api.style(...)</a> 函数,他能得到 <a href=\"option.html#series-custom.itemStyle\" target=\"_blank\">series.itemStyle</a> 中定义的样式信息,以及视觉映射的样式信息。也可以用这种方式覆盖这些样式信息:<code class=\"codespan\">api.style({fill: &#39;green&#39;, stroke: &#39;yellow&#39;})</code>。</p>\n<p>书写完 <code class=\"codespan\">renderItem</code> 方法后,自定义系列的 90% 工作就做完了。剩下的是一些精化工作。</p>\n<h2 id=\"-\">(二)使坐标轴的范围自适应数据范围</h2>\n<p>在 <a href=\"option.html#grid\" target=\"_blank\">直角坐标系(grid)</a>、<a href=\"option.html#polar\" target=\"_blank\">极坐标系(polar)</a> 中都有坐标轴。坐标轴的刻度范围需要自适应当前显示出的数据的范围,否则绘制出的图形会超出去。所以,例如,在 <a href=\"option.html#grid\" target=\"_blank\">直角坐标系(grid)</a> 中,使用自定义系列的开发者,需要设定,<code class=\"codespan\">data</code> 中的哪些维度会对应到 <code class=\"codespan\">x</code> 轴上,哪些维度会对应到 <code class=\"codespan\">y</code> 轴上。这件事通过 <a href=\"option.html#series-custom.encode\" target=\"_blank\">encode</a> 来设定。例如:</p>\n<pre><code class=\"lang-js\">option = {\n    series: [{\n        type: &#39;custom&#39;,\n        renderItem: function () {\n            ...\n        },\n        encode: {\n            // data 中『维度1』和『维度2』对应到 X 轴\n            x: [1, 2],\n            // data 中『维度0』对应到 Y 轴\n            y: 0\n        },\n        data: [\n            // 维度0  维度1  维度2  维度3\n            [   12,   44,   55,   60   ], // 这是第一个 dataItem\n            [   53,   31,   21,   56   ], // 这是第二个 dataItem\n            [   71,   33,   10,   20   ], // 这是第三个 dataItem\n            ...\n        ]\n    }]\n};\n</code></pre>\n<h2 id=\"-tooltip\">(三)设定 tooltip</h2>\n<p>当然,使用 <a href=\"option.html#tooltip.formatter\" target=\"_blank\">tooltip.formatter</a> 可以任意定制 tooltip 中的内容。但是还有更简单的方法,通过<a href=\"option.html#series-custom.encode\" target=\"_blank\">encode</a> 和 <a href=\"option.html#series-custom.dimensions\" target=\"_blank\">dimensions</a> 来设定:</p>\n<pre><code class=\"lang-js\">option = {\n    series: [{\n        type: &#39;custom&#39;,\n        renderItem: function () {\n            ...\n        },\n        encode: {\n            x: [1, 2],\n            y: 0,\n            // 表示『维度2』和『维度3』要显示到 tooltip 中。\n            tooltip: [2, 3]\n        },\n        // 表示给『维度2』和『维度3』分别取名为『年龄』和『满意度』,显示到 tooltip 中。\n        dimensions: [null, null, &#39;年龄&#39;, &#39;满意度&#39;],\n        data: [\n            // 维度0  维度1  维度2  维度3\n            [   12,   44,   55,   60   ], // 这是第一个 dataItem\n            [   53,   31,   21,   56   ], // 这是第二个 dataItem\n            [   71,   33,   10,   20   ], // 这是第三个 dataItem\n            ...\n        ]\n    }]\n};\n</code></pre>\n<p><br>\n<br>\n<br></p>\n<hr>\n<p>上面,一个简单的 custome series 例子完成了。</p>\n<p>下面介绍几个其他细节要点。</p>\n<h2 id=\"-\">(四)超出坐标系范围的截取</h2>\n<p>与 <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a> 结合使用的时候,常常使用会设置 <a href=\"option.html#dataZoom.filterMode\" target=\"_blank\">dataZoom.filterMode</a> 为 &#39;weakFilter&#39;。这个设置的意思是:当 <code class=\"codespan\">dataItem</code> 部分超出坐标系边界的时候,<code class=\"codespan\">dataItem</code> 不会整体被过滤掉。例如:</p>\n<pre><code class=\"lang-js\">option = {\n    dataZoom: {\n        xAxisIndex: 0,\n        filterMode: &#39;weakFilter&#39;\n    },\n    series: [{\n        type: &#39;custom&#39;,\n        renderItem: function () {\n            ...\n        },\n        encode: {\n            // data 中『维度1』和『维度2』对应到 X 轴\n            x: [1, 2],\n            y: 0\n        },\n        data: [\n            // 维度0  维度1  维度2  维度3\n            [   12,   44,   55,   60   ], // 这是第一个 dataItem\n            [   53,   31,   21,   56   ], // 这是第二个 dataItem\n            [   71,   33,   10,   20   ], // 这是第三个 dataItem\n            ...\n        ]\n    }]\n};\n</code></pre>\n<p>在这个例子中,『维度1』和『维度2』对应到 X 轴,<code class=\"codespan\">dataZoom</code> 组件控制 X 轴的缩放。假如在缩放的过程中,某个 dataItem 的『维度1』超出了 X 轴的范围,『维度2』还在 X 轴的范围中,那么只要设置 <code class=\"codespan\">dataZoom.filterMode = &#39;weakFilter&#39;</code>,这个 dataItem 就不会被过滤掉,从而还能够使用 <code class=\"codespan\">renderItem</code> 绘制图形(可以使用上面提到过的 <code class=\"codespan\">echarts.graphic.clipRectByRect</code> 把图形绘制成被坐标系剪裁过的样子)。参见上面提到过的例子:<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=custom-profile\" target=\"_blank\">Profile</a></p>\n<h2 id=\"-dataindex\">(五)关于 dataIndex</h2>\n<p>开发者如果使用到的话应注意,<a href=\"option.html#series-custom.renderItem.arguments.params\" target=\"_blank\">renderItem.arguments.params</a> 中的 <code class=\"codespan\">dataIndex</code> 和 <code class=\"codespan\">dataIndexInside</code> 是有区别的:</p>\n<ul>\n<li><code class=\"codespan\">dataIndex</code> 指的 <code class=\"codespan\">dataItem</code> 在原始数据中的 index。</li>\n<li><code class=\"codespan\">dataIndexInside</code> 指的是 <code class=\"codespan\">dataItem</code> 在当前数据窗口(参见 <a href=\"option.html#dataZoom\" target=\"_blank\">dataZoom</a>)中的 index。</li>\n</ul>\n<p><a href=\"option.html#series-custom.renderItem.arguments.api\" target=\"_blank\">renderItem.arguments.api</a> 中使用的参数都是 <code class=\"codespan\">dataIndexInside</code> 而非 <code class=\"codespan\">dataIndex</code>,因为从 <code class=\"codespan\">dataIndex</code> 转换成 <code class=\"codespan\">dataIndexInside</code> 需要时间开销。</p>\n<h2 id=\"-\">(六)事件监听</h2>\n<pre><code class=\"lang-js\">chart.setOption({\n    // ...\n    series: {\n        type: &#39;custom&#39;,\n        renderItem: function () {\n            // ...\n            return {\n                type: &#39;group&#39;,\n                children: [{\n                    type: &#39;circle&#39;\n                    // ...\n                }, {\n                    type: &#39;circle&#39;,\n                    name: &#39;aaa&#39;,\n                    // 用户指定的信息,可以在 event handler 访问到。\n                    info: 12345,\n                    // ...\n                }]\n            };\n        }\n    }\n});\nchart.on(&#39;click&#39;, {element: &#39;aaa&#39;}, function (params) {\n    // 当 name 为 &#39;aaa&#39; 的图形元素被点击时,此回调被触发。\n    console.log(params.info);\n});\n</code></pre>\n<h2 id=\"-\">(七)自定义矢量图形</h2>\n<p>自定义系列能支持使用 <a href=\"http://www.w3.org/TR/SVG/paths.html#PathData\" target=\"_blank\">SVG PathData</a> 定义矢量路径。从而可以使用矢量图工具中做出的图形。参见:<a href=\"option.html#series-custom.renderItem.return_path\" target=\"_blank\">path</a>,以及例子:<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=custom-calendar-icon\" target=\"_blank\">icons</a> 和 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=custom-gantt-flight\" target=\"_blank\">shapes</a>。</p>\n<p><br></p>\n<p><strong>更多的自定义系列的例子参见:<a href=\"https://echarts.apache.org/examples/zh/index.html#chart-type-custom\" target=\"_blank\">custom examples</a></strong></p>\n"},"富文本标签":{"type":["*"],"description":"<p>在许多地方(如图、轴的标签等)都可以使用富文本标签。例如:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=pie-rich-text&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=treemap-obama&edit=1&reset=1\" width=\"800\" height=\"550\" ></iframe>\n\n\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=bar-rich-text&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<p><br></p>\n<p>其他一些例子:\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=map-labels&amp;edit=1&amp;reset=1\" target=\"_blank\">Map Labels</a>,\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=pie-nest&amp;edit=1&amp;reset=1\" target=\"_blank\">Pie Labels</a>,\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=gauge-car&amp;edit=1&amp;reset=1\" target=\"_blank\">Gauge</a>.</p>\n<p><br></p>\n<p>原先 Apache ECharts<sup>TM</sup> 中的文本标签,只能对整块统一进行样式设置,并且仅仅支持颜色和字体的设置,从而导致不易于制作表达能力更强的文字描述信息。</p>\n<p>echarts v3.7 以后,支持了富文本标签,能够:</p>\n<ul>\n<li>定制文本块整体的样式(如背景、边框、阴影等)、位置、旋转等。</li>\n<li>对文本块中个别片段定义样式(如颜色、字体、高宽、背景、阴影等)、对齐方式等。</li>\n<li>在文本中使用图片做小图标或者背景。</li>\n<li>特定组合以上的规则,可以做出简单表格、分割线等效果。</li>\n</ul>\n<p>开始下面的介绍之前,先说明一下下面会使用的两个名词的含义:</p>\n<ul>\n<li>文本块(Text Block):文本标签块整体。</li>\n<li>文本片段(Text fragment):文本标签块中的部分文本。</li>\n</ul>\n<p>如下图示例:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/text-block-fragment&edit=1&reset=1\" width=\"340\" height=\"240\" ></iframe>\n\n\n\n<h2 id=\"-\">文本样式相关的配置项</h2>\n<p>echarts 提供了丰富的文本标签配置项,包括:</p>\n<ul>\n<li>字体基本样式设置:<code class=\"codespan\">fontStyle</code>、<code class=\"codespan\">fontWeight</code>、<code class=\"codespan\">fontSize</code>、<code class=\"codespan\">fontFamily</code>。</li>\n<li>文字颜色:<code class=\"codespan\">color</code>。</li>\n<li>文字描边:<code class=\"codespan\">textBorderColor</code>、<code class=\"codespan\">textBorderWidth</code>。</li>\n<li>文字阴影:<code class=\"codespan\">textShadowColor</code>、<code class=\"codespan\">textShadowBlur</code>、<code class=\"codespan\">textShadowOffsetX</code>、<code class=\"codespan\">textShadowOffsetY</code>。</li>\n<li>文本块或文本片段大小:<code class=\"codespan\">lineHeight</code>、<code class=\"codespan\">width</code>、<code class=\"codespan\">height</code>、<code class=\"codespan\">padding</code>。</li>\n<li>文本块或文本片段的对齐:<code class=\"codespan\">align</code>、<code class=\"codespan\">verticalAlign</code>。</li>\n<li>文本块或文本片段的边框、背景(颜色或图片):<code class=\"codespan\">backgroundColor</code>、<code class=\"codespan\">borderColor</code>、<code class=\"codespan\">borderWidth</code>、<code class=\"codespan\">borderRadius</code>。</li>\n<li>文本块或文本片段的阴影:<code class=\"codespan\">shadowColor</code>、<code class=\"codespan\">shadowBlur</code>、<code class=\"codespan\">shadowOffsetX</code>、<code class=\"codespan\">shadowOffsetY</code>。</li>\n<li>文本块的位置和旋转:<code class=\"codespan\">position</code>、<code class=\"codespan\">distance</code>、<code class=\"codespan\">rotate</code>。</li>\n</ul>\n<p>可以在各处的 <code class=\"codespan\">rich</code> 属性中定义文本片段样式。例如 <a href=\"option.html#series-bar.label.rich\" target=\"_blank\">series-bar.label.rich</a></p>\n<p>例如:</p>\n<pre><code class=\"lang-js\">label: {\n    // 在文本中,可以对部分文本采用 rich 中定义样式。\n    // 这里需要在文本中使用标记符号:\n    // `{styleName|text content text content}` 标记样式名。\n    // 注意,换行仍是使用 &#39;\\n&#39;。\n    formatter: [\n        &#39;{a|这段文本采用样式a}&#39;,\n        &#39;{b|这段文本采用样式b}这段用默认样式{x|这段用样式x}&#39;\n    ].join(&#39;\\n&#39;),\n\n    // 这里是文本块的样式设置:\n    color: &#39;#333&#39;,\n    fontSize: 5,\n    fontFamily: &#39;Arial&#39;,\n    borderWidth: 3,\n    backgroundColor: &#39;#984455&#39;,\n    padding: [3, 10, 10, 5],\n    lineHeight: 20,\n\n    // rich 里是文本片段的样式设置:\n    rich: {\n        a: {\n            color: &#39;red&#39;,\n            lineHeight: 10\n        },\n        b: {\n            backgroundColor: {\n                image: &#39;xxx/xxx.jpg&#39;\n            },\n            height: 40\n        },\n        x: {\n            fontSize: 18,\n            fontFamily: &#39;Microsoft YaHei&#39;,\n            borderColor: &#39;#449933&#39;,\n            borderRadius: 4\n        },\n        ...\n    }\n}\n</code></pre>\n<blockquote>\n<p>注意:如果不定义 <code class=\"codespan\">rich</code>,不能指定文字块的 <code class=\"codespan\">width</code> 和 <code class=\"codespan\">height</code>。</p>\n</blockquote>\n<h2 id=\"-\">文本、文本框、文本片段的基本样式和装饰</h2>\n<p>每个文本可以设置基本的字体样式:<code class=\"codespan\">fontStyle</code>、<code class=\"codespan\">fontWeight</code>、<code class=\"codespan\">fontSize</code>、<code class=\"codespan\">fontFamily</code>。</p>\n<p>可以设置文字的颜色 <code class=\"codespan\">color</code> 和边框的颜色 <code class=\"codespan\">textBorderColor</code>、<code class=\"codespan\">textBorderWidth</code>。</p>\n<p>文本框可以设置边框和背景的样式:<code class=\"codespan\">borderColor</code>、<code class=\"codespan\">borderWidth</code>、<code class=\"codespan\">backgroundColor</code>、<code class=\"codespan\">padding</code>。</p>\n<p>文本片段也可以设置边框和背景的样式:<code class=\"codespan\">borderColor</code>、<code class=\"codespan\">borderWidth</code>、<code class=\"codespan\">backgroundColor</code>、<code class=\"codespan\">padding</code>。</p>\n<p>例如:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/text-options&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n\n<h2 id=\"-\">标签的位置</h2>\n<p>对于折线图、柱状图、散点图等,均可以使用 <code class=\"codespan\">label</code> 来设置标签。标签的相对于图形元素的位置,一般使用 <a href=\"option.html#series-scatter.label.position\" target=\"_blank\">label.position</a>、<a href=\"option.html#series-scatter.label.distance\" target=\"_blank\">label.distance</a> 来配置。</p>\n<p>例如:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/label-position&edit=1&reset=1\" width=\"800\" height=\"400\" ></iframe>\n\n\n<blockquote>\n<p>注意:<code class=\"codespan\">position</code> 在不同的图中可取值有所不同。<code class=\"codespan\">distance</code> 并不是在每个图中都支持。详情请参见 <a href=\"option.html\" target=\"_blank\">option 文档</a>。</p>\n</blockquote>\n<h2 id=\"-\">标签的旋转</h2>\n<p>某些图中,为了能有足够长的空间来显示标签,需要对标签进行旋转。例如:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=bar-label-rotation&edit=1&reset=1\" width=\"900\" height=\"500\" ></iframe>\n\n\n<p>这种场景下,可以结合 <a href=\"option.html#series-bar.label.align\" target=\"_blank\">align</a> 和 <a href=\"option.html#series-bar.label.verticalAlign\" target=\"_blank\">verticalAlign</a> 来调整标签位置。</p>\n<p>注意,逻辑是,先使用 <code class=\"codespan\">align</code> 和 <code class=\"codespan\">verticalAlign</code> 定位,再旋转。</p>\n<h2 id=\"-\">文本片段的排版和对齐</h2>\n<p>关于排版方式,每个文本片段,可以想象成 CSS 中的 <code class=\"codespan\">inline-block</code>,在文档流中按行放置。</p>\n<p>每个文本片段的内容盒尺寸(<code class=\"codespan\">content box size</code>),默认是根据文字大小决定的。但是,也可以设置 <code class=\"codespan\">width</code>、<code class=\"codespan\">height</code> 来强制指定,虽然一般不会这么做(参见下文)。文本片段的边框盒尺寸(<code class=\"codespan\">border box size</code>),由上述本身尺寸,加上文本片段的 <code class=\"codespan\">padding</code> 来得到。</p>\n<p>只有 <code class=\"codespan\">&#39;\\n&#39;</code> 是换行符,能导致换行。</p>\n<p>一行内,会有多个文本片段。每行的实际高度,由 <code class=\"codespan\">lineHeight</code> 最大的文本片段决定。文本片段的 <code class=\"codespan\">lineHeight</code> 可直接在 <code class=\"codespan\">rich</code> 中指定,也可以在 <code class=\"codespan\">rich</code> 的父层级中统一指定而采用到 <code class=\"codespan\">rich</code> 的所有项中,如果都不指定,则取文本片段的边框盒尺寸(<code class=\"codespan\">border box size</code>)。</p>\n<p>在一行的 <code class=\"codespan\">lineHeight</code> 被决定后,一行内,文本片段的竖直位置,由文本片段的 <code class=\"codespan\">verticalAlign</code> 来指定(这里和 CSS 中的规则稍有不同):</p>\n<ul>\n<li><code class=\"codespan\">&#39;bottom&#39;</code>:文本片段的盒的底边贴住行底。</li>\n<li><code class=\"codespan\">&#39;top&#39;</code>:文本片段的盒的顶边贴住行顶。</li>\n<li><code class=\"codespan\">&#39;middle&#39;</code>:居行中。</li>\n</ul>\n<p>文本块的宽度,可以直接由文本块的 <code class=\"codespan\">width</code> 指定,否则,由最长的行决定。宽度决定后,在一行中进行文本片段的放置。文本片段的 <code class=\"codespan\">align</code> 决定了文本片段在行中的水平位置:</p>\n<ul>\n<li>首先,从左向右连续紧靠放置 <code class=\"codespan\">align</code> 为 <code class=\"codespan\">&#39;left&#39;</code> 的文本片段盒。</li>\n<li>然后,从右向左连续紧靠放置 <code class=\"codespan\">align</code> 为 <code class=\"codespan\">&#39;right&#39;</code> 的文本片段盒。</li>\n<li>最后,剩余的没处理的文本片段盒,紧贴着,在中间剩余的区域中居中放置。</li>\n</ul>\n<p>关于文字在文本片段盒中的位置:</p>\n<ul>\n<li>如果 <code class=\"codespan\">align</code> 为 <code class=\"codespan\">&#39;center&#39;</code>,则文字在文本片段盒中是居中的。</li>\n<li>如果 <code class=\"codespan\">align</code> 为 <code class=\"codespan\">&#39;left&#39;</code>,则文字在文本片段盒中是居左的。</li>\n<li>如果 <code class=\"codespan\">align</code> 为 <code class=\"codespan\">&#39;right&#39;</code>,则文字在文本片段盒中是居右的。</li>\n</ul>\n<p>例如:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/text-fragment-align&edit=1&reset=1\" width=\"800\" height=\"220\" ></iframe>\n\n\n\n<h2 id=\"-\">特殊效果:图标、分割线、标题块、简单表格</h2>\n<p>看下面的例子:</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/title-block&edit=1&reset=1\" width=\"600\" height=\"400\" ></iframe>\n\n\n<p>文本片段的 <code class=\"codespan\">backgroundColor</code> 可以指定为图片后,就可以在文本中使用图标了:</p>\n<pre><code class=\"lang-js\">rich: {\n    Sunny: {\n        // 这样设定 backgroundColor 就可以是图片了。\n        backgroundColor: {\n            image: &#39;./data/asset/img/weather/sunny_128.png&#39;\n        },\n        // 可以只指定图片的高度,从而图片的宽度根据图片的长宽比自动得到。\n        height: 30\n    }\n}\n</code></pre>\n<p>分割线实际是用 border 实现的:</p>\n<pre><code class=\"lang-js\">rich: {\n    hr: {\n        borderColor: &#39;#777&#39;,\n        // 这里把 width 设置为 &#39;100%&#39;,表示分割线的长度充满文本块。\n        // 注意,这里是文本块内容盒(content box)的 100%,而不包含 padding。\n        // 虽然这和 CSS 相关的定义有所不同,但是在这类场景中更加方便。\n        width: &#39;100%&#39;,\n        borderWidth: 0.5,\n        height: 0\n    }\n}\n</code></pre>\n<p>标题块是使用 <code class=\"codespan\">backgroundColor</code> 实现的:</p>\n<pre><code class=\"lang-js\">// 标题文字居左\nformatter: &#39;{titleBg|Left Title}&#39;,\nrich: {\n    titleBg: {\n        backgroundColor: &#39;#000&#39;,\n        height: 30,\n        borderRadius: [5, 5, 0, 0],\n        padding: [0, 10, 0, 10],\n        width: &#39;100%&#39;,\n        color: &#39;#eee&#39;\n    }\n}\n\n// 标题文字居中。\n// 这个实现有些 tricky,但是,能够不引入更复杂的排版规则而实现这个效果。\nformatter: &#39;{tc|Center Title}{titleBg|}&#39;,\nrich: {\n    titleBg: {\n        align: &#39;right&#39;,\n        backgroundColor: &#39;#000&#39;,\n        height: 30,\n        borderRadius: [5, 5, 0, 0],\n        padding: [0, 10, 0, 10],\n        width: &#39;100%&#39;,\n        color: &#39;#eee&#39;\n    }\n}\n</code></pre>\n<p>简单表格的设定,其实就是给不同行上纵向对应的文本片段设定同样的宽度就可以了。参见本文最开始的 <a href=\"https://echarts.apache.org/examples/zh/view.html?c=pie-rich-text&amp;edit=1&amp;reset=1\" target=\"_blank\">例子</a>。</p>\n"},"服务端渲染":{"type":["*"],"description":"<p>Apache ECharts<sup>TM</sup> 可以在服务端进行渲染。例如 <a href=\"https://echarts.apache.org/examples/zh/index.html\" target=\"_blank\">官方示例</a> 里的一个个小截图,就是在服务端预生成出来的。</p>\n<p>服务端渲染可以使用流行的 headless 环境,例如 <a href=\"https://github.com/GoogleChrome/puppeteer\" target=\"_blank\">puppeteer</a>、<a href=\"https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md\" target=\"_blank\">headless chrome</a>、<a href=\"https://github.com/Automattic/node-canvas\" target=\"_blank\">node-canvas</a>、<a href=\"https://github.com/jsdom/jsdom\" target=\"_blank\">jsdom</a>、<a href=\"http://phantomjs.org/\" target=\"_blank\">PhantomJS</a> 等。</p>\n<p>这是一些社区贡献的 echarts 服务端渲染方案:</p>\n<ul>\n<li><a href=\"https://github.com/hellosean1025/node-echarts\" target=\"_blank\">https://github.com/hellosean1025/node-echarts</a></li>\n<li><a href=\"https://github.com/chfw/echarts-scrappeteer\" target=\"_blank\">https://github.com/chfw/echarts-scrappeteer</a></li>\n<li><a href=\"https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js\" target=\"_blank\">https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js</a></li>\n<li><a href=\"https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73\" target=\"_blank\">https://gist.github.com/pissang/4c32ee30e35c91336af72b129a1a4a73</a></li>\n</ul>\n<p>注意:如果发现 server 端渲染结果和浏览器渲染结果不一致,请将 <a href=\"option.html#animation\" target=\"_blank\">animation</a> 设置为 <code class=\"codespan\">false</code> 再尝试一下。</p>\n"},"使用 Canvas 或者 SVG 渲染":{"type":["*"],"description":"<p>浏览器端图表库大多会选择 SVG 或者 Canvas 进行渲染。对于绘制图表来说,这两种技术往往是可替换的,效果相近。但是在一些场景中,他们的表现和能力又有一定差异。于是,对它们的选择取舍,就成为了一个一直存在的不易有标准答案的话题。</p>\n<p>Apache ECharts<sup>TM</sup> 从初始一直使用 Canvas 绘制图表(除了对 IE8- 使用 VML)。而 <a href=\"https://github.com/apache/echarts/releases\" target=\"_blank\">ECharts v4.0</a> 发布了 SVG 渲染器,从而提供了一种新的选择。只须在初始化一个图表实例时,设置 <a href=\"api.html#echarts.init\" target=\"_blank\">renderer 参数</a> 为 <code class=\"codespan\">&#39;canvas&#39;</code> 或 <code class=\"codespan\">&#39;svg&#39;</code> 即可指定渲染器,比较方便。</p>\n<blockquote>\n<p>SVG 和 Canvas 这两种使用方式差异很大的技术,能够做到同时被透明支持,主要归功于 ECharts 底层库 <a href=\"https://github.com/ecomfe/zrender\" target=\"_blank\">ZRender</a> 的抽象和实现,形成可互换的 SVG 渲染器和 Canvas 渲染器。</p>\n</blockquote>\n<h2 id=\"-\">选择哪种渲染器</h2>\n<p>一般来说,Canvas 更适合绘制图形元素数量非常大(这一般是由数据量大导致)的图表(如热力图、地理坐标系或平行坐标系上的大规模线图或散点图等),也利于实现某些视觉 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=lines-bmap-effect\" target=\"_blank\">特效</a>。但是,在不少场景中,SVG 具有重要的优势:它的内存占用更低(这对移动端尤其重要)、渲染性能略高、并且用户使用浏览器内置的缩放功能时不会模糊。</p>\n<p>选择哪种渲染器,我们可以根据软硬件环境、数据量、功能需求综合考虑。</p>\n<ul>\n<li>在软硬件环境较好,数据量不大的场景下(例如 PC 端做商务报表),两种渲染器都可以适用,并不需要太多纠结。</li>\n<li>在环境较差,出现性能问题需要优化的场景下,可以通过试验来确定使用哪种渲染器。比如有这些经验:<ul>\n<li>在须要创建很多 ECharts 实例且浏览器易崩溃的情况下(可能是因为 Canvas 数量多导致内存占用超出手机承受能力),可以使用 SVG 渲染器来进行改善。大略得说,如果图表运行在低端安卓机,或者我们在使用一些特定图表如 <a href=\"https://ecomfe.github.io/echarts-liquidfill/example/\" target=\"_blank\">水球图</a> 等,SVG 渲染器可能效果更好。</li>\n<li>数据量很大、较多交互时,可以选用 Canvas 渲染器。</li>\n</ul>\n</li>\n</ul>\n<p>我们强烈欢迎开发者们 <a href=\"https://github.com/apache/echarts/issues/new\" target=\"_blank\">反馈</a> 给我们使用的体验和场景,帮助我们更好的做优化。</p>\n<p>注:除了某些特殊的渲染可能依赖 Canvas:如<a href=\"option.html#series-lines.effect\" target=\"_blank\">炫光尾迹特效</a>、<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=heatmap-bmap\" target=\"_blank\">带有混合效果的热力图</a>等,绝大部分功能 SVG 都是支持的。</p>\n<h2 id=\"-\">如何使用渲染器</h2>\n<p>ECharts 默认使用 Canvas 渲染。如果想使用 SVG 渲染,ECharts 代码中须包括有 SVG 渲染器模块。</p>\n<ul>\n<li>ECharts 的 <a href=\"https://www.jsdelivr.com/package/npm/echarts\" target=\"_blank\">预构建文件</a> 中,<a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.common.min.js\" target=\"_blank\">常用版</a> 和 <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js\" target=\"_blank\">完整版</a> 已经包含了 SVG 渲染器,可直接使用。而 <a href=\"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.simple.min.js\" target=\"_blank\">精简版</a> 没有包括。</li>\n<li>如果 <a href=\"https://echarts.apache.org/zh/builder.html\" target=\"_blank\">在线自定义构建 ECharts</a>,则需要勾上页面下方的 “SVG 渲染”。</li>\n<li>如果 <a href=\"tutorial.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E6%9E%84%E5%BB%BA%20ECharts\" target=\"_blank\">线下自定义构建 ECharts</a>,则须引入 SVG 渲染器模块,即:</li>\n</ul>\n<pre><code class=\"lang-js\">import &#39;zrender/lib/svg/svg&#39;;\n</code></pre>\n<p>然后,我们就可以在代码中,初始化图表实例时,<a href=\"api.html#echarts.init\" target=\"_blank\">传入参数</a> 选择渲染器类型:</p>\n<pre><code class=\"lang-js\">// 使用 Canvas 渲染器(默认)\nvar chart = echarts.init(containerDom, null, {renderer: &#39;canvas&#39;});\n// 等价于:\nvar chart = echarts.init(containerDom);\n\n// 使用 SVG 渲染器\nvar chart = echarts.init(containerDom, null, {renderer: &#39;svg&#39;});\n</code></pre>\n"},"地理坐标系和地图系列的 SVG 底图":{"type":["*"],"description":"<p>从 <code class=\"codespan\">v5.1.0</code> 开始,ECharts 支持在 <a href=\"option.html#geo\" target=\"_blank\">地理坐标系(geo)</a> 和 <a href=\"option.html#series-map\" target=\"_blank\">地图系列(map series)</a> 中使用 SVG 作为底图。之前只支持 <a href=\"http://geojson.org/\" target=\"_blank\">GeoJSON</a> 格式的底图。</p>\n<p>有了这个功能,ECharts 能在任一种渲染模式(<code class=\"codespan\">canvas</code> 渲染模式和 <code class=\"codespan\">svg</code> 渲染模式)中绘制 SVG 底图,并且能够只用简单的 ECharts 配置项(option)就带来 <a href=\"option.html#geo.roam\" target=\"_blank\">放大</a>、<a href=\"option.html#geo.roam\" target=\"_blank\">平移</a>、<a href=\"option.html#geo.select\" target=\"_blank\">点选(select)</a>、<a href=\"option.html#geo.roam\" target=\"_blank\">高亮强调(emphasis)</a>、<a href=\"option.html#geo.emphasis.focus\" target=\"_blank\">聚焦-淡出(focus-blur)</a>、<a href=\"option.html#geo.label\" target=\"_blank\">标签(label)</a>、<a href=\"option.html#series-map.labelLayout\" target=\"_blank\">标签布局(labelLayout)</a>、<a href=\"option.html#geo.tooltip\" target=\"_blank\">提示框(tooltip)</a> 等特性。ECharts 中的所有在 <a href=\"option.html#geo\" target=\"_blank\">地理坐标系(geo)</a> 中可用系列(如 <a href=\"option.html#series-scatter\" target=\"_blank\">散点图(scatter)</a>、<a href=\"option.html#series-effectScatter\" target=\"_blank\">特效散点图(effectScatter)</a>,<a href=\"option.html#series-lines\" target=\"_blank\">路径图(lines)</a>,<a href=\"option.html#series-custom\" target=\"_blank\">自定义系列(custom)</a>)也能显示在 SVG 底图上。</p>\n<p>这些是使用 SVG 底图的例子:</p>\n<p><a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-beef-cuts\" target=\"_blank\">庖丁解牛</a> |\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-organ\" target=\"_blank\">内脏数据</a> |\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-seatmap-flight\" target=\"_blank\">航班选座</a> |\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-svg-map\" target=\"_blank\">地图</a> |\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-svg-scatter-simple\" target=\"_blank\">散点图</a> |\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-svg-lines\" target=\"_blank\">路径图</a> |\n<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-svg-traffic\" target=\"_blank\">交通</a></p>\n<h2 id=\"-\">基本用法</h2>\n<p>SVG 底图的用法与 <a href=\"http://geojson.org/\" target=\"_blank\">GeoJSON</a> 底图的用法相同。</p>\n<p>如果在 <a href=\"option.html#geo\" target=\"_blank\">地理坐标系(geo)</a> 中使用:</p>\n<pre><code class=\"lang-js\">$.get(&#39;map/organ.svg&#39;, function (svg) {\n    // 首先向 echarts 注册 SVG 字符串或解析过的 SVG DOM\n    echarts.registerMap(&#39;organ_diagram&#39;, {svg: svg});\n\n    var chart = echarts.init(document.getElementById(&#39;main&#39;))。\n    chart.setOption({\n        geo: [{\n            // 引用注册过的底图。\n            map: &#39;organ_diagram&#39;,\n            ...\n        }]\n    });\n});\n</code></pre>\n<p>如果在 <a href=\"option.html#series-map\" target=\"_blank\">地图系列(map series)</a> 中使用:</p>\n<pre><code class=\"lang-js\">$.get(&#39;map/beef_cuts.svg&#39;, function (svg) {\n    // 首先向 echarts 注册 SVG 字符串或解析过的 SVG DOM\n    echarts.registerMap(&#39;beef_cuts_diagram&#39;, {svg: svg})。\n\n    var chart = echarts.init(document.getElementById(&#39;main&#39;))。\n    chart.setOption({\n        series: {\n            type: &#39;map&#39;,\n            // 引用注册过的底图。\n            map: &#39;beef_cuts_diagram&#39;,\n            ...\n        }\n    });\n});\n</code></pre>\n<h2 id=\"-\">缩放和平移</h2>\n<p><a href=\"option.html#geo\" target=\"_blank\">地理坐标系(geo)</a></p>\n<pre><code class=\"lang-js\">option = {\n    geo: {\n        // 启用缩放和平移。\n        roam: true,\n        ...\n    }\n};\n</code></pre>\n<p><a href=\"option.html#series-map\" target=\"_blank\">地图系列(map series)</a></p>\n<pre><code class=\"lang-js\">option = {\n    series: {\n        type: &#39;map&#39;,\n        // 启用缩放和平移。\n        roam: true,\n        ...\n    }\n};\n</code></pre>\n<p>参见例子 <a href=\"option.html#geo.roam\" target=\"_blank\">roam</a>、<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-svg-map\" target=\"_blank\">SVG 地图</a>。</p>\n<h2 id=\"-\">具名元素</h2>\n<p>如果要控制 SVG 中的某些元素,或者让某些元素能交互,我们首先要在 SVG 中标记这些元素:在这些元素上添加 <code class=\"codespan\">name</code> 属性(下文称此类添加过 <code class=\"codespan\">name</code> 属性的元素为:“具名元素”)。许多功能(如 <a href=\"option.html#geo.select\" target=\"_blank\">select</a>、<a href=\"option.html#geo.emphasis\" target=\"_blank\">emphasis</a>、<a href=\"option.html#geo.emphasis.focus\" target=\"_blank\">focus-blur</a>、<a href=\"option.html#geo.label\" target=\"_blank\">label</a>、<a href=\"option.html#series-map.labelLayout\" target=\"_blank\">labelLayout</a> 和 <a href=\"option.html#geo.tooltip\" target=\"_blank\">tooltip</a> 这类交互相关的功能)都依赖于对元素的命名。</p>\n<p>如下例,我们只在左边的 SVG <code class=\"codespan\">path</code> 上添加名称属性 <code class=\"codespan\">name=&quot;named_rect&quot;</code>:</p>\n<pre><code class=\"lang-xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\n&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; version=&quot;1.2&quot; fill-rule=&quot;evenodd&quot; xml:space=&quot;preserve&quot;&gt;\n    &lt;path name=&quot;named_rect&quot; d=&quot;M 0,0 L 0,100 100,100 100,0 Z&quot; fill=&quot;#765&quot; /&gt;\n    &lt;path d=&quot;M 150,0 L 150,100 250,100 250,0 Z&quot; fill=&quot;#567&quot; /&gt;\n&lt;/svg&gt;\n</code></pre>\n<p>这样,鼠标 hover 时能高亮左边的矩形,但是右边的不行。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/geo-svg-named-basic&edit=1&reset=1\" width=\"500\" height=\"200\" ></iframe>\n\n\n<p>我们还可以在 <a href=\"option.html#geo.regions\" target=\"_blank\">geo.regions</a> 中为具名元素指定一些专属配置项:</p>\n<pre><code class=\"lang-js\">option = {\n    geo: {\n        map: &#39;some_svg&#39;,\n        regions: [{\n            name: &#39;element_name_1&#39;,\n            itemStyle: { ... }\n        }, {\n            name: &#39;element_name_2&#39;,\n            itemStyle: { ... }\n        }]\n    }\n};\n</code></pre>\n<p>注意:</p>\n<ul>\n<li>只有这些 SVG 元素可以被命名:\n<code class=\"codespan\">rect</code>、<code class=\"codespan\">circle</code>、<code class=\"codespan\">line</code>、<code class=\"codespan\">ellipse</code>、<code class=\"codespan\">polygon</code>、<code class=\"codespan\">polyline</code>、<code class=\"codespan\">path</code>、<code class=\"codespan\">text</code>、<code class=\"codespan\">tspan</code>、<code class=\"codespan\">g</code>。</li>\n<li>支持多个元素以相同的名称命名,这样它们能被同时高亮、选中。</li>\n</ul>\n<h2 id=\"-\">自定义样式</h2>\n<p>虽然 SVG 元素的样式(如颜色、字体、线宽等等)都能直接在 SVG 文件中定义,但 ECharts 也支持在 <code class=\"codespan\">option</code> 中为具名元素定制样式,这能提供不少便利。</p>\n<p>可以在 <a href=\"option.html#geo.itemStyle\" target=\"_blank\">geo.itemStyle</a> 或 <a href=\"option.html#series-map.itemStyle\" target=\"_blank\">series-map.itemStyle</a> 中设置样式(也包括 <code class=\"codespan\">emphasis.itemStyle</code>、<code class=\"codespan\">select.itemStyle</code>、<code class=\"codespan\">blur.itemStyle</code>、<code class=\"codespan\">regions[i].itemStyle</code>、<code class=\"codespan\">regions[i].emphasis.itemStyle</code>、<code class=\"codespan\">regions[i].select.itemStyle</code>、<code class=\"codespan\">regions[i].blur.itemStyle</code>)。也能在这里删除一些具名元素的默认样式(例如,设置 <code class=\"codespan\">emphasis.itemStyle.color: null</code> 后,鼠标 hover 时填充色就不会改变)。</p>\n<p>此外,使用 <a href=\"option.html#series-map\" target=\"_blank\">series-map</a> 时,也可以用 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap 组件</a> 为具名元素赋予样式。参见例子 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-beef-cuts\" target=\"_blank\">庖丁解牛</a>。</p>\n<p>注意:\n只有这些具名元素可以在 <code class=\"codespan\">itemStyle</code> 中设置样式:\n<code class=\"codespan\">rect</code>、<code class=\"codespan\">circle</code>、<code class=\"codespan\">line</code>、<code class=\"codespan\">ellipse</code>、<code class=\"codespan\">polygon</code>、<code class=\"codespan\">polyline</code>、<code class=\"codespan\">path</code>。</p>\n<h2 id=\"-select-\">元素的“选中”能力(select)</h2>\n<p>如果想使具名元素能被“选中”,把 <a href=\"option.html#geo.selectedMode\" target=\"_blank\">geo.selectedMode</a> 或 <a href=\"option.html#series-map.selectedMode\" target=\"_blank\">series-map.selectedMode</a> 设置为 <code class=\"codespan\">&#39;single&#39;</code> 或者 <code class=\"codespan\">&#39;multiple&#39;</code> 即可。元素被选中时的样式可以在 <a href=\"option.html#geo.select\" target=\"_blank\">geo.select</a> 或 <a href=\"option.html#series-map.select\" target=\"_blank\">series-map.select</a> 中设定。</p>\n<p>可以通过 <a href=\"api.html#event.geoselectchanged\" target=\"_blank\">geoselectchanged</a> 事件获得所有被选中者的名称,例如:</p>\n<pre><code class=\"lang-js\">myChart.on(&#39;geoselectchanged&#39;, function (params) {\n    var selectedNames = params.allSelected[0].name;\n    console.log(&#39;selected&#39;, selectedNames);\n});\n</code></pre>\n<p>参见例子 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-seatmap-flight\" target=\"_blank\">航班选座</a>。</p>\n<h2 id=\"-emphasis-focus-blur-\">元素的“高亮强调”(emphasis)和“聚焦-淡出”(focus-blur)</h2>\n<p>具名元素可以自动在鼠标 hover 时有“高亮强调”(emphasis)的能力。</p>\n<p>此外,可以把 <a href=\"option.html#geo.emphasis.focus\" target=\"_blank\">geo.emphasis.focus</a> 设置为 <code class=\"codespan\">&#39;self&#39;</code> 来启用 “聚焦-淡出”(focus-blur)功能。也就是,当鼠标 hover 在一个具名元素上时,所有其他元素都会被淡出。</p>\n<p>参见例子 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-organ\" target=\"_blank\">Organ Visualization</a>。</p>\n<h2 id=\"-tooltip-\">提示框(tooltip)</h2>\n<p>可以在具名元素上启用或禁用提示框(tooltip)功能。</p>\n<pre><code class=\"lang-js\">option = {\n    // 在 option 根部声明 tooltip 以整体开启 tooltip 功能。\n    tooltip: {},\n    geo: {\n        map: &#39;some_svg&#39;,\n        tooltip: {\n            // 用 `show` 来启用/禁用 geo 上的 tooltip。\n            show: true\n        },\n        regions: [{\n            name: &#39;some_name1&#39;,\n            // 如果需要的话,可以对特定具名元素指定 tooltip 参数。\n            tooltip: {\n                formatter: &#39;一些特殊的提示 1&#39;\n            }\n        }, {\n            name: &#39;some_name2&#39;,\n            tooltip: {\n                formatter: &#39;一些特殊的提示 2&#39;\n            }\n        }]\n    }\n};\n</code></pre>\n<p>如果想单独禁用 geo 上的 tooltip,只需:</p>\n<pre><code class=\"lang-js\">option = {\n    tooltip: {},\n    geo: {\n        map: &#39;some_svg&#39;,\n        tooltip: {\n            show: false\n        }\n    }\n};\n</code></pre>\n<p>参见例子 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-svg-map\" target=\"_blank\">SVG 地图</a>。</p>\n<h2 id=\"-label-\">标签(label)</h2>\n<p>虽然可以直接在 SVG 中定义 <code class=\"codespan\">&lt;text&gt;</code>/<code class=\"codespan\">&lt;tspan&gt;</code> 来显示文本标签,但 ECharts 也支持用 <a href=\"option.html#geo.label\" target=\"_blank\">geo.label</a> 或 <a href=\"option.html#series-map.label\" target=\"_blank\">series-map.label</a> 来设置底图上的标签。</p>\n<p>标签功能默认在鼠标 hover 时是启用的。如果想禁用标签,只需:</p>\n<pre><code class=\"lang-js\">option = {\n    geo: {\n        map: &#39;some_svg&#39;,\n        emphasis: {\n            label: {\n                show: false\n            }\n        }\n    }\n};\n</code></pre>\n<p>当想要多个元素共享一个标签时,我们有两种选择:</p>\n<ul>\n<li>将这些元素包裹在一个具名的 <code class=\"codespan\">&lt;g&gt;</code> 中(如 <code class=\"codespan\">&lt;g=&quot;name_a&quot;&gt;</code>)中,这样只会显示一个标签,并且基于 <code class=\"codespan\">&lt;g&gt;</code> 的 <code class=\"codespan\">boundingRect</code> 定位。</li>\n<li>给这些元素起相同的名字(如 <code class=\"codespan\">&lt;path name=&quot;name_b&quot;/&gt;&lt;path name=&quot;name_b&quot;/&gt;</code>),这样每个元素都会显示一个标签,并且会根据每个元素自身显示和定位。</li>\n</ul>\n<p>例如(将鼠标 hover 到元素上能显示标签):</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/geo-svg-label-basic&edit=1&reset=1\" width=\"500\" height=\"300\" ></iframe>\n\n\n<p>注意:只有这些具名元素可以设置 <code class=\"codespan\">label</code>:\n<code class=\"codespan\">rect</code>、<code class=\"codespan\">circle</code>、<code class=\"codespan\">line</code>、<code class=\"codespan\">ellipse</code>、<code class=\"codespan\">polygon</code>、<code class=\"codespan\">polyline</code>、<code class=\"codespan\">path</code>、<code class=\"codespan\">g</code>。</p>\n<p>标签的用法也参见示例 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-organ\" target=\"_blank\">Organ Visualization</a>。</p>\n<h2 id=\"-\">事件</h2>\n<p>可以用如下方式监听具名元素的鼠标事件或者触摸事件:</p>\n<pre><code class=\"lang-js\">// &#39;name1&#39; 是一个 SVG 元素的名字。\nmyChart.on(&#39;click&#39;, { geoIndex: 0, name: &#39;name1&#39; }, function (params) {\n    console.log(params);\n});\n</code></pre>\n<h2 id=\"svg-\">SVG 底图的布局</h2>\n<p>在默认情况下,ECharts 会将 SVG 底图放置在画布的中心。如果需要调整的话,一般只调整 <a href=\"option.html#geo.layoutCenter\" target=\"_blank\">layoutCenter</a>/<a href=\"option.html#geo.layoutSize\" target=\"_blank\">layoutSize</a>,偶尔也可能要调整 <code class=\"codespan\">&lt;svg viewBox=&quot;...&quot;&gt;</code>/<a href=\"option.html#geo.boundingCoords\" target=\"_blank\">geo.boundingCoords</a>(它们两个的区别是:是否产生剪裁)。在大多数情况下,用这些已经足够了。</p>\n<p>如果要做一些精确的位置定制,那么还得了解下面这些概念。</p>\n<p><a href=\"option.html#geo\" target=\"_blank\">地理坐标系(geo)</a> 和 <a href=\"option.html#series-map\" target=\"_blank\">地图系列(map series)</a> 的布局规则和选项都是一样的。所以下面我们只讲 <a href=\"option.html#geo\" target=\"_blank\">地理坐标系(geo)</a>。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/geo-svg-layout-basic&edit=1&reset=1\" width=\"700\" height=\"550\" ></iframe>\n\n\n<p>上面的例子只有一个 ECharts 画布,其中三个 SVG 展示在六个 <a href=\"option.html#geo\" target=\"_blank\">地理坐标系(geo)</a> 中。同一列中的两个 <a href=\"option.html#geo\" target=\"_blank\">地理坐标系(geo)</a> 使用相同的 SVG。</p>\n<p>首先,形状的外观是由 SVG 文件本身决定的。也就是说,在上例中,由 <code class=\"codespan\">&lt;circle&gt;</code> 和 <code class=\"codespan\">viewBox</code> 属性决定(<code class=\"codespan\">viewBox</code> 会切割圆形)。可以注意,每一列的形状轮廓都一样(不管它们的位置、大小是否不同和是否被拉伸),因为它们使用的是同一个 SVG。</p>\n<p>其次,用户可以用下面任一组选项,指定 <a href=\"option.html#geo\" target=\"_blank\">地理坐标系(geo)</a> 的视口(<code class=\"codespan\">view port</code>)的位置和大小(它们的单位都是 echarts 画布的像素,或者百分比值):</p>\n<ul>\n<li><a href=\"option.html#geo.layoutCenter\" target=\"_blank\">layoutCenter</a>、<a href=\"option.html#geo.layoutSize\" target=\"_blank\">layoutSize</a>(最常用)。</li>\n<li><a href=\"option.html#geo.top\" target=\"_blank\">top</a>、<a href=\"option.html#geo.right\" target=\"_blank\">right</a>、<a href=\"option.html#geo.bottom\" target=\"_blank\">bottom</a>、<a href=\"option.html#geo.left\" target=\"_blank\">left</a>(在上例中使用的是这组)。</li>\n</ul>\n<p>在上例中,六个 <code class=\"codespan\">geo view port</code> 用六个黑色方块表示。</p>\n<p>第三,确定 SVG 的 <code class=\"codespan\">bounding rect</code>。<code class=\"codespan\">bounding rect</code> 由以下方法决定(它们的单位都是 SVG 内部元素的度量单位):</p>\n<ol>\n<li>如果设定了 <a href=\"option.html#geo.boundingCoords\" target=\"_blank\">geo.boundingCoords</a>,则用它作 <code class=\"codespan\">bounding rect</code>。</li>\n<li>否则,如果设定了 <code class=\"codespan\">&lt;svg width=&quot;...&quot; height=&quot;...&quot;&gt;</code>,则用 <code class=\"codespan\">[0, 0, width, height]</code> 作为 <code class=\"codespan\">bounding rect</code>。(如果只设定了 <code class=\"codespan\">width</code> 或 <code class=\"codespan\">height</code>,则只使用 <code class=\"codespan\">[0, width]</code> 或 <code class=\"codespan\">[0, height]</code>)。</li>\n<li>否则,如果设定了 <code class=\"codespan\">&lt;svg viewBox=&quot;...&quot;&gt;</code>,则用 <code class=\"codespan\">viewBox</code> 作 <code class=\"codespan\">bounding rect</code>。</li>\n<li>否则,由整个 SVG 所有元素 <code class=\"codespan\">bounding rect</code> 的并集得到最终 <code class=\"codespan\">bounding rect</code>。</li>\n<li>如果设定了 <a href=\"option.html#geo.center\" target=\"_blank\">geo.center</a> 或 <a href=\"option.html#geo.zoom\" target=\"_blank\">geo.zoom</a>,则把上述 <code class=\"codespan\">1~4</code> 得到的 <code class=\"codespan\">bounding rect</code> 进行相应的 <code class=\"codespan\">transform</code>。</li>\n</ol>\n<p><code class=\"codespan\">bounding rect</code> 确定后,会放置到相应的 <code class=\"codespan\">geo view port</code> 里:</p>\n<ul>\n<li>如果用的是 <a href=\"option.html#geo.layoutCenter\" target=\"_blank\">layoutCenter</a>、<a href=\"option.html#geo.layoutSize\" target=\"_blank\">layoutSize</a>,<code class=\"codespan\">bounding rect</code> 会置于 <code class=\"codespan\">geo view port</code> 的中心,并尽量填满 <code class=\"codespan\">geo view port</code>(保持长宽比)。</li>\n<li>如果用的是 <a href=\"option.html#geo.top\" target=\"_blank\">top</a>、<a href=\"option.html#geo.right\" target=\"_blank\">right</a>、<a href=\"option.html#geo.bottom\" target=\"_blank\">bottom</a>、<a href=\"option.html#geo.left\" target=\"_blank\">left</a>,<code class=\"codespan\">bounding rect</code> 会被拉伸,完全填充 <code class=\"codespan\">geo view port</code>。</li>\n</ul>\n<h2 id=\"-svg-\">在 SVG 底图上绘制系列</h2>\n<p><a href=\"option.html#series-scatter\" target=\"_blank\">scatter</a>、<a href=\"option.html#series-effectScatter\" target=\"_blank\">effectScatter</a>、<a href=\"option.html#series-lines\" target=\"_blank\">lines</a>、<a href=\"option.html#series-custom\" target=\"_blank\">custom</a> 这些在 <a href=\"option.html#geo\" target=\"_blank\">地理坐标系(geo)</a> 中可用的系列都可以在 SVG 底图上定位和显示。</p>\n<p>在这种用法中,<code class=\"codespan\">series.data</code> 的值的单位即为是 SVG 内部元素的度量单位。比如说:</p>\n<pre><code class=\"lang-js\">option = {\n    geo: {\n        map: &#39;some_svg&#39;\n    },\n    series: {\n        type: &#39;effectScatter&#39;,\n        coordinateSystem: &#39;geo&#39;,\n        geoIndex: 0,\n        data: [\n            // SVG local coords.\n            [488.2358421078053, 459.70913833075736],\n            [770.3415644319939, 757.9672194986475],\n            [1180.0329284196291, 743.6141808346214],\n        ]\n    }\n};\n</code></pre>\n<p>另外,有种简便方法可以获得 SVG 的坐标。</p>\n<pre><code class=\"lang-js\">myChart.setOption({\n    geo: {\n        map: &#39;some_svg&#39;\n    }\n});\nmyChart.getZr().on(&#39;click&#39;, function (params) {\n    var pixelPoint = [params.offsetX, params.offsetY];\n    var dataPoint = myChart.convertFromPixel({ geoIndex: 0 }, pixelPoint);\n    // 在 SVG 上点击时,坐标会被打印。\n    // 这些坐标可以在 `series.data` 里使用。\n    console.log(dataPoint);\n});\n</code></pre>\n<p>参见示例 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-svg-scatter-simple\" target=\"_blank\">SVG Scatter</a>、<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-svg-lines\" target=\"_blank\">SVG Lines</a>、<a href=\"https://echarts.apache.org/examples/zh/editor.html?c=geo-traffic\" target=\"_blank\">SVG Traffic</a>。</p>\n<h2 id=\"-svg-\">暂不支持的 SVG 功能</h2>\n<p>实现一个完整的 SVG 解析器有点困难。虽然已经支持了常用的 SVG 功能,但至少下面列出的这些还没支持:</p>\n<ul>\n<li>翻转(flip)和倾斜(skew)(将在 <code class=\"codespan\">v5.1.2</code> 支持):<ul>\n<li>不支持 <code class=\"codespan\">transform: skew(...)</code>(包括包含 skew 的 <code class=\"codespan\">transform: matrix(...)</code>)。</li>\n<li>不支持当 <code class=\"codespan\">transform: scale(x, y)</code> 中 <code class=\"codespan\">x</code>/<code class=\"codespan\">y</code> 正负不同且有 <code class=\"codespan\">rotate</code>(例如,<code class=\"codespan\">scale: (1, -1), rotate(90)</code>)。</li>\n</ul>\n</li>\n<li>不支持 <code class=\"codespan\">&lt;style&gt;</code> 标签。<ul>\n<li>但内联样式是支持的(例如支持 <code class=\"codespan\">&lt;path style=&quot;color:red&quot; /&gt;</code>)。</li>\n</ul>\n</li>\n<li>单位:<ul>\n<li>只支持 <code class=\"codespan\">px</code>。不支持其他单位如 <code class=\"codespan\">width=&quot;231.65mm&quot;</code>。</li>\n<li>不支持百分比值,如不支持 <code class=\"codespan\">&lt;svg width=&quot;30%&quot; height=&quot;40%&quot;&gt;</code>。</li>\n</ul>\n</li>\n<li><code class=\"codespan\">&lt;defs&gt;</code> 标签:<ul>\n<li>只支持 <code class=\"codespan\">&lt;linearGradient&gt;</code>、<code class=\"codespan\">&lt;radialGradient&gt;</code>。</li>\n<li>还不支持在 <code class=\"codespan\">&lt;defs&gt;</code> 中定义其他元素(如 <code class=\"codespan\">&lt;pattern&gt;</code>、<code class=\"codespan\">&lt;path&gt;</code>、...)。</li>\n</ul>\n</li>\n<li><code class=\"codespan\">&lt;linearGradient&gt;</code>、<code class=\"codespan\">&lt;radialGradient&gt;</code>:<ul>\n<li>不支持 <code class=\"codespan\">fx</code>、<code class=\"codespan\">fy</code>。</li>\n<li>不支持 <code class=\"codespan\">gradientTransform</code>。</li>\n</ul>\n</li>\n<li><code class=\"codespan\">fill:url(..)</code>, <code class=\"codespan\">stroke:utl(..)</code>:<ul>\n<li>只支持 <code class=\"codespan\">url(#someId)</code>。</li>\n<li>不支持其他 URL 模式,例如不支持:<ul>\n<li><code class=\"codespan\">url(https://example.com/images/myImg.jpg)</code>。</li>\n<li><code class=\"codespan\">url(data:image/png;base64,iRxVB0...)</code>。</li>\n<li><code class=\"codespan\">url(myFont.woff)</code>。</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><code class=\"codespan\">&lt;switch&gt;</code> 标签:<ul>\n<li><code class=\"codespan\">&lt;switch&gt;</code> 标签内的所有内容都会显示。不支持“切换”功能。</li>\n</ul>\n</li>\n<li><code class=\"codespan\">&lt;text&gt;</code>。<ul>\n<li>不支持 <code class=\"codespan\">textPath</code>。</li>\n<li>不支持 <a href=\"https://www.w3.org/TR/SVG/text.html#TermAddressableCharacter\" target=\"_blank\">Addressable character</a>,也就是说:<pre><code class=\"lang-xml\">&lt;!-- 不支持: --&gt;\n&lt;tspan x=&quot;0 4.94 9.89&quot;&gt;abc&lt;/tspan&gt;。\n&lt;!-- 支持: --&gt;\n&lt;tspan x=&quot;0&quot;&gt;A&lt;/tspan&gt;\n&lt;tspan x=&quot;4.94&quot;&gt;b&lt;/tspan&gt;\n&lt;tspan x=&quot;9.89&quot;&gt;C&lt;/tspan&gt;\n</code></pre>\n</li>\n</ul>\n</li>\n</ul>\n"},"在图表中支持无障碍访问":{"type":["*"],"description":"<p>W3C 制定了无障碍富互联网应用规范集(<a href=\"https://www.w3.org/WAI/intro/aria\" target=\"_blank\">WAI-ARIA</a>,the Accessible Rich Internet Applications Suite),致力于使得网页内容和网页应用能够被更多残障人士访问。Apache ECharts<sup>TM</sup> 4.0 遵从这一规范,支持自动根据图表配置项智能生成描述,使得盲人可以在朗读设备的帮助下了解图表内容,让图表可以被更多人群访问。</p>\n<p>默认关闭,需要通过将 <a href=\"option.html#aria.enabled\" target=\"_blank\">aria.enabled</a> 设置为 <code class=\"codespan\">true</code> 开启。开启后,会根据图表、数据、标题等情况,自动智能生成关于图表的描述,用户也可以通过配置项修改描述。</p>\n<p>对于配置项:</p>\n<pre><code class=\"lang-js\">option = {\n    aria: {\n        enabled: true\n    },\n    title: {\n        text: &#39;某站点用户访问来源&#39;,\n        x: &#39;center&#39;\n    },\n    series: [\n        {\n            name: &#39;访问来源&#39;,\n            type: &#39;pie&#39;,\n            data: [\n                { value: 335, name: &#39;直接访问&#39; },\n                { value: 310, name: &#39;邮件营销&#39; },\n                { value: 234, name: &#39;联盟广告&#39; },\n                { value: 135, name: &#39;视频广告&#39; },\n                { value: 1548, name: &#39;搜索引擎&#39; }\n            ]\n        }\n    ]\n};\n</code></pre>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/aria-pie&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n<p>生成的图表 DOM 上,会有一个 <code class=\"codespan\">aria-label</code> 属性,在朗读设备的帮助下,盲人能够了解图表的内容。其值为:</p>\n<pre><code>这是一个关于“某站点用户访问来源”的图表。图表类型是饼图,表示访问来源。其数据是——直接访问的数据是335,邮件营销的数据是310,联盟广告的数据是234,视频广告的数据是135,搜索引擎的数据是1548。\n</code></pre><p>默认语言会根据语言包(默认中文)选择,也可以使用配置项自定义模板。</p>\n<p>除此之外,Apache ECharts 5 新增支持贴花纹理,作为颜色的辅助表达,进一步用以区分数据。在 <code class=\"codespan\">aria.enabled</code> 为 <code class=\"codespan\">true</code> 的前提下,将 <code class=\"codespan\">aria.decal.show</code> 设为 <code class=\"codespan\">true</code> 即可采用默认的贴花样式。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/aria-decal-simple&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n<p>下面,我们更具体地介绍这两种无障碍设计的配置方式。</p>\n<h2 id=\"-\">图表描述</h2>\n<h4 id=\"-\">采用整体描述</h4>\n<p>对于有些图表,默认生成的数据点的描述并不足以表现整体的信息。比如下图的散点图,默认生成的描述可以包含数据点的坐标值,但是知道几百几千个点的坐标并不能帮助我们有效地理解图表表达的信息。</p>\n<p><img width=\"600\" height=\"auto\" src=\"documents/asset/img/aria-example.png\"></p>\n<p>这时候,用户可以通过 <a href=\"option.html#aria.label.description\" target=\"_blank\">aria.label.description</a> 配置项指定图表的整体描述。</p>\n<h4 id=\"-\">定制模板描述</h4>\n<p>除了整体性修改描述之外,我们还提供了生成描述的模板,可以方便地进行细粒度的修改。</p>\n<p>生成描述的基本流程为,如果 <a href=\"option.html#aria.label.show\" target=\"_blank\">aria.label.show</a> 设置为 <code class=\"codespan\">true</code>,则生成无障碍访问描述,否则不生成。如果定义了 <a href=\"option.html#aria.label.description\" target=\"_blank\">aria.label.description</a>,则将其作为图表的完整描述,否则根据模板拼接生成描述。我们提供了默认的生成描述的算法,仅当生成的描述不太合适时,才需要修改这些模板,甚至使用 <code class=\"codespan\">aria.description</code> 完全覆盖。</p>\n<p>使用模板拼接时,先根据是否存在标题 <a href=\"#title.text\">title.text</a> 决定使用 <a href=\"option.html#aria.label.general.withTitle\" target=\"_blank\">aria.label.general.withTitle</a> 还是 <a href=\"option.html#aria.label.general.withoutTitle\" target=\"_blank\">aria.label.general.withoutTitle</a> 作为整体性描述。其中,<code class=\"codespan\">aria.general.withTitle</code> 配置项包括模板变量 <code class=\"codespan\">&#39;{title}&#39;</code>,将会被替换成图表标题。也就是说,如果 <code class=\"codespan\">aria.general.withTitle</code> 被设置为 <code class=\"codespan\">&#39;图表的标题是:{title}。&#39;</code>,则如果包含标题 <code class=\"codespan\">&#39;价格分布图&#39;</code>,这部分的描述为 <code class=\"codespan\">&#39;图表的标题是:价格分布图。&#39;</code>。</p>\n<p>拼接完标题之后,会依次拼接系列的描述(<a href=\"option.html#aria.label.series\" target=\"_blank\">aria.label.series</a>),和每个系列的数据的描述(<a href=\"option.html#aria.label.data\" target=\"_blank\">aria.label.data</a>)。同样,每个模板都有可能包括模板变量,用以替换实际的值。</p>\n<h2 id=\"-\">贴花图案</h2>\n<p>上文介绍了使用默认的贴花图案的方式。如果需要自定义贴花图案,可以使用 <a href=\"option.html#aria.decal.decals\" target=\"_blank\">aria.decal.decals</a> 配置出灵活多变的图案。</p>\n<iframe data-src=\"https://echarts.apache.org/examples/zh/view.html?c=doc-example/aria-decal&edit=1&reset=1\" width=\"700\" height=\"300\" ></iframe>\n\n\n<p>更具体的信息请参见 <a href=\"option.html#aria\" target=\"_blank\">ARIA 文档</a>。</p>\n"},"使用 ECharts GL 实现基础的三维可视化":{"type":["*"],"description":"<p>ECharts GL (后面统一简称 GL)为 Apache ECharts<sup>TM</sup> 补充了丰富的三维可视化组件,这篇文章我们会简单介绍如何基于 GL 实现一些常见的三维可视化作品。实际上如果你对 ECharts 有一定了解的话,也可以很快的上手 GL,GL 的配置项完全是按照 ECharts 的标准和上手难度来设计的。</p>\n<p>在看完文章之后,你可以前往 <a href=\"https://echarts.apache.org/examples/zh/index.html#chart-type-globe\" target=\"_blank\">官方示例</a> 和 <a href=\"https://gallery.echartsjs.com/explore.html#tags=echarts-gl\" target=\"_blank\">Gallery</a> 去了解更多使用 GL 制作的示例,对于文章中我们没法解释到的代码,也可以前往 <a href=\"option-gl.html\" target=\"_blank\">GL 配置项手册</a> 查看具体的配置项使用方法。</p>\n<h2 id=\"-echarts-gl\">如何下载和引入 ECharts GL</h2>\n<p>为了不再增加已经很大了的 ECharts 完整版的体积,我们将 GL 作为扩展包的形式提供,和诸如水球图这样的扩展类似,如果要使用 GL 里的各种组件,只需要在引入<code class=\"codespan\">echarts.min.js</code>的基础上再引入一个<code class=\"codespan\">echarts-gl.min.js</code>。你可以从 <a href=\"https://echarts.apache.org/zh/download.html\" target=\"_blank\">官网</a> 下载最新版的 GL,然后在页面中通过标签引入:</p>\n<pre><code class=\"lang-html\">&lt;script src=&quot;lib/echarts.min.js&quot;&gt;&lt;/script&gt;\n&lt;script src=&quot;lib/echarts-gl.min.js&quot;&gt;&lt;/script&gt;\n</code></pre>\n<p>如果你的项目使用 webpack 或者 rollup 来打包代码的话,也可以通过 npm 安装后引入</p>\n<pre><code class=\"lang-bash\">npm install echarts\nnpm install echarts-gl\n</code></pre>\n<pre><code class=\"lang-js\">// 通过 ES6 的 import 语法引入 ECharts 和 ECharts GL\nimport echarts from &#39;echarts&#39;;\nimport &#39;echarts-gl&#39;;\n</code></pre>\n<h2 id=\"-\">声明一个基础的三维笛卡尔坐标系</h2>\n<p>引入 ECharts 和 ECharts GL 后,我们先来声明一个基础的三维笛卡尔坐标系用于绘制三维的散点图,柱状图,曲面图等常见的统计图。</p>\n<p>在 ECharts 中我们有 <a href=\"option.html#grid\" target=\"_blank\">grid</a> 组件用于提供一个矩形的区域放置一个二维的笛卡尔坐标系,以及笛卡尔坐标系上上的 x 轴(<a href=\"option.html#xAxis\" target=\"_blank\">xAxis</a>)和 y 轴(<a href=\"option.html#yAxis\" target=\"_blank\">yAxis</a>)。对于三维的笛卡尔坐标系,我们在 GL 中提供了 <a href=\"option-gl.html#grid3D\" target=\"_blank\">grid3D</a> 组件用于划分一块三维的笛卡尔空间,以及放置在这个 <a href=\"option-gl.html#grid3D\" target=\"_blank\">grid3D</a> 上的 <a href=\"option-gl.html#xAxis3D\" target=\"_blank\">xAxis3D</a>, <a href=\"option-gl.html#yAxis3D\" target=\"_blank\">yAxis3D</a>, <a href=\"option-gl.html#zAxis3D\" target=\"_blank\">zAxis3D</a>。</p>\n<blockquote>\n<p>小提示:在 GL 中我们对除了 globe 之外所有的三维组件和系列都加了 3D 的后缀用以区分,例如三维的散点图就是 scatter3D,三维的地图就是 map3D 等等。</p>\n</blockquote>\n<p>下面这段代码就声明了一个最简单的三维笛卡尔坐标系</p>\n<pre><code class=\"lang-js\">var option = {\n    // 需要注意的是我们不能跟 grid 一样省略 grid3D\n    grid3D: {},\n    // 默认情况下, x, y, z 分别是从 0 到 1 的数值轴\n    xAxis3D: {},\n    yAxis3D: {},\n    zAxis3D: {}\n}\n</code></pre>\n<p>效果如下:</p>\n<p><img width=\"\" height=\"auto\" src=\"documents/asset/img/gl/grid3D-basic.png\"></p>\n<p>跟二维的笛卡尔坐标系一样,每个轴都会有多种类型,默认是数值轴,如果需要是类目轴的话,简单的设置为 <code class=\"codespan\">type: &#39;category&#39;</code>就行了。</p>\n<h2 id=\"-\">绘制三维的散点图</h2>\n<p>声明好笛卡尔坐标系后,我们先试试用一份程序生成的正态分布数据在这个三维的笛卡尔坐标系中画散点图。</p>\n<p>下面这段是生成正态分布数据的代码,你可以先不用关心这段代码是怎么工作的,只需要知道它生成了一份三维的正态分布数据放在<code class=\"codespan\">data</code>数组中。</p>\n<pre><code class=\"lang-js\">function makeGaussian(amplitude, x0, y0, sigmaX, sigmaY) {\n    return function (amplitude, x0, y0, sigmaX, sigmaY, x, y) {\n        var exponent = -(\n                ( Math.pow(x - x0, 2) / (2 * Math.pow(sigmaX, 2)))\n                + ( Math.pow(y - y0, 2) / (2 * Math.pow(sigmaY, 2)))\n            );\n        return amplitude * Math.pow(Math.E, exponent);\n    }.bind(null, amplitude, x0, y0, sigmaX, sigmaY);\n}\n// 创建一个高斯分布函数\nvar gaussian = makeGaussian(50, 0, 0, 20, 20);\n\nvar data = [];\nfor (var i = 0; i &lt; 1000; i++) {\n    // x, y 随机分布\n    var x = Math.random() * 100 - 50;\n    var y = Math.random() * 100 - 50;\n    var z = gaussian(x, y);\n    data.push([x, y, z]);\n}\n</code></pre>\n<p>生成的正态分布的数据大概长这样:</p>\n<pre><code class=\"lang-js\">[\n  [46.74395071259907, -33.88391024738553, 0.7754030099768191],\n  [-18.45302873809771, 16.88114775416834, 22.87772504105404],\n  [2.9908128281121336, -0.027699444453467947, 49.44400635911886],\n  ...\n]\n</code></pre>\n<p>每一项都包含了<code class=\"codespan\">x</code>, <code class=\"codespan\">y</code>, <code class=\"codespan\">z</code>三个值,这三个值会分别被映射到笛卡尔坐标系的 x 轴,y 轴和 z 轴上。</p>\n<p>然后我们可以使用 GL 提供的 <a href=\"option-gl.html#series-scatter3D\" target=\"_blank\">scatter3D</a> 系列类型把这些数据画成三维空间中正态分布的点。</p>\n<pre><code class=\"lang-js\">option = {\n    grid3D: {},\n    xAxis3D: {},\n    yAxis3D: {},\n    zAxis3D: { max: 100 },\n    series: [{\n        type: &#39;scatter3D&#39;,\n        data: data\n    }]\n}\n</code></pre>\n<p><img width=\"\" height=\"auto\" src=\"documents/asset/img/gl/scatter3D-gaussian.png\"></p>\n<h2 id=\"-\">使用真实数据的三维散点图</h2>\n<p>接下来我们来看一个使用真实多维数据的三维散点图例子。</p>\n<p>可以先从 <a href=\"https://echarts.apache.org/examples/data/asset/data/life-expectancy-table.json\" target=\"_blank\">https://echarts.apache.org/examples/data/asset/data/life-expectancy-table.json</a> 获取这份数据。</p>\n<p>格式化一下可以看到这份数据是很传统转成 JSON 后的表格格式。第一行是每一列数据的属性名,可以从这个属性名看出来每一列数据的含义,分别是人均收入,人均寿命,人口数量,国家和年份。</p>\n<pre><code class=\"lang-js\">[\n    [&quot;Income&quot;, &quot;Life Expectancy&quot;, &quot;Population&quot;, &quot;Country&quot;, &quot;Year&quot;],\n    [815, 34.05, 351014, &quot;Australia&quot;, 1800],\n    [1314, 39, 645526, &quot;Canada&quot;, 1800],\n    [985, 32, 321675013, &quot;China&quot;, 1800],\n    [864, 32.2, 345043, &quot;Cuba&quot;, 1800],\n    [1244, 36.5731262, 977662, &quot;Finland&quot;, 1800],\n    ...\n]\n</code></pre>\n<p>在 ECharts 4 中我们可以使用 dataset 组件非常方便地引入这份数据。如果对 dataset 还不熟悉的话可以看<a href=\"tutorial.html#%E4%BD%BF%E7%94%A8%20dataset%20%E7%AE%A1%E7%90%86%E6%95%B0%E6%8D%AE\" target=\"_blank\">dataset使用教程</a></p>\n<pre><code class=\"lang-js\">$.get(&#39;data/asset/data/life-expectancy-table.json&#39;, function (data) {\n    myChart.setOption({\n        grid3D: {},\n        xAxis3D: {},\n        yAxis3D: {},\n        zAxis3D: {},\n        dataset: {\n            source: data\n        },\n        series: [\n            {\n                type: &#39;scatter3D&#39;,\n                symbolSize: 2.5\n            }\n        ]\n    })\n});\n</code></pre>\n<p><img width=\"\" height=\"auto\" src=\"documents/asset/img/gl/scatter3D-life.png\"></p>\n<p>默认会把前三列,也就是收入(Income),人均寿命(Life Expectancy),人口(Population)分别放到 x、 y、 z 轴上。</p>\n<p>使用 encode 属性我们还可以将指定列的数据映射到指定的坐标轴上,从而省去很多繁琐的数据转换代码。例如我们将 x 轴换成是国家(Country),y 轴换成年份(Year),z 轴换成收入(Income),可以看到不同国家不同年份的人均收入分布。</p>\n<pre><code class=\"lang-js\">myChart.setOption({\n    grid3D: {},\n    xAxis3D: {\n        // 因为 x 轴和 y 轴都是类目数据,所以需要设置 type: &#39;category&#39; 保证正确显示数据。\n        type: &#39;category&#39;\n    },\n    yAxis3D: {\n        type: &#39;category&#39;\n    },\n    zAxis3D: {},\n    dataset: {\n        source: data\n    },\n    series: [\n        {\n            type: &#39;scatter3D&#39;,\n            symbolSize: 2.5,\n            encode: {\n                // 维度的名字默认就是表头的属性名\n                x: &#39;Country&#39;,\n                y: &#39;Year&#39;,\n                z: &#39;Income&#39;,\n                tooltip: [0, 1, 2, 3, 4]\n            }\n        }\n    ]\n});\n</code></pre>\n<h2 id=\"-visualmap-\">利用 visualMap 组件对三维散点图进行视觉编码</h2>\n<p>刚才多维数据的例子中,我们还有几个维度(列)没能表达出来,利用 ECharts 内置的 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a> 组件我们可以继续将第四个维度编码成颜色。</p>\n<pre><code class=\"lang-js\">myChart.setOption({\n    grid3D: {\n        viewControl: {\n            // 使用正交投影。\n            projection: &#39;orthographic&#39;\n        }\n    },\n    xAxis3D: {\n        // 因为 x 轴和 y 轴都是类目数据,所以需要设置 type: &#39;category&#39; 保证正确显示数据。\n        type: &#39;category&#39;\n    },\n    yAxis3D: {\n        type: &#39;log&#39;\n    },\n    zAxis3D: {},\n    visualMap: {\n        calculable: true,\n        max: 100,\n        // 维度的名字默认就是表头的属性名\n        dimension: &#39;Life Expectancy&#39;,\n        inRange: {\n            color: [&#39;#313695&#39;, &#39;#4575b4&#39;, &#39;#74add1&#39;, &#39;#abd9e9&#39;, &#39;#e0f3f8&#39;, &#39;#ffffbf&#39;, &#39;#fee090&#39;, &#39;#fdae61&#39;, &#39;#f46d43&#39;, &#39;#d73027&#39;, &#39;#a50026&#39;]\n        }\n    },\n    dataset: {\n        source: data\n    },\n    series: [\n        {\n            type: &#39;scatter3D&#39;,\n            symbolSize: 5,\n            encode: {\n                // 维度的名字默认就是表头的属性名\n                x: &#39;Country&#39;,\n                y: &#39;Population&#39;,\n                z: &#39;Income&#39;,\n                tooltip: [0, 1, 2, 3, 4]\n            }\n        }\n    ]\n})\n</code></pre>\n<p>这段代码中我们又在刚才的例子基础上加入了 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a> 组件,将<code class=\"codespan\">Life Expectancy</code>这一列数据映射到了不同的颜色。</p>\n<p>除此之外我们还把原来默认的透视投影改成了正交投影。正交投影在某些场景中可以避免因为近大远小所造成的表达错误。</p>\n<p><img width=\"\" height=\"auto\" src=\"documents/asset/img/gl/scatter3D-color.png\"></p>\n<p>当然,除了 <a href=\"option.html#visualMap\" target=\"_blank\">visualMap</a> 组件,还可以利用其它的 ECharts 内置组件并且充分利用这些组件的交互效果,比如 <a href=\"option.html#legend\" target=\"_blank\">legend</a>。也可以像 <a href=\"https://echarts.apache.org/examples/zh/editor.html?c=scatter3d-scatter&amp;gl=1\" target=\"_blank\">三维散点图和散点矩阵结合使用</a> 这个例子一样实现二维和三维的系列混搭。</p>\n<p>在实现 GL 的时候我们尽可能地把 WebGL 和 Canvas 之间的差异屏蔽了到最小,从而让 GL 的使用可以更加方便自然。</p>\n<h2 id=\"-\">在笛卡尔坐标系上显示其它类型的三维图表</h2>\n<p>除了散点图,我们也可以通过 GL 在三维的笛卡尔坐标系上绘制其它类型的三维图表。比如刚才例子中将 <code class=\"codespan\">scatter3D</code> 类型改成 <code class=\"codespan\">bar3D</code> 就可以变成一个三维的柱状图。</p>\n<p><img width=\"\" height=\"auto\" src=\"documents/asset/img/gl/bar3D.png\"></p>\n<p>还有机器学习中会用到的三维曲面图 <a href=\"option-gl.html#series-surface\" target=\"_blank\">surface</a>,三维曲面图常用来表达平面上的数据走势,刚才的正态分布数据我们也可以像下面这样画成曲面图。</p>\n<pre><code class=\"lang-js\">var data = [];\n// 曲面图要求给入的数据是网格形式按顺序分布。\nfor (var y = -50; y &lt;= 50; y++) {\n    for (var x = -50; x &lt;= 50; x++) {\n        var z = gaussian(x, y);\n        data.push([x, y, z]);\n    }\n}\noption = {\n    grid3D: {},\n    xAxis3D: {},\n    yAxis3D: {},\n    zAxis3D: { max: 60 },\n    series: [{\n        type: &#39;surface&#39;,\n        data: data\n    }]\n}\n</code></pre>\n<p><img width=\"\" height=\"auto\" src=\"documents/asset/img/gl/surface.png\"></p>\n<h2 id=\"-\">老板想要立体的柱状图效果</h2>\n<p>最后,我们经常会被问到如何用 ECharts 画只有二维数据的立体柱状图效果。一般来说我们是不推荐这么做的,因为这种不必要的立体柱状图很容易造成错误的表达,具体可以见我们 <a href=\"https://vis.baidu.com/chartusage/bar/\" target=\"_blank\">柱状图使用指南</a> 中的解释。</p>\n<p>但是如果有一些其他因素导致必须得画成立体的柱状图的话,用 GL 也可以实现。<a href=\"https://gallery.echartsjs.com/explore.html?u=bd-3056387051\" target=\"_blank\">丶灬豆奶</a> 和 <a href=\"https://gallery.echartsjs.com/explore.html?u=bd-809368804\" target=\"_blank\">阿洛儿啊</a> 在 Gallery 已经写了类似的例子,大家可以参考。</p>\n<p><a href=\"https://gallery.echartsjs.com/explore.html?u=bd-3056387051\" target=\"_blank\">3D堆积柱状图</a></p>\n<p><a href=\"https://gallery.echartsjs.com/editor.html?c=xryQDPYK0b\" target=\"_blank\">3D柱状图</a></p>\n<p><img width=\"\" height=\"auto\" src=\"documents/asset/img/gl/bar3D-2d-data.png\"></p>\n"},"在微信小程序中使用 ECharts":{"type":["*"],"description":"<p>我们接到了很多微信小程序开发者的反馈,表示他们强烈需要像 Apache ECharts<sup>TM</sup> 这样的可视化工具。但是微信小程序是不支持 DOM 操作的,Canvas 接口也和浏览器不尽相同。</p>\n<p>因此,我们和微信小程序官方团队合作,提供了 ECharts 的微信小程序版本。开发者可以通过熟悉的 ECharts 配置方式,快速开发图表,满足各种可视化需求。</p>\n<h2 id=\"-\">体验示例小程序</h2>\n<p>在微信中扫描下面的二维码即可体验 ECharts Demo:</p>\n<p><img width=\"auto\" height=\"auto\" src=\"https://cdn.jsdelivr.net/gh/ecomfe/echarts-for-weixin/img/weixin-app.jpg\"></p>\n<h2 id=\"-\">下载</h2>\n<p>为了兼容小程序 Canvas,我们提供了一个小程序的组件,用这种方式可以方便地使用 ECharts。</p>\n<p>首先,下载 GitHub 上的 <a href=\"https://github.com/ecomfe/echarts-for-weixin\" target=\"_blank\">ecomfe/echarts-for-weixin</a> 项目。</p>\n<p>其中,<code class=\"codespan\">ec-canvas</code> 是我们提供的组件,其他文件是如何使用该组件的示例。</p>\n<p><code class=\"codespan\">ec-canvas</code> 目录下有一个 <code class=\"codespan\">echarts.js</code>,默认我们会在每次 <code class=\"codespan\">echarts-for-weixin</code> 项目发版的时候替换成最新版的 ECharts。如有必要,可以自行从 ECharts 项目中下载<a href=\"https://github.com/apache/echarts/releases\" target=\"_blank\">最新发布版</a>,或者从<a href=\"https://echarts.apache.org/builder.html\" target=\"_blank\">官网自定义构建</a>以减小文件大小。</p>\n<h2 id=\"-\">引入组件</h2>\n<p>微信小程序的项目创建可以参见<a href=\"https://developers.weixin.qq.com/miniprogram/dev/framework/quickstart/\" target=\"_blank\">微信公众平台官方文档</a>。</p>\n<p>在创建项目之后,可以将下载的 <a href=\"https://github.com/ecomfe/echarts-for-weixin\" target=\"_blank\">ecomfe/echarts-for-weixin</a> 项目完全替换新建的项目,然后将修改代码;或者仅拷贝 <code class=\"codespan\">ec-canvas</code> 目录到新建的项目下,然后做相应的调整。</p>\n<p>如果采用完全替换的方式,需要将 <code class=\"codespan\">project.config.json</code> 中的 <code class=\"codespan\">appid</code> 替换成在公众平台申请的项目 id。<code class=\"codespan\">pages</code> 目录下的每个文件夹是一个页面,可以根据情况删除不需要的页面,并且在 <code class=\"codespan\">app.json</code> 中删除对应页面。</p>\n<p>如果仅拷贝 <code class=\"codespan\">ec-canvas</code> 目录,则可以参考 <code class=\"codespan\">pages/bar</code> 目录下的几个文件的写法。下面,我们具体地说明。</p>\n<h2 id=\"-\">创建图表</h2>\n<p>首先,在 <code class=\"codespan\">pages/bar</code> 目录下新建以下几个文件:<code class=\"codespan\">index.js</code>、 <code class=\"codespan\">index.json</code>、 <code class=\"codespan\">index.wxml</code>、 <code class=\"codespan\">index.wxss</code>。并且在 <code class=\"codespan\">app.json</code> 的 <code class=\"codespan\">pages</code> 中增加 <code class=\"codespan\">&#39;pages/bar/index&#39;</code>。</p>\n<p><code class=\"codespan\">index.json</code> 配置如下:</p>\n<pre><code class=\"lang-json\">{\n  &quot;usingComponents&quot;: {\n    &quot;ec-canvas&quot;: &quot;../../ec-canvas/ec-canvas&quot;\n  }\n}\n</code></pre>\n<p>这一配置的作用是,允许我们在 <code class=\"codespan\">pages/bar/index.wxml</code> 中使用 <code class=\"codespan\">&lt;ec-canvas&gt;</code> 组件。注意路径的相对位置要写对,如果目录结构和本例相同,就应该像上面这样配置。</p>\n<p><code class=\"codespan\">index.wxml</code> 中,我们创建了一个 <code class=\"codespan\">&lt;ec-canvas&gt;</code> 组件,内容如下:</p>\n<pre><code class=\"lang-xml\">&lt;view class=&quot;container&quot;&gt;\n  &lt;ec-canvas id=&quot;mychart-dom-bar&quot; canvas-id=&quot;mychart-bar&quot; ec=&quot;{{ ec }}&quot;&gt;&lt;/ec-canvas&gt;\n&lt;/view&gt;\n</code></pre>\n<p>其中 <code class=\"codespan\">ec</code> 是一个我们在 <code class=\"codespan\">index.js</code> 中定义的对象,它使得图表能够在页面加载后被初始化并设置。<code class=\"codespan\">index.js</code> 的结构如下:</p>\n<pre><code class=\"lang-js\">function initChart(canvas, width, height) {\n  const chart = echarts.init(canvas, null, {\n    width: width,\n    height: height\n  });\n  canvas.setChart(chart);\n\n  var option = {\n    ...\n  };\n  chart.setOption(option);\n  return chart;\n}\n\nPage({\n  data: {\n    ec: {\n      onInit: initChart\n    }\n  }\n});\n</code></pre>\n<p>这对于所有 ECharts 图表都是通用的,用户只需要修改上面 <code class=\"codespan\">option</code> 的内容,即可改变图表。<code class=\"codespan\">option</code> 的使用方法参见 <a href=\"option.html\" target=\"_blank\">ECharts 配置项文档</a>。对于不熟悉 ECharts 的用户,可以参见 <a href=\"tutorial.html#5%20%E5%88%86%E9%92%9F%E4%B8%8A%E6%89%8B%20ECharts\" target=\"_blank\">5 分钟上手 ECharts</a> 教程。</p>\n<p>完整的例子请参见 <a href=\"https://github.com/ecomfe/echarts-for-weixin\" target=\"_blank\">ecomfe/echarts-for-weixin</a> 项目。</p>\n<h2 id=\"-\">暂不支持的功能</h2>\n<p>ECharts 中的绝大部分功能都支持小程序版本,因此这里仅说明不支持的功能,以及存在的问题。</p>\n<p>以下功能尚不支持,如果有相关需求请在 <a href=\"https://github.com/ecomfe/echarts-for-weixin/issues\" target=\"_blank\">issue</a> 中向我们反馈,对于反馈人数多的需求将优先支持:</p>\n<ul>\n<li>Tooltip</li>\n<li>图片</li>\n<li>多个 zlevel 分层</li>\n</ul>\n<p>此外,目前还有一些 bug 尚未修复,部分需要小程序团队配合上线支持,但不影响基本的使用。已知的 bug 包括:</p>\n<ul>\n<li>安卓平台:transform 的问题(会影响关系图边两端的标记位置、旭日图文字位置等)</li>\n<li>iOS 平台:半透明略有变深的问题</li>\n<li>iOS 平台:渐变色出现在定义区域之外的地方</li>\n</ul>\n<p>如有其它问题,也欢迎在 <a href=\"https://github.com/ecomfe/echarts-for-weixin/issues\" target=\"_blank\">issue</a> 中向我们反馈,谢谢!</p>\n"}}}}
\ No newline at end of file
diff --git a/zh/events.html b/zh/events.html
index d750945..a33db75 100644
--- a/zh/events.html
+++ b/zh/events.html
@@ -7,7 +7,7 @@
     document.head.insertBefore(el, document.getElementById('font-hack'));
 }
 </script><title>活动 - Apache 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://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/forie.png?_v_=20200710_1" alt="ie tip"></div></body><![endif]-->
-<!--[if (gt IE 8)|!(IE)]><body class="Apache ECharts - 活动"></body><![endif]--><div id="apache-banner"><div class="txt"><p>请访问 Apache ECharts 的官网 &nbsp;</p><a id="a1" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>访问官网</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><nav role="navigation" 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/zh/index.html" class="navbar-brand"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/logo.png?_v_=20200710_1" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/zh/index.html">首页</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">文档<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/feature.html">特性</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html">教程</a></li><li><a href="https://echarts.apache.org/zh/api.html">API</a></li><li><a href="https://echarts.apache.org/zh/option.html">配置项手册</a></li><li><a href="https://echarts.apache.org/zh/changelog.html">版本记录</a></li><li><a href="https://echarts.apache.org/zh/faq.html">常见问题</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html#ECharts%205%20升级指南">v5 升级指南<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">下载<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/download.html">下载</a></li><li><a href="https://echarts.apache.org/zh/download-theme.html">主题下载</a></li><li><a href="https://echarts.apache.org/zh/download-extension.html">扩展下载</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/zh/index.html">示例</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">资源<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/spreadsheet.html">表格工具</a></li><li><a href="https://echarts.apache.org/zh/theme-builder.html">主题构建工具</a></li><li><a href="https://echarts.apache.org/zh/cheat-sheet.html">术语速查手册</a></li><li><a href="https://echarts.apache.org/zh/resources.html">更多资源</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">社区<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/events.html">活动</a></li><li><a href="https://echarts.apache.org/zh/committers.html">贡献者列表</a></li><li><a href="https://echarts.apache.org/zh/maillist.html">邮件列表</a></li><li><a href="https://echarts.apache.org/zh/contributing.html">如何贡献</a></li><li><a href="https://echarts.apache.org/zh/dependencies.html">依赖项</a></li><li><a href="https://echarts.apache.org/zh/coding-standard.html">代码规范</a></li><li><a href="https://github.com/apache/echarts" target="_blank">源码(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/zh/security.html">安全</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">版权<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">活动<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">捐赠<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">鸣谢<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('en')">EN</a></li></ul></div></div></nav><div id="page-events" class="page-main"><div class="page-info"><div class="container"><h1>活动</h1><p class="page-info-echarts">Apache ECharts<sup>TM</sup></p></div></div><div class="page-content"><div class="container"><h2>进行中的活动</h2><a href="./events/2021-05-13-iscas.html" class="event"><picture><source data-srcset="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20210513-iscas.webp?_v_=20200710_1" type="image/webp" class="lazy"><source data-srcset="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20210513-iscas.jpeg?_v_=20200710_1" type="image/jpeg" class="lazy"><img data-src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20210513-iscas.jpeg?_v_=20200710_1" alt="开源软件供应链点亮计划 - 暑期 2021" class="lazy"></picture></a><h2>过期的活动</h2><a href="https://echarts-5-live.bj.bcebos.com/echarts-5-event.html?ref=ec-event" class="event"><picture><source data-srcset="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20200128-apache-echarts-5.webp?_v_=20200710_1" type="image/webp" class="lazy"><source data-srcset="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20200128-apache-echarts-5.png?_v_=20200710_1" type="image/jpeg" class="lazy"><img data-src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20200128-apache-echarts-5.png?_v_=20200710_1" alt="Apache ECharts 5 Official Release" class="lazy"></picture></a></div></div><footer><div class="container"><div class="row"><div class="col-md-9"><p>Copyright © 2017-2021, The Apache Software Foundation Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.</p><div class="icon-panel"><a href="mailto:dev@echarts.apache.org?body=%28Thanks%20for%20using%20ECharts.%20Email%20us%20if%20you%20have%20non-technical%20problems%20using%20ECharts.%20For%20technical%20support%2C%20please%20go%20to%20https%3A//github.com/apache/echarts/issues%20.%29" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-email.png?_v_=20200710_1"></a><a href="https://twitter.com/ApacheECharts" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-twitter.png?_v_=20200710_1"></a><a href="https://weibo.com/echarts" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-weibo.png?_v_=20200710_1"></a><a href="https://github.com/apache/echarts" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-github.png?_v_=20200710_1"></a></div></div><div id="footer-icon-panel" class="col-md-3"><a href="https://www.apache.org"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/asf_logo.svg?_v_=20200710_1" class="footer-apache-logo"></a></div></div></div></footer></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/js/common.js?_v_=b5b8944fb9"></script><script>window.lazyLoadOptions = {
+<!--[if (gt IE 8)|!(IE)]><body class="Apache ECharts - 活动"></body><![endif]--><div id="apache-banner"><div class="txt"><p>请访问 Apache ECharts 的官网 &nbsp;</p><a id="a1" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>访问官网</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><nav role="navigation" 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/zh/index.html" class="navbar-brand"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/logo.png?_v_=20200710_1" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/zh/index.html">首页</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">文档<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/feature.html">特性</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html">教程</a></li><li><a href="https://echarts.apache.org/zh/api.html">API</a></li><li><a href="https://echarts.apache.org/zh/option.html">配置项手册</a></li><li><a href="https://echarts.apache.org/zh/changelog.html">版本记录</a></li><li><a href="https://echarts.apache.org/zh/faq.html">常见问题</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html#ECharts%205%20升级指南">v5 升级指南<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">下载<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/download.html">下载</a></li><li><a href="https://echarts.apache.org/zh/download-theme.html">主题下载</a></li><li><a href="https://echarts.apache.org/zh/download-extension.html">扩展下载</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/zh/index.html">示例</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">资源<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/spreadsheet.html">表格工具</a></li><li><a href="https://echarts.apache.org/zh/theme-builder.html">主题构建工具</a></li><li><a href="https://echarts.apache.org/zh/cheat-sheet.html">术语速查手册</a></li><li><a href="https://echarts.apache.org/zh/resources.html">更多资源</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">社区<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/events.html">活动</a></li><li><a href="https://echarts.apache.org/zh/committers.html">贡献者列表</a></li><li><a href="https://echarts.apache.org/zh/maillist.html">邮件列表</a></li><li><a href="https://echarts.apache.org/zh/contributing.html">如何贡献</a></li><li><a href="https://echarts.apache.org/zh/dependencies.html">依赖项</a></li><li><a href="https://echarts.apache.org/zh/coding-standard.html">代码规范</a></li><li><a href="https://github.com/apache/echarts" target="_blank">源码(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/zh/security.html">安全</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">版权<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">活动<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">捐赠<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">鸣谢<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('en')">EN</a></li></ul></div></div></nav><div id="page-events" class="page-main"><div class="page-info"><div class="container"><h1>活动</h1><p class="page-info-echarts">Apache ECharts<sup>TM</sup></p></div></div><div class="page-content"><div class="container"><h2>进行中的活动</h2><a href="./events/2021-07-05-apachecon.html" class="event"><picture><source data-srcset="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20210705-apachecon.webp?_v_=20200710_1" type="image/webp" class="lazy"><source data-srcset="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20210705-apachecon.jpeg?_v_=20200710_1" type="image/jpeg" class="lazy"><img data-src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20210705-apachecon.jpeg?_v_=20200710_1" alt="ApacheCon Asia 2021" class="lazy"></picture></a><h2>过期的活动</h2><a href="./events/2021-05-13-iscas.html" class="event"><picture><source data-srcset="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20210513-iscas.webp?_v_=20200710_1" type="image/webp" class="lazy"><source data-srcset="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20210513-iscas.jpeg?_v_=20200710_1" type="image/jpeg" class="lazy"><img data-src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20210513-iscas.jpeg?_v_=20200710_1" alt="开源软件供应链点亮计划 - 暑期 2021" class="lazy"></picture></a><a href="https://echarts-5-live.bj.bcebos.com/echarts-5-event.html?ref=ec-event" class="event"><picture><source data-srcset="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20200128-apache-echarts-5.webp?_v_=20200710_1" type="image/webp" class="lazy"><source data-srcset="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20200128-apache-echarts-5.png?_v_=20200710_1" type="image/jpeg" class="lazy"><img data-src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20200128-apache-echarts-5.png?_v_=20200710_1" alt="Apache ECharts 5 Official Release" class="lazy"></picture></a></div></div><footer><div class="container"><div class="row"><div class="col-md-9"><p>Copyright © 2017-2021, The Apache Software Foundation Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.</p><div class="icon-panel"><a href="mailto:dev@echarts.apache.org?body=%28Thanks%20for%20using%20ECharts.%20Email%20us%20if%20you%20have%20non-technical%20problems%20using%20ECharts.%20For%20technical%20support%2C%20please%20go%20to%20https%3A//github.com/apache/echarts/issues%20.%29" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-email.png?_v_=20200710_1"></a><a href="https://twitter.com/ApacheECharts" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-twitter.png?_v_=20200710_1"></a><a href="https://weibo.com/echarts" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-weibo.png?_v_=20200710_1"></a><a href="https://github.com/apache/echarts" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-github.png?_v_=20200710_1"></a></div></div><div id="footer-icon-panel" class="col-md-3"><a href="https://www.apache.org"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/asf_logo.svg?_v_=20200710_1" class="footer-apache-logo"></a></div></div></div></footer></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/js/common.js?_v_=b5b8944fb9"></script><script>window.lazyLoadOptions = {
     elements_selector: ".lazy"
 };
 document.getElementById('nav-contribute').className = 'active';</script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@12.0.0/dist/lazyload.min.js"></script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
diff --git a/zh/events/2021-07-05-apachecon.html b/zh/events/2021-07-05-apachecon.html
new file mode 100644
index 0000000..204249e
--- /dev/null
+++ b/zh/events/2021-07-05-apachecon.html
@@ -0,0 +1,25 @@
+<!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://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/favicon.png?_v_=20200710_1"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"><!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries--><!--[if lt IE 9]><script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script><script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script><![endif]--><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/css/main.css?_v_=5bc19a133c"><script>window.EC_WWW_LANG = 'zh';
+</script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/pace-progressbar@1.0.2/pace.min.js"></script><script id="font-hack" type="text/javascript">if (/windows/i.test(navigator.userAgent)) {
+    var el = document.createElement('style');
+    el.innerHTML = ''
+        + '@font-face {font-family:"noto-thin";src:local("Microsoft Yahei");}'
+        + '@font-face {font-family:"noto-light";src:local("Microsoft Yahei");}';
+    document.head.insertBefore(el, document.getElementById('font-hack'));
+}
+</script><title>活动 - Apache 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://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/forie.png?_v_=20200710_1" alt="ie tip"></div></body><![endif]-->
+<!--[if (gt IE 8)|!(IE)]><body class="Apache ECharts - 活动"></body><![endif]--><div id="apache-banner"><div class="txt"><p>请访问 Apache ECharts 的官网 &nbsp;</p><a id="a1" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>访问官网</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><nav role="navigation" 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/zh/index.html" class="navbar-brand"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/logo.png?_v_=20200710_1" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/zh/index.html">首页</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">文档<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/feature.html">特性</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html">教程</a></li><li><a href="https://echarts.apache.org/zh/api.html">API</a></li><li><a href="https://echarts.apache.org/zh/option.html">配置项手册</a></li><li><a href="https://echarts.apache.org/zh/changelog.html">版本记录</a></li><li><a href="https://echarts.apache.org/zh/faq.html">常见问题</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html#ECharts%205%20升级指南">v5 升级指南<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">下载<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/download.html">下载</a></li><li><a href="https://echarts.apache.org/zh/download-theme.html">主题下载</a></li><li><a href="https://echarts.apache.org/zh/download-extension.html">扩展下载</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/zh/index.html">示例</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">资源<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/spreadsheet.html">表格工具</a></li><li><a href="https://echarts.apache.org/zh/theme-builder.html">主题构建工具</a></li><li><a href="https://echarts.apache.org/zh/cheat-sheet.html">术语速查手册</a></li><li><a href="https://echarts.apache.org/zh/resources.html">更多资源</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">社区<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/events.html">活动</a></li><li><a href="https://echarts.apache.org/zh/committers.html">贡献者列表</a></li><li><a href="https://echarts.apache.org/zh/maillist.html">邮件列表</a></li><li><a href="https://echarts.apache.org/zh/contributing.html">如何贡献</a></li><li><a href="https://echarts.apache.org/zh/dependencies.html">依赖项</a></li><li><a href="https://echarts.apache.org/zh/coding-standard.html">代码规范</a></li><li><a href="https://github.com/apache/echarts" target="_blank">源码(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/zh/security.html">安全</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">版权<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">活动<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">捐赠<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">鸣谢<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('en')">EN</a></li></ul></div></div></nav><div class="page-main"><div class="page-info"><div class="container"><h1>ApacheCon Asia 2021</h1><p class="page-info-echarts">Apache ECharts<sup>TM</sup></p></div></div><div class="page-content"><div class="container"><div><a href="../events.html">返回活动列表</a></div><div class="event event-detail-img"><picture><source data-srcset="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20210705-apachecon.webp?_v_=20200710_1" type="image/webp" class="lazy"><source data-srcset="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20210705-apachecon.jpeg?_v_=20200710_1" type="image/jpeg" class="lazy"><img data-src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20210705-apachecon.jpeg?_v_=20200710_1" alt="ApacheCon Asia 2021" class="lazy"></picture></div><h3>今年八月 Apache 亚洲峰会来到您的客厅!</h3><p>足不出户,就可以参加 Apache 技术盛宴,持续三天的 Apache 项目内容涵盖数十个类别,从大数据到金融科技再到搜索再到大家熟悉的 Tomcat 等。</p><p>其中,<a href="https://apachecon.com/acasia2021/zh/tracks/datavisualization.html">数据可视化论坛</a>在 2021.08.06,演讲主题包括:</p><table><tr><td>13:30 GMT+8</td><td><a href="https://apachecon.com/acasia2021/zh/sessions/1090.html">为什么 Apache Superset 选择使用 Apache ECharts?</a></td><td>英文演讲</td><td>Ville Brofeldt</td></tr><tr><td>14:10 GMT+8</td><td><a href="https://apachecon.com/acasia2021/zh/sessions/1087.html">Apache ECharts 的脏矩形渲染实践</a></td><td>英文演讲</td><td>Wenli Zhang</td></tr><tr><td>14:50 GMT+8</td><td><a href="https://apachecon.com/acasia2021/zh/sessions/1093.html">16 毫秒的挑战:图表库渲染优化</a></td><td>中文演讲</td><td>Shuang Su</td></tr><tr><td>15:30 GMT+8</td><td><a href="https://apachecon.com/acasia2021/zh/sessions/1094.html">ECharts 的乐趣:我们如何在特斯拉使用它!</a></td><td>中文演讲</td><td>Fanchao Meng</td></tr><tr><td>16:10 GMT+8</td><td><a href="https://apachecon.com/acasia2021/zh/sessions/1092.html">使用 ECharts 呈现社区活动的渲染图</a></td><td>中文演讲</td><td>Sun Yi</td></tr><tr><td>16:50 GMT+8</td><td><a href="https://apachecon.com/acasia2021/zh/sessions/1091.html">echarts4r:ECharts 与 R 编程语言的整合</a></td><td>英文演讲</td><td>John Coene</td></tr></table><h3>免费注册</h3><p>请前往<a href="https://hopin.com/events/apachecon-asia-2021">Hopin 平台</a>注册,或在<a href="https://apachecon.com/acasia2021/index.html">官网</a>了解更多关于本次会议的介绍。</p></div></div><footer><div class="container"><div class="row"><div class="col-md-9"><p>Copyright © 2017-2021, The Apache Software Foundation Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.</p><div class="icon-panel"><a href="mailto:dev@echarts.apache.org?body=%28Thanks%20for%20using%20ECharts.%20Email%20us%20if%20you%20have%20non-technical%20problems%20using%20ECharts.%20For%20technical%20support%2C%20please%20go%20to%20https%3A//github.com/apache/echarts/issues%20.%29" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-email.png?_v_=20200710_1"></a><a href="https://twitter.com/ApacheECharts" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-twitter.png?_v_=20200710_1"></a><a href="https://weibo.com/echarts" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-weibo.png?_v_=20200710_1"></a><a href="https://github.com/apache/echarts" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-github.png?_v_=20200710_1"></a></div></div><div id="footer-icon-panel" class="col-md-3"><a href="https://www.apache.org"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/asf_logo.svg?_v_=20200710_1" class="footer-apache-logo"></a></div></div></div></footer></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/js/common.js?_v_=b5b8944fb9"></script><script>window.lazyLoadOptions = {
+    elements_selector: ".lazy"
+};
+document.getElementById('nav-contribute').className = 'active';</script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@12.0.0/dist/lazyload.min.js"></script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
+(function() {
+var hm = document.createElement("script");
+
+hm.src = "https://hm.baidu.com/hm.js?54b918eee37cb8a7045f0fd0f0b24395";
+
+var s = document.getElementsByTagName("script")[0];
+s.parentNode.insertBefore(hm, s);
+})();
+</script><!-- Google Analytics--><script type="text/javascript" async src="https://www.googletagmanager.com/gtag/js?id=UA-141228404-1"></script><script type="text/javascript">window.dataLayer = window.dataLayer || [];
+function gtag(){dataLayer.push(arguments);}
+gtag('js', new Date());
+gtag('config', 'UA-141228404-1');</script></html>
\ No newline at end of file
diff --git a/zh/feature.html b/zh/feature.html
index 631a508..41888d0 100644
--- a/zh/feature.html
+++ b/zh/feature.html
@@ -7,7 +7,7 @@
     document.head.insertBefore(el, document.getElementById('font-hack'));
 }
 </script><title>特性 - Apache 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://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/forie.png?_v_=20200710_1" 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 的官网 &nbsp;</p><a id="a1" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>访问官网</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><nav role="navigation" 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/zh/index.html" class="navbar-brand"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/logo.png?_v_=20200710_1" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/zh/index.html">首页</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">文档<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/feature.html">特性</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html">教程</a></li><li><a href="https://echarts.apache.org/zh/api.html">API</a></li><li><a href="https://echarts.apache.org/zh/option.html">配置项手册</a></li><li><a href="https://echarts.apache.org/zh/changelog.html">版本记录</a></li><li><a href="https://echarts.apache.org/zh/faq.html">常见问题</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html#ECharts%205%20升级指南">v5 升级指南<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">下载<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/download.html">下载</a></li><li><a href="https://echarts.apache.org/zh/download-theme.html">主题下载</a></li><li><a href="https://echarts.apache.org/zh/download-extension.html">扩展下载</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/zh/index.html">示例</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">资源<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/spreadsheet.html">表格工具</a></li><li><a href="https://echarts.apache.org/zh/theme-builder.html">主题构建工具</a></li><li><a href="https://echarts.apache.org/zh/cheat-sheet.html">术语速查手册</a></li><li><a href="https://echarts.apache.org/zh/resources.html">更多资源</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">社区<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/events.html">活动</a></li><li><a href="https://echarts.apache.org/zh/committers.html">贡献者列表</a></li><li><a href="https://echarts.apache.org/zh/maillist.html">邮件列表</a></li><li><a href="https://echarts.apache.org/zh/contributing.html">如何贡献</a></li><li><a href="https://echarts.apache.org/zh/dependencies.html">依赖项</a></li><li><a href="https://echarts.apache.org/zh/coding-standard.html">代码规范</a></li><li><a href="https://github.com/apache/echarts" target="_blank">源码(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/zh/security.html">安全</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">版权<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">活动<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">捐赠<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">鸣谢<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('en')">EN</a></li></ul></div></div></nav><div class="page-main"><div class="page-info"><div class="container"><h1>特性</h1><p class="page-info-echarts">Apache ECharts<sup>TM</sup></p></div></div><div class="page-content single-page"><div class="page-nav"><h4>特性</h4><ul></ul></div><div class="page-detail"><p class="page-detail-desc">ECharts,一个使用 JavaScript 实现的开源可视化库,可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE8/9/10/11,Chrome,Firefox,Safari等),底层依赖矢量图形库 <a href="https://github.com/ecomfe/zrender" target="_blank">ZRender</a>,提供直观,交互丰富,可高度个性化定制的数据可视化图表。</p><h2 id="chart-types">丰富的可视化类型</h2><p>ECharts 提供了常规的<a href="option.html#series-line" target="_blank">折线图</a>、<a href="option.html#series-bar" target="_blank">柱状图</a>、<a href="option.html#series-scatter" target="_blank">散点图</a>、<a href="option.html#series-pie" target="_blank">饼图</a>、<a href="option.html#series-candlestick" target="_blank">K线图</a>,用于统计的<a href="option.html#series-boxplot" target="_blank">盒形图</a>,用于地理数据可视化的<a href="option.html#series-map" target="_blank">地图</a>、<a href="option.html#series-heatmap" target="_blank">热力图</a>、<a href="option.html#series-lines" target="_blank">线图</a>,用于关系数据可视化的<a href="option.html#series-graph" target="_blank">关系图</a>、<a href="option.html#series-treemap" target="_blank">treemap</a>、<a href="option.html#series-sunburst">旭日图</a>,多维数据可视化的<a href="option.html#series-parallel" target="_blank">平行坐标</a>,还有用于 BI 的<a href="option.html#series-funnel" target="_blank">漏斗图</a>,<a href="option.html#series-gauge" target="_blank">仪表盘</a>,并且支持图与图之间的混搭。</p><p>除了已经内置的包含了丰富功能的图表,ECharts 还提供了<a href="option.html#series-custom">自定义系列</a>,只需要传入一个<em>renderItem</em>函数,就可以从数据映射到任何你想要的图形,更棒的是这些都还能和已有的交互组件结合使用而不需要操心其它事情。</p><p>你可以在下载界面下载包含所有图表的构建文件,如果只是需要其中一两个图表,又嫌包含所有图表的构建文件太大,也可以在在线构建中选择需要的图表类型后自定义构建。</p><h2 id="dataset">多种数据格式无需转换直接使用</h2><p>ECharts 内置的 dataset 属性(4.0+)支持直接传入包括二维表,key-value 等多种格式的数据源,通过简单的设置 encode 属性就可以完成从数据到图形的映射,这种方式更符合可视化的直觉,省去了大部分场景下数据转换的步骤,而且多个组件能够共享一份数据而不用克隆。</p><p>为了配合大数据量的展现,ECharts 还支持输入 TypedArray 格式的数据,TypedArray 在大数据量的存储中可以占用更少的内存,对 GC 友好等特性也可以大幅度提升可视化应用的性能。</p><h2 id="big-data">千万数据的前端展现</h2><p>通过增量渲染技术(4.0+),配合各种细致的优化,ECharts 能够展现千万级的数据量,并且在这个数据量级依然能够进行流畅的缩放平移等交互。</p><p>几千万的地理坐标数据就算使用二进制存储也要占上百 MB 的空间。因此 ECharts 同时提供了对流加载(4.0+)的支持,你可以使用 WebSocket 或者对数据分块后加载,加载多少渲染多少!不需要漫长地等待所有数据加载完再进行绘制。</p><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/features/scatterGL.jpg?_v_=20200710_1" width="60%"><br /><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/features/scatterGL2.jpg?_v_=20200710_1" width="30%"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/features/scatterGL3.jpg?_v_=20200710_1" width="30%"><h2 id="mobile">移动端优化</h2><p>ECharts 针对移动端交互做了细致的优化,例如移动端小屏上适于用手指在坐标系中进行缩放、平移。 PC 端也可以用鼠标在图中进行缩放(用鼠标滚轮)、平移等。</p><p>细粒度的模块化和打包机制可以让 ECharts 在移动端也拥有很小的体积,可选的 SVG 渲染模块让移动端的内存占用不再捉襟见肘。</p><iframe data-src="https://echarts.apache.org/examples/zh/view.html?c=area-simple&amp;reset=1&amp;edit=1&amp;renderer=svg" width="60%" height="400"></iframe><h2 id="mult-platform">多渲染方案,跨平台使用!</h2><p>ECharts 支持以 Canvas、SVG(4.0+)、VML 的形式渲染图表。VML 可以兼容低版本 IE,SVG 使得移动端不再为内存担忧,Canvas 可以轻松应对大数据量和特效的展现。不同的渲染方式提供了更多选择,使得 ECharts 在各种场景下都有更好的表现。</p><p>除了 PC 和移动端的浏览器,ECharts 还能在 node 上配合 node-canvas 进行高效的服务端渲染(SSR)。从 4.0 开始我们还和微信小程序的团队合作,提供了 ECharts 对小程序的适配!</p><p>社区热心的贡献者也为我们提供了丰富的其它语言扩展,比如 Python 的<a href="https://github.com/pyecharts/pyecharts" target="_blank">pyecharts</a>,R 语言的 <a href="https://github.com/cosname/recharts" target="_blank">recharts</a>, Julia 的 <a href="https://github.com/randyzwitch/ECharts.jl">ECharts.jl</a> 等等。</p><p>我们希望平台和语言都不会成为大家使用 ECharts 实现可视化的限制!</p><h2 id="interaction">深度的交互式数据探索</h2><p>交互是从数据中发掘信息的重要手段。“总览为先,缩放过滤按需查看细节”是数据可视化交互的基本需求。</p><p>ECharts 一直在<em>交互</em>的路上前进,我们提供了 <a href="option.html#legend" target="_blank">图例</a>、<a href="option.html#visualMap" target="_blank">视觉映射</a>、<a href="option.html#dataZoom" target="_blank">数据区域缩放</a>、<a href="option.html#tooltip" target="_blank">tooltip</a>、<a href="option.html#brush">数据刷选</a>等开箱即用的交互组件,可以对数据进行多维度数据筛取、视图缩放、展示细节等交互操作。</p><iframe data-src="https://echarts.apache.org/examples/zh/view.html?c=scatter-matrix&amp;reset=1&amp;edit=1" width="60%" height="540"></iframe><h2 id="visual-mapping">多维数据的支持以及丰富的视觉编码手段</h2><p>ECharts 3 开始加强了对多维数据的支持。除了加入了平行坐标等常见的多维数据可视化工具外,对于传统的散点图等,传入的数据也可以是多个维度的。配合视觉映射组件 <a href="option.html#visualMap" target="_blank">visualMap</a> 提供的丰富的视觉编码,能够将不同维度的数据映射到颜色、大小、透明度、明暗度等不同的视觉通道。</p><iframe data-src="https://echarts.apache.org/examples/zh/view.html?c=scatter-nutrients-matrix&amp;reset=1&amp;edit=1" width="60%" height="400"></iframe><h2 id="dynamic-data">动态数据</h2><p>ECharts 由数据驱动,数据的改变驱动图表展现的改变。因此动态数据的实现也变得异常简单,只需要获取数据,填入数据,ECharts 会找到两组数据之间的差异然后通过合适的动画去表现数据的变化。配合 <a href="option.html#timeline" target="_blank">timeline</a> 组件能够在更高的时间维度上去表现数据的信息。</p><iframe data-src="https://echarts.apache.org/examples/zh/view.html?c=scatter-life-expectancy-timeline&amp;reset=1&amp;edit=1" width="60%" height="400"></iframe><h2 id="fancy-effects">绚丽的特效</h2><p>ECharts 针对线数据,点数据等地理数据的可视化提供了吸引眼球的特效。</p><iframe data-src="https://echarts.apache.org/examples/zh/view.html?c=lines-bmap-effect&amp;reset=1&amp;edit=1" width="60%" height="400"></iframe><h2 id="gl">通过 GL 实现更多更强大绚丽的三维可视化</h2><p>想要在 VR,大屏场景里实现三维的可视化效果?我们提供了基于 WebGL 的 ECharts GL,你可以跟使用 ECharts 普通组件一样轻松的使用 ECharts GL 绘制出三维的地球,建筑群,人口分布的柱状图,在这基础之上我们还提供了不同层级的画面配置项,几行配置就能得到艺术化的画面!</p><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/features/flowGL-line.jpg?_v_=20200710_1" width="40%"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/features/buildings-ny.jpg?_v_=20200710_1" width="40%"><br /><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/features/capetown-taxi.jpg?_v_=20200710_1" width="40%"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/features/population.jpg?_v_=20200710_1" width="40%"><h2 id="aria">无障碍访问(4.0+)</h2><p>当我们说到“可视化”的时候,我们往往很自然地将它与“看得⻅”联系在一起,但其 实这是片面的。W3C制定了无障碍富互联网应用规范集(WAI-ARIA,the Accessible Rich Internet Applications Suite),致力于使得网⻚内容和网⻚应 用能够被更多残障人士访问。</p><p>ECharts 4.0 遵从这一规范,支持自动根据图表配置项智能生成描述,使得盲人可 以在朗读设备的帮助下了解图表内容,让图表可以被更多人群访问!</p><footer class="inner-footer"><div class="container"><div class="row"><div class="col-md-8"><p>Copyright © 2017-2021, The Apache Software Foundation Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.</p></div><div id="footer-icon-panel" class="col-md-4"><a href="https://www.apache.org"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/asf_logo.svg?_v_=20200710_1" class="footer-apache-logo"></a></div></div></div></footer></div></div></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/js/common.js?_v_=b5b8944fb9"></script><script>window.lazyLoadOptions = {
+<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>请访问 Apache ECharts 的官网 &nbsp;</p><a id="a1" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>访问官网</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><nav role="navigation" 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/zh/index.html" class="navbar-brand"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/logo.png?_v_=20200710_1" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/zh/index.html">首页</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">文档<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/feature.html">特性</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html">教程</a></li><li><a href="https://echarts.apache.org/zh/api.html">API</a></li><li><a href="https://echarts.apache.org/zh/option.html">配置项手册</a></li><li><a href="https://echarts.apache.org/zh/changelog.html">版本记录</a></li><li><a href="https://echarts.apache.org/zh/faq.html">常见问题</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html#ECharts%205%20升级指南">v5 升级指南<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">下载<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/download.html">下载</a></li><li><a href="https://echarts.apache.org/zh/download-theme.html">主题下载</a></li><li><a href="https://echarts.apache.org/zh/download-extension.html">扩展下载</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/zh/index.html">示例</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">资源<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/spreadsheet.html">表格工具</a></li><li><a href="https://echarts.apache.org/zh/theme-builder.html">主题构建工具</a></li><li><a href="https://echarts.apache.org/zh/cheat-sheet.html">术语速查手册</a></li><li><a href="https://echarts.apache.org/zh/resources.html">更多资源</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">社区<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/events.html">活动</a></li><li><a href="https://echarts.apache.org/zh/committers.html">贡献者列表</a></li><li><a href="https://echarts.apache.org/zh/maillist.html">邮件列表</a></li><li><a href="https://echarts.apache.org/zh/contributing.html">如何贡献</a></li><li><a href="https://echarts.apache.org/zh/dependencies.html">依赖项</a></li><li><a href="https://echarts.apache.org/zh/coding-standard.html">代码规范</a></li><li><a href="https://github.com/apache/echarts" target="_blank">源码(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/zh/security.html">安全</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">版权<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">活动<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">捐赠<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">鸣谢<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('en')">EN</a></li></ul></div></div></nav><div class="page-main"><div class="page-info"><div class="container"><h1>特性</h1><p class="page-info-echarts">Apache ECharts<sup>TM</sup></p></div></div><div class="page-content single-page"><div class="page-nav"><h4>特性</h4><ul></ul></div><div class="page-detail"><p class="page-detail-desc">ECharts,一个使用 JavaScript 实现的开源可视化库,可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE9/10/11,Chrome,Firefox,Safari等),底层依赖矢量图形库 <a href="https://github.com/ecomfe/zrender" target="_blank">ZRender</a>,提供直观,交互丰富,可高度个性化定制的数据可视化图表。</p><h2 id="chart-types">丰富的可视化类型</h2><p>ECharts 提供了常规的<a href="option.html#series-line" target="_blank">折线图</a>、<a href="option.html#series-bar" target="_blank">柱状图</a>、<a href="option.html#series-scatter" target="_blank">散点图</a>、<a href="option.html#series-pie" target="_blank">饼图</a>、<a href="option.html#series-candlestick" target="_blank">K线图</a>,用于统计的<a href="option.html#series-boxplot" target="_blank">盒形图</a>,用于地理数据可视化的<a href="option.html#series-map" target="_blank">地图</a>、<a href="option.html#series-heatmap" target="_blank">热力图</a>、<a href="option.html#series-lines" target="_blank">线图</a>,用于关系数据可视化的<a href="option.html#series-graph" target="_blank">关系图</a>、<a href="option.html#series-treemap" target="_blank">treemap</a>、<a href="option.html#series-sunburst">旭日图</a>,多维数据可视化的<a href="option.html#series-parallel" target="_blank">平行坐标</a>,还有用于 BI 的<a href="option.html#series-funnel" target="_blank">漏斗图</a>,<a href="option.html#series-gauge" target="_blank">仪表盘</a>,并且支持图与图之间的混搭。</p><p>除了已经内置的包含了丰富功能的图表,ECharts 还提供了<a href="option.html#series-custom">自定义系列</a>,只需要传入一个<em>renderItem</em>函数,就可以从数据映射到任何你想要的图形,更棒的是这些都还能和已有的交互组件结合使用而不需要操心其它事情。</p><p>你可以在下载界面下载包含所有图表的构建文件,如果只是需要其中一两个图表,又嫌包含所有图表的构建文件太大,也可以在在线构建中选择需要的图表类型后自定义构建。</p><h2 id="dataset">多种数据格式无需转换直接使用</h2><p>ECharts 内置的 dataset 属性(4.0+)支持直接传入包括二维表,key-value 等多种格式的数据源,通过简单的设置 encode 属性就可以完成从数据到图形的映射,这种方式更符合可视化的直觉,省去了大部分场景下数据转换的步骤,而且多个组件能够共享一份数据而不用克隆。</p><p>为了配合大数据量的展现,ECharts 还支持输入 TypedArray 格式的数据,TypedArray 在大数据量的存储中可以占用更少的内存,对 GC 友好等特性也可以大幅度提升可视化应用的性能。</p><h2 id="big-data">千万数据的前端展现</h2><p>通过增量渲染技术(4.0+),配合各种细致的优化,ECharts 能够展现千万级的数据量,并且在这个数据量级依然能够进行流畅的缩放平移等交互。</p><p>几千万的地理坐标数据就算使用二进制存储也要占上百 MB 的空间。因此 ECharts 同时提供了对流加载(4.0+)的支持,你可以使用 WebSocket 或者对数据分块后加载,加载多少渲染多少!不需要漫长地等待所有数据加载完再进行绘制。</p><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/features/scatterGL.jpg?_v_=20200710_1" width="60%"><br /><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/features/scatterGL2.jpg?_v_=20200710_1" width="30%"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/features/scatterGL3.jpg?_v_=20200710_1" width="30%"><h2 id="mobile">移动端优化</h2><p>ECharts 针对移动端交互做了细致的优化,例如移动端小屏上适于用手指在坐标系中进行缩放、平移。 PC 端也可以用鼠标在图中进行缩放(用鼠标滚轮)、平移等。</p><p>细粒度的模块化和打包机制可以让 ECharts 在移动端也拥有很小的体积,可选的 SVG 渲染模块让移动端的内存占用不再捉襟见肘。</p><iframe data-src="https://echarts.apache.org/examples/zh/view.html?c=area-simple&amp;reset=1&amp;edit=1&amp;renderer=svg" width="60%" height="400"></iframe><h2 id="mult-platform">多渲染方案,跨平台使用!</h2><p>ECharts 支持以 Canvas、SVG(4.0+)、VML 的形式渲染图表。VML 可以兼容低版本 IE,SVG 使得移动端不再为内存担忧,Canvas 可以轻松应对大数据量和特效的展现。不同的渲染方式提供了更多选择,使得 ECharts 在各种场景下都有更好的表现。</p><p>除了 PC 和移动端的浏览器,ECharts 还能在 node 上配合 node-canvas 进行高效的服务端渲染(SSR)。从 4.0 开始我们还和微信小程序的团队合作,提供了 ECharts 对小程序的适配!</p><p>社区热心的贡献者也为我们提供了丰富的其它语言扩展,比如 Python 的<a href="https://github.com/pyecharts/pyecharts" target="_blank">pyecharts</a>,R 语言的 <a href="https://github.com/cosname/recharts" target="_blank">recharts</a>, Julia 的 <a href="https://github.com/randyzwitch/ECharts.jl">ECharts.jl</a> 等等。</p><p>我们希望平台和语言都不会成为大家使用 ECharts 实现可视化的限制!</p><h2 id="interaction">深度的交互式数据探索</h2><p>交互是从数据中发掘信息的重要手段。“总览为先,缩放过滤按需查看细节”是数据可视化交互的基本需求。</p><p>ECharts 一直在<em>交互</em>的路上前进,我们提供了 <a href="option.html#legend" target="_blank">图例</a>、<a href="option.html#visualMap" target="_blank">视觉映射</a>、<a href="option.html#dataZoom" target="_blank">数据区域缩放</a>、<a href="option.html#tooltip" target="_blank">tooltip</a>、<a href="option.html#brush">数据刷选</a>等开箱即用的交互组件,可以对数据进行多维度数据筛取、视图缩放、展示细节等交互操作。</p><iframe data-src="https://echarts.apache.org/examples/zh/view.html?c=scatter-matrix&amp;reset=1&amp;edit=1" width="60%" height="540"></iframe><h2 id="visual-mapping">多维数据的支持以及丰富的视觉编码手段</h2><p>ECharts 3 开始加强了对多维数据的支持。除了加入了平行坐标等常见的多维数据可视化工具外,对于传统的散点图等,传入的数据也可以是多个维度的。配合视觉映射组件 <a href="option.html#visualMap" target="_blank">visualMap</a> 提供的丰富的视觉编码,能够将不同维度的数据映射到颜色、大小、透明度、明暗度等不同的视觉通道。</p><iframe data-src="https://echarts.apache.org/examples/zh/view.html?c=scatter-nutrients-matrix&amp;reset=1&amp;edit=1" width="60%" height="400"></iframe><h2 id="dynamic-data">动态数据</h2><p>ECharts 由数据驱动,数据的改变驱动图表展现的改变。因此动态数据的实现也变得异常简单,只需要获取数据,填入数据,ECharts 会找到两组数据之间的差异然后通过合适的动画去表现数据的变化。配合 <a href="option.html#timeline" target="_blank">timeline</a> 组件能够在更高的时间维度上去表现数据的信息。</p><iframe data-src="https://echarts.apache.org/examples/zh/view.html?c=scatter-life-expectancy-timeline&amp;reset=1&amp;edit=1" width="60%" height="400"></iframe><h2 id="fancy-effects">绚丽的特效</h2><p>ECharts 针对线数据,点数据等地理数据的可视化提供了吸引眼球的特效。</p><iframe data-src="https://echarts.apache.org/examples/zh/view.html?c=lines-bmap-effect&amp;reset=1&amp;edit=1" width="60%" height="400"></iframe><h2 id="gl">通过 GL 实现更多更强大绚丽的三维可视化</h2><p>想要在 VR,大屏场景里实现三维的可视化效果?我们提供了基于 WebGL 的 ECharts GL,你可以跟使用 ECharts 普通组件一样轻松的使用 ECharts GL 绘制出三维的地球,建筑群,人口分布的柱状图,在这基础之上我们还提供了不同层级的画面配置项,几行配置就能得到艺术化的画面!</p><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/features/flowGL-line.jpg?_v_=20200710_1" width="40%"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/features/buildings-ny.jpg?_v_=20200710_1" width="40%"><br /><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/features/capetown-taxi.jpg?_v_=20200710_1" width="40%"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/features/population.jpg?_v_=20200710_1" width="40%"><h2 id="aria">无障碍访问(4.0+)</h2><p>当我们说到“可视化”的时候,我们往往很自然地将它与“看得⻅”联系在一起,但其 实这是片面的。W3C制定了无障碍富互联网应用规范集(WAI-ARIA,the Accessible Rich Internet Applications Suite),致力于使得网⻚内容和网⻚应 用能够被更多残障人士访问。</p><p>ECharts 4.0 遵从这一规范,支持自动根据图表配置项智能生成描述,使得盲人可 以在朗读设备的帮助下了解图表内容,让图表可以被更多人群访问!</p><footer class="inner-footer"><div class="container"><div class="row"><div class="col-md-8"><p>Copyright © 2017-2021, The Apache Software Foundation Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.</p></div><div id="footer-icon-panel" class="col-md-4"><a href="https://www.apache.org"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/asf_logo.svg?_v_=20200710_1" class="footer-apache-logo"></a></div></div></div></footer></div></div></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/js/common.js?_v_=b5b8944fb9"></script><script>window.lazyLoadOptions = {
     elements_selector: 'iframe'
 };</script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@12.0.0/dist/lazyload.min.js"></script><script type="text/javascript">document.getElementById('nav-doc').className = 'active';</script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
 (function() {
diff --git a/zh/images/event/20210705-apachecon-en.jpeg b/zh/images/event/20210705-apachecon-en.jpeg
new file mode 100644
index 0000000..4b3ffb9
--- /dev/null
+++ b/zh/images/event/20210705-apachecon-en.jpeg
Binary files differ
diff --git a/zh/images/event/20210705-apachecon-en.webp b/zh/images/event/20210705-apachecon-en.webp
new file mode 100644
index 0000000..e859935
--- /dev/null
+++ b/zh/images/event/20210705-apachecon-en.webp
Binary files differ
diff --git a/zh/images/event/20210705-apachecon.jpeg b/zh/images/event/20210705-apachecon.jpeg
new file mode 100644
index 0000000..7c1f76f
--- /dev/null
+++ b/zh/images/event/20210705-apachecon.jpeg
Binary files differ
diff --git a/zh/images/event/20210705-apachecon.webp b/zh/images/event/20210705-apachecon.webp
new file mode 100644
index 0000000..870862b
--- /dev/null
+++ b/zh/images/event/20210705-apachecon.webp
Binary files differ
diff --git a/zh/images/people/nick.jpg b/zh/images/people/nick.jpg
new file mode 100644
index 0000000..fcaee32
--- /dev/null
+++ b/zh/images/people/nick.jpg
Binary files differ
diff --git a/zh/index.html b/zh/index.html
index bb5a9cf..8c02fec 100644
--- a/zh/index.html
+++ b/zh/index.html
@@ -7,7 +7,7 @@
     document.head.insertBefore(el, document.getElementById('font-hack'));
 }
 </script><title>Apache ECharts</title><script src="https://cdn.jsdelivr.net/npm/scrollreveal@4.0.7/dist/scrollreveal.min.js"></script><script src="https://cdn.jsdelivr.net/npm/lottie-web@5.7.6/build/player/lottie.min.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://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/forie.png?_v_=20200710_1" 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 的官网 &nbsp;</p><a id="a1" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>访问官网</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><nav role="navigation" 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/zh/index.html" class="navbar-brand"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/logo.png?_v_=20200710_1" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/zh/index.html">首页</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">文档<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/feature.html">特性</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html">教程</a></li><li><a href="https://echarts.apache.org/zh/api.html">API</a></li><li><a href="https://echarts.apache.org/zh/option.html">配置项手册</a></li><li><a href="https://echarts.apache.org/zh/changelog.html">版本记录</a></li><li><a href="https://echarts.apache.org/zh/faq.html">常见问题</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html#ECharts%205%20升级指南">v5 升级指南<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">下载<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/download.html">下载</a></li><li><a href="https://echarts.apache.org/zh/download-theme.html">主题下载</a></li><li><a href="https://echarts.apache.org/zh/download-extension.html">扩展下载</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/zh/index.html">示例</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">资源<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/spreadsheet.html">表格工具</a></li><li><a href="https://echarts.apache.org/zh/theme-builder.html">主题构建工具</a></li><li><a href="https://echarts.apache.org/zh/cheat-sheet.html">术语速查手册</a></li><li><a href="https://echarts.apache.org/zh/resources.html">更多资源</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">社区<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/events.html">活动</a></li><li><a href="https://echarts.apache.org/zh/committers.html">贡献者列表</a></li><li><a href="https://echarts.apache.org/zh/maillist.html">邮件列表</a></li><li><a href="https://echarts.apache.org/zh/contributing.html">如何贡献</a></li><li><a href="https://echarts.apache.org/zh/dependencies.html">依赖项</a></li><li><a href="https://echarts.apache.org/zh/coding-standard.html">代码规范</a></li><li><a href="https://github.com/apache/echarts" target="_blank">源码(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/zh/security.html">安全</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">版权<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">活动<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">捐赠<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">鸣谢<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('en')">EN</a></li></ul></div></div></nav><div id="page-index" class="page-main"><div id="main-content"><section id="home-section"><div class="home-brand-panel description container"><div class="home-info"><div class="home-brand">Apache ECharts</div><div class="home-subtitle">一个基于 JavaScript 的开源可视化图表库</div><div class="home-btn-panel"><a href="https://echarts.apache.org/tutorial.html#5%20分钟上手%20ECharts" class="btn btn-main btn-index-home"><svg width="22px" height="19px" viewBox="0 0 17 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="index-home-svg"><path fill="#fff" d="M10.9,16.2 C10.9,16.8 10.5,17.2 9.9,17.2 L5.3,17.2 C4.7,17.2 4.3,16.8 4.3,16.2 C4.3,15.6 4.7,15.2 5.3,15.2 L9.9,15.2 C10.5,15.2 10.9,15.7 10.9,16.2 Z M13.6,7.5 L5.3,7.5 C4.7,7.5 4.3,7.9 4.3,8.5 C4.3,9.1 4.7,9.5 5.3,9.5 L13.6,9.5 C14.2,9.5 14.6,9.1 14.6,8.5 C14.6,7.9 14.2,7.5 13.6,7.5 Z M17.9,6 L17.9,19 C17.9,20.7 16.6,22 14.9,22 L3.9,22 C2.2,22 0.9,20.7 0.9,19 L0.9,7.5 L0.9,6 L0.9,5 L0.9,4 L0.9,2 C0.9,0.9 1.8,0 2.9,0 L12.9,0 C14,0 14.9,0.9 14.9,2 L14.9,3 C16.6,3 17.9,4.3 17.9,6 Z M2.9,3 L3.9,3 L12.9,3 L12.9,2 L2.9,2 L2.9,3 Z M15.9,6 C15.9,5.4 15.5,5 14.9,5 L3.9,5 C3.3,5 2.9,5.4 2.9,6 L2.9,19 C2.9,19.6 3.3,20 3.9,20 L14.9,20 C15.5,20 15.9,19.6 15.9,19 L15.9,6 Z M13.6,11.5 L5.3,11.5 C4.7,11.5 4.3,11.9 4.3,12.5 C4.3,13.1 4.7,13.5 5.3,13.5 L13.6,13.5 C14.2,13.5 14.6,13.1 14.6,12.5 C14.6,11.9 14.2,11.5 13.6,11.5 Z"></path></svg><span>快速入门</span></a><a href="https://echarts.apache.org/examples/zh/index.html" class="btn btn-main btn-index-home"><svg width="25px" height="19px" viewBox="0 0 17 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="index-home-svg"><path fill="#F72C5B" d="M21,0 L6,0 C4.9,0 4,0.9 4,2 L4,4 L2,4 C0.9,4 0,4.9 0,6 L0,18 C0,19.1 0.9,20 2,20 L17,20 C18.1,20 19,19.1 19,18 L19,16 L21,16 C22.1,16 23,15.1 23,14 L23,2 C23,0.9 22.1,0 21,0 Z M17,18 L2,18 L2,6 L17,6 L17,18 Z M21,14 L19,14 L19,6 C19,4.9 18.1,4 17,4 L6,4 L6,2 L21,2 L21,14 Z M4,15 L4,12 C4,11.4 4.4,11 5,11 C5.6,11 6,11.4 6,12 L6,15 C6,15.6 5.6,16 5,16 C4.4,16 4,15.6 4,15 Z M13,15 L13,12 C13,11.4 13.4,11 14,11 C14.6,11 15,11.4 15,12 L15,15 C15,15.6 14.6,16 14,16 C13.4,16 13,15.6 13,15 Z M7,15 L7,9 C7,8.4 7.4,8 8,8 C8.6,8 9,8.4 9,9 L9,15 C9,15.6 8.6,16 8,16 C7.4,16 7,15.6 7,15 Z M10,15 L10,11 C10,10.4 10.4,10 11,10 C11.6,10 12,10.4 12,11 L12,15 C12,15.6 11.6,16 11,16 C10.4,16 10,15.6 10,15 Z"></path></svg><span>所有示例</span></a><a href="https://github.com/apache/echarts" target="_blank" class="btn btn-main btn-index-home btn-index-github"><svg width="22px" height="22px" viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-262.000000, -2480.000000)" fill="#081642"><g transform="translate(252.000000, 2470.000000)"><path d="M29.9006449,27.904446 C28.5016932,29.8668872 26.6944882,31.2248797 24.4790301,31.9784237 C24.2211218,32.0272886 24.0325745,31.9931534 23.9133882,31.876018 C23.7942019,31.7588827 23.7346171,31.6119968 23.7346338,31.4353603 L23.7346338,28.3376019 C23.7346338,27.3880159 23.4865017,26.6930482 22.9902375,26.2526987 C23.5347812,26.1938141 24.024319,26.1058042 24.458851,25.9886688 C24.893383,25.8715335 25.3422785,25.680801 25.8055376,25.4164714 C26.2687966,25.1521418 26.6556591,24.8267354 26.9661251,24.4402521 C27.276591,24.0537688 27.5296112,23.5398222 27.7251857,22.8984123 C27.9207602,22.2570024 28.0185475,21.5203805 28.0185475,20.6885464 C28.0185475,19.504056 27.6414612,18.4959023 26.8872886,17.6640854 C27.240536,16.7733669 27.2023419,15.7752328 26.7727063,14.6696833 C26.5050218,14.5813565 26.1181593,14.6352226 25.6121189,14.8312818 C25.1060784,15.0273409 24.6669591,15.2428141 24.2947609,15.4777015 L23.7502256,15.8300324 C22.8622108,15.5757225 21.9454689,15.4485675 21,15.4485675 C20.0545311,15.4485675 19.1377892,15.5757225 18.2497744,15.8300324 C18.0969813,15.7223001 17.8940788,15.5901353 17.641067,15.433538 C17.3880551,15.2769408 16.9892689,15.0884007 16.4447085,14.8679176 C15.9001481,14.6474346 15.4894467,14.5813479 15.2126043,14.6696576 C14.7921266,15.7758408 14.7588206,16.7739749 15.1126863,17.6640597 C14.3585137,18.4958938 13.9814275,19.5040475 13.9814275,20.6885208 C13.9814275,21.5203548 14.0792147,22.2544676 14.2747892,22.8908591 C14.4703637,23.5272505 14.720944,24.0411971 15.0265302,24.4326988 C15.3321164,24.8242005 15.7165391,25.1521076 16.1797981,25.41642 C16.6430571,25.6807325 17.0919527,25.871465 17.5264847,25.9886174 C17.9610167,26.1057699 18.4505545,26.1937799 18.9950982,26.2526473 C18.6131238,26.60467 18.3790461,27.1085884 18.292865,27.7644025 C18.0924107,27.8621152 17.8775846,27.935404 17.6483866,27.984269 C17.4191886,28.0331339 17.1469167,28.0575663 16.831571,28.0575663 C16.5162253,28.0575663 16.203612,27.9523346 15.8937309,27.7418712 C15.5838499,27.5314078 15.3189144,27.225424 15.0989244,26.8239198 C14.9174043,26.5107253 14.6857747,26.2564154 14.4040358,26.0609899 C14.1222969,25.8655645 13.8860801,25.7481209 13.6953854,25.708659 L13.4084408,25.6644956 C13.2079866,25.6644956 13.069557,25.6864188 12.9931521,25.7302654 C12.9167472,25.7741119 12.8929083,25.8304873 12.9216353,25.8993914 C12.9503623,25.9682956 12.9934529,26.0368829 13.050907,26.1051533 C13.1083611,26.1734238 13.1703941,26.2319915 13.2370061,26.2808564 L13.336924,26.3541538 C13.5471712,26.4518665 13.7549701,26.6378974 13.9603209,26.9122466 C14.1656716,27.1865958 14.3160164,27.4362043 14.4113555,27.661072 L14.554364,27.9983735 C14.67843,28.3704354 14.8886689,28.6714094 15.1850804,28.9012955 C15.481492,29.1311815 15.8014334,29.2780674 16.1449045,29.3419532 C16.4883756,29.405839 16.8202406,29.4399742 17.1404995,29.4443589 C17.4607584,29.4487435 17.7256939,29.4315218 17.935306,29.3926936 L18.2644137,29.3335008 C18.2644137,29.7055627 18.2668619,30.1412107 18.2717584,30.6404447 C18.2766548,31.1396787 18.279103,31.4040083 18.279103,31.4334334 C18.279103,31.6094533 18.21707,31.7563392 18.093004,31.8740912 C17.9689379,31.9918431 17.7779507,32.0259784 17.5200424,31.9764969 C15.3045843,31.22297 13.4973793,29.8649774 12.0984276,27.9025191 C10.6994759,25.9400608 10,23.7305118 10,21.2738721 C10,19.2281225 10.4916769,17.3417791 11.4750308,15.6148418 C12.4583846,13.8879045 13.7928551,12.5202092 15.4784422,11.5117558 C17.1640293,10.5033024 19.0045486,9.99938397 21,10.0000006 C22.9954514,10.0006172 24.8359707,10.5045356 26.5215578,11.5117558 C28.2071449,12.518976 29.5416154,13.8866713 30.5249692,15.6148418 C31.5083231,17.3430123 32,19.2293557 32,21.2738721 C31.9990725,23.7324558 31.2995966,25.9420048 29.9006449,27.904446 Z"></path></g></g></g></svg></a></div></div><div class="home-chart"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/index-home-pie.png?_v_=20200710_1"></div></div></section><section id="events-section"><div class="container"><a href="./events/2021-05-13-iscas.html" class="event"><picture><source data-srcset="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20210513-iscas.webp?_v_=20200710_1" type="image/webp" class="lazy"><source data-srcset="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20210513-iscas.jpeg?_v_=20200710_1" type="image/jpeg" class="lazy"><img data-src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20210513-iscas.jpeg?_v_=20200710_1" alt="开源软件供应链点亮计划 - 暑期 2021" class="lazy"></picture></a></div></section><section id="feature-section"><div class="container"><div class="index-features"><h2 class="reveal">特性</h2><hr class="reveal"><a href="https://echarts.apache.org/feature.html" class="more reveal">查看完整特性</a></div><div class="row"><div class="col-md-6"><div id="index-feature-1" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-1" class="index-feature-icon-bg"></div><div id="icon-1" class="index-feature-icon"></div></div><div class="index-feature-right reveal"><h3 class="reveal">丰富的图表类型</h3><p class="reveal-later">提供开箱即用的 20 多种图表和十几种组件,并且支持各种图表以及组件的任意组合。</p></div></div></div><div class="col-md-6"><div id="index-feature-2" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-2" class="index-feature-icon-bg"></div><div id="icon-2" class="index-feature-icon"></div></div><div class="index-feature-right"><h3 class="reveal">强劲的渲染引擎</h3><p class="reveal-later">Canvas、SVG 双引擎一键切换,增量渲染、流加载等技术实现千万级数据的流畅交互。</p></div></div></div><div class="col-md-6"><div id="index-feature-3" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-3" class="index-feature-icon-bg"></div><div id="icon-3" class="index-feature-icon"></div></div><div class="index-feature-right"><h3 class="reveal">专业的数据分析</h3><p class="reveal-later">通过数据集管理数据,支持数据过滤、聚类、回归,帮助实现同一份数据的多维度分析。</p></div></div></div><div class="col-md-6"><div id="index-feature-4" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-4" class="index-feature-icon-bg"></div><div id="icon-4" class="index-feature-icon"></div></div><div class="index-feature-right"><h3 class="reveal">优雅的可视化设计</h3><p class="reveal-later">默认设计遵从可视化原则,支持响应式设计,并且提供了灵活的配置项方便开发者定制。</p></div></div></div><div class="col-md-6"><div id="index-feature-5" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-5" class="index-feature-icon-bg"></div><div id="icon-5" class="index-feature-icon"></div></div><div class="index-feature-right"><h3 class="reveal">健康的开源社区</h3><p class="reveal-later">活跃的社区用户保证了项目的健康发展,也贡献了丰富的第三方插件满足不同场景的需求。</p></div></div></div><div class="col-md-6"><div id="index-feature-6" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-6" class="index-feature-icon-bg"></div><div id="icon-6" class="index-feature-icon"></div></div><div class="index-feature-right"><h3 class="reveal">友好的无障碍访问</h3><p class="reveal-later">智能生成的图表描述和贴花图案,帮助视力障碍人士了解图表内容,读懂图表背后的故事。</p></div></div></div></div></div></section><section id="publication"><div class="container"><div id="start-line"></div><div class="paper"><div class="content"><h2 class="reveal-latest">ECharts: A Declarative Framework for Rapid Construction of Web-based Visualization</h2><p class="note reveal-latest">如果您在科研项目、产品、学术论文、技术报告、新闻报告、教育、专利以及其他相关活动中使用了 Apache ECharts,欢迎引用本论文。</p><div class="single-btn-panel reveal-latest"><a href="http://www.cad.zju.edu.cn/home/vagblog/VAG_Work/echarts.pdf" class="pdf reveal-later">Visual Informatics, 2018 [PDF]</a></div></div><div class="icon"><div id="paper-icon"></div></div></div><div id="end-line"></div></div></section><section id="about-section" class="normal reveal-about"><div class="container"><h3>关注我们</h3><hr><p>关注我们以及时获得更多最新动态</p><div class="btn-panel row"><div class="col-lg-3 col-sm-6"><a id="btn-github" href="https://github.com/apache/echarts"><div class="btn-content"><div class="btn-logo"><svg width="22px" height="22px" viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-262.000000, -2480.000000)" fill="#081642"><g transform="translate(252.000000, 2470.000000)"><path d="M29.9006449,27.904446 C28.5016932,29.8668872 26.6944882,31.2248797 24.4790301,31.9784237 C24.2211218,32.0272886 24.0325745,31.9931534 23.9133882,31.876018 C23.7942019,31.7588827 23.7346171,31.6119968 23.7346338,31.4353603 L23.7346338,28.3376019 C23.7346338,27.3880159 23.4865017,26.6930482 22.9902375,26.2526987 C23.5347812,26.1938141 24.024319,26.1058042 24.458851,25.9886688 C24.893383,25.8715335 25.3422785,25.680801 25.8055376,25.4164714 C26.2687966,25.1521418 26.6556591,24.8267354 26.9661251,24.4402521 C27.276591,24.0537688 27.5296112,23.5398222 27.7251857,22.8984123 C27.9207602,22.2570024 28.0185475,21.5203805 28.0185475,20.6885464 C28.0185475,19.504056 27.6414612,18.4959023 26.8872886,17.6640854 C27.240536,16.7733669 27.2023419,15.7752328 26.7727063,14.6696833 C26.5050218,14.5813565 26.1181593,14.6352226 25.6121189,14.8312818 C25.1060784,15.0273409 24.6669591,15.2428141 24.2947609,15.4777015 L23.7502256,15.8300324 C22.8622108,15.5757225 21.9454689,15.4485675 21,15.4485675 C20.0545311,15.4485675 19.1377892,15.5757225 18.2497744,15.8300324 C18.0969813,15.7223001 17.8940788,15.5901353 17.641067,15.433538 C17.3880551,15.2769408 16.9892689,15.0884007 16.4447085,14.8679176 C15.9001481,14.6474346 15.4894467,14.5813479 15.2126043,14.6696576 C14.7921266,15.7758408 14.7588206,16.7739749 15.1126863,17.6640597 C14.3585137,18.4958938 13.9814275,19.5040475 13.9814275,20.6885208 C13.9814275,21.5203548 14.0792147,22.2544676 14.2747892,22.8908591 C14.4703637,23.5272505 14.720944,24.0411971 15.0265302,24.4326988 C15.3321164,24.8242005 15.7165391,25.1521076 16.1797981,25.41642 C16.6430571,25.6807325 17.0919527,25.871465 17.5264847,25.9886174 C17.9610167,26.1057699 18.4505545,26.1937799 18.9950982,26.2526473 C18.6131238,26.60467 18.3790461,27.1085884 18.292865,27.7644025 C18.0924107,27.8621152 17.8775846,27.935404 17.6483866,27.984269 C17.4191886,28.0331339 17.1469167,28.0575663 16.831571,28.0575663 C16.5162253,28.0575663 16.203612,27.9523346 15.8937309,27.7418712 C15.5838499,27.5314078 15.3189144,27.225424 15.0989244,26.8239198 C14.9174043,26.5107253 14.6857747,26.2564154 14.4040358,26.0609899 C14.1222969,25.8655645 13.8860801,25.7481209 13.6953854,25.708659 L13.4084408,25.6644956 C13.2079866,25.6644956 13.069557,25.6864188 12.9931521,25.7302654 C12.9167472,25.7741119 12.8929083,25.8304873 12.9216353,25.8993914 C12.9503623,25.9682956 12.9934529,26.0368829 13.050907,26.1051533 C13.1083611,26.1734238 13.1703941,26.2319915 13.2370061,26.2808564 L13.336924,26.3541538 C13.5471712,26.4518665 13.7549701,26.6378974 13.9603209,26.9122466 C14.1656716,27.1865958 14.3160164,27.4362043 14.4113555,27.661072 L14.554364,27.9983735 C14.67843,28.3704354 14.8886689,28.6714094 15.1850804,28.9012955 C15.481492,29.1311815 15.8014334,29.2780674 16.1449045,29.3419532 C16.4883756,29.405839 16.8202406,29.4399742 17.1404995,29.4443589 C17.4607584,29.4487435 17.7256939,29.4315218 17.935306,29.3926936 L18.2644137,29.3335008 C18.2644137,29.7055627 18.2668619,30.1412107 18.2717584,30.6404447 C18.2766548,31.1396787 18.279103,31.4040083 18.279103,31.4334334 C18.279103,31.6094533 18.21707,31.7563392 18.093004,31.8740912 C17.9689379,31.9918431 17.7779507,32.0259784 17.5200424,31.9764969 C15.3045843,31.22297 13.4973793,29.8649774 12.0984276,27.9025191 C10.6994759,25.9400608 10,23.7305118 10,21.2738721 C10,19.2281225 10.4916769,17.3417791 11.4750308,15.6148418 C12.4583846,13.8879045 13.7928551,12.5202092 15.4784422,11.5117558 C17.1640293,10.5033024 19.0045486,9.99938397 21,10.0000006 C22.9954514,10.0006172 24.8359707,10.5045356 26.5215578,11.5117558 C28.2071449,12.518976 29.5416154,13.8866713 30.5249692,15.6148418 C31.5083231,17.3430123 32,19.2293557 32,21.2738721 C31.9990725,23.7324558 31.2995966,25.9420048 29.9006449,27.904446 Z"></path></g></g></g></svg><span>GitHub</span></div><div class="icon-v-right"></div></div></a></div><div class="col-lg-3 col-sm-6"><a id="btn-weixin"><div class="btn-content zh"><div class="btn-logo"><svg width="25px" height="21px" viewBox="0 0 25 21" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-512.000000, -2480.000000)" fill="rgba(93, 201, 116)"><g transform="translate(512.000000, 2480.000000)"><path d="M17.6290595,6.47976119 C17.7534123,6.47976119 17.8770026,6.48260946 18,6.4873469 C17.2166965,2.79549199 13.5198007,0 9.07678865,0 C4.06379837,0 0,3.55853831 0,7.94816178 C0,10.5128275 1.38756065,12.7933344 3.54074891,14.2466508 L2.63388325,17 L5.63681512,15.3050455 C6.69779456,15.6858421 7.85912588,15.8963236 9.07676039,15.8963236 C9.31148885,15.8963236 9.54412784,15.8885344 9.77433851,15.8731886 C9.52032463,15.1807388 9.38270085,14.4428328 9.38270085,13.676822 C9.38275733,9.70202902 13.0747399,6.47976119 17.6290595,6.47976119 Z M12.5,4 C13.328411,4 14,4.67155738 14,5.5 C14,6.32841103 13.3284426,7 12.5,7 C11.6715574,7 11,6.32844262 11,5.5 C11.0000316,4.67155738 11.671589,4 12.5,4 Z M5.5,7 C4.67158897,7 4,6.32844262 4,5.5 C4,4.67158897 4.67155738,4 5.5,4 C6.32844262,4 7,4.67155738 7,5.5 C7,6.32841103 6.32844262,7 5.5,7 Z"></path><path d="M25,13.4664775 C25,9.89513318 21.6421433,7 17.4999862,7 C13.3578291,7 10,9.89513318 10,13.4664775 C10,17.0378217 13.3578567,19.9329549 17.5000138,19.9329549 C18.36973,19.9329549 19.2046277,19.804878 19.9813841,19.5701641 L22.5457108,21 L21.8004292,18.7646117 C23.7349834,17.5951163 25,15.6582837 25,13.4664775 Z M15,12 C14.447707,12 14,11.552293 14,11 C14,10.447707 14.447707,10 15,10 C15.552293,10 16,10.447707 16,11 C16,11.552293 15.552293,12 15,12 Z M20,12 C19.447707,12 19,11.552293 19,11 C19,10.447707 19.447707,10 20,10 C20.552293,10 21,10.447707 21,11 C21,11.552293 20.5522667,12 20,12 Z"></path></g></g></g></svg><span>公众号</span></div><div class="weixin-code"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/ercode.jpg?_v_=20200710_1"></div></div></a></div><div class="col-lg-3 col-sm-6"><a id="btn-weibo" href="https://weibo.com/echarts"><div class="btn-content"><div class="btn-logo"><svg width="25px" height="20px" viewBox="0 0 25 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-774.000000, -2480.000000)" fill="rgba(174, 44, 53)"><g transform="translate(767.000000, 2470.000000)"><g transform="translate(7.000000, 10.000000)"><path d="M9.56107255,18.530208 C5.55942203,18.7083394 2.28534432,16.6598289 2.28534432,13.9878588 C2.28534432,11.3158886 5.55942203,9.08924686 9.56107255,8.91111551 C13.5627231,8.73298415 16.8368008,10.4252319 16.8368008,13.0972021 C16.8368008,15.7691722 13.5627231,18.3520767 9.56107255,18.530208 Z M18.1100532,9.71270657 C17.1096406,9.53457522 17.6553202,9.0001812 17.6553202,9.0001812 C17.6553202,9.0001812 18.5647862,7.48606478 17.473427,6.32821106 C16.1092279,4.90316031 12.7442036,6.50634241 12.7442036,6.50634241 C11.4709512,6.95167077 11.8347376,6.32821106 12.0166308,5.34848869 C12.0166308,4.19063497 11.6528444,2.14212451 8.19687348,3.3890439 C4.74090259,4.54689763 1.83061129,8.7329842 1.83061129,8.7329842 C-0.26116057,11.49402 0.0116792299,13.6315961 0.0116792299,13.6315961 C0.557358851,18.3520767 5.4684754,19.5989961 9.37917931,19.9552588 C13.4717764,20.3115215 18.9285726,18.5302081 20.5656115,14.9675812 C22.1117037,11.3158886 19.1104658,9.89083792 18.1100532,9.71270657 Z"></path><path d="M12.8641827,12.2517204 C12.2123929,10.4024172 10.0707976,9.57023078 7.92920237,10.2174869 C5.78760713,10.9572081 4.57714023,12.9914416 5.13581726,14.7482796 C5.78760713,16.5975828 7.92920237,17.4297692 10.0707976,16.7825131 C12.2123929,16.135257 13.4228598,14.1010235 12.8641827,12.2517204 Z M8.11542806,15.4880009 C7.37052537,15.6729312 6.53250982,15.3955358 6.34628415,14.7482797 C6.16005847,14.1010235 6.62562266,13.4537674 7.46363821,13.176372 C8.2085409,12.9914416 9.04655645,13.2688371 9.23278212,13.9160932 C9.32589493,14.5633493 8.86033075,15.3030706 8.11542806,15.4880009 Z M10.3501361,13.176372 C10.2570233,13.4537674 9.88457196,13.6386977 9.60523346,13.5462326 C9.32589496,13.4537674 9.23278212,13.0839068 9.32589496,12.8065113 C9.4190078,12.5291159 9.79145914,12.3441855 10.0707976,12.4366507 C10.3501361,12.621581 10.5363618,12.8989765 10.3501361,13.176372 Z"></path><path d="M24.5953609,9.4285714 C24.5953609,9.3333333 24.6913146,9.2380952 24.6913146,9.14285713 C25.2670362,7.5238095 24.9791754,5.9047619 24.3075001,4.38095238 C23.0601032,1.7142857 20.3734021,0 17.4947939,0 C16.9190722,0 16.3433505,0.0952380996 15.8635825,0.190476199 L15.8635825,0.190476199 L15.8635825,0.190476199 C15.8635825,0.190476199 15.7676289,0.190476199 15.6716753,0.285714299 L15.6716753,0.285714299 C15.2878608,0.476190498 15,0.857142874 15,1.33333335 C15,2.00000002 15.479768,2.4761905 16.1514433,2.4761905 C16.2473969,2.4761905 16.3433505,2.4761905 16.5352577,2.3809524 L16.5352577,2.3809524 C16.8231186,2.1904762 17.3988402,2.09523812 17.4947938,2.09523812 L17.5907475,2.09523812 C19.6057732,2.09523812 21.5248454,3.23809527 22.3884279,5.23809525 C22.8681959,6.2857143 22.9641496,7.42857143 22.6762887,8.57142857 C22.6762887,8.66666667 22.5803351,8.85714285 22.5803351,8.95238095 C22.5803351,9.52380952 23.0601031,10 23.6358248,10 L23.827732,10 L23.827732,10 L23.9236856,10 C24.2115465,9.9047619 24.4034537,9.8095238 24.5953609,9.61904762 C24.4994073,9.5238095 24.4994073,9.5238095 24.5953609,9.4285714 C24.5953609,9.5238095 24.5953609,9.4285714 24.5953609,9.4285714 Z"></path><path d="M17.6310803,4 C17.3252528,4 16.9174827,4.08510639 16.6116551,4.08510639 C16.3058276,4.17021275 16,4.42553192 16,4.76595745 C16,5.10638297 16.3058275,5.36170214 16.7135976,5.36170214 C16.8155402,5.36170214 16.9174827,5.36170214 17.0194252,5.27659575 C17.2233102,5.27659575 17.3252527,5.19148936 17.5291378,5.19148936 C18.548563,5.19148936 19.4660456,5.87234042 19.4660456,6.72340425 C19.4660456,6.89361703 19.4660456,6.97872339 19.3641031,7.14893617 L19.3641031,7.40425531 L19.3641031,7.40425531 L19.3641031,7.40425531 L19.3641031,7.40425531 L19.3641031,7.40425531 L19.3641031,7.4893617 L19.3641031,7.4893617 C19.4660456,7.82978723 19.7718732,8 20.0777008,8 C20.3835283,8 20.5874133,7.82978723 20.7912984,7.65957447 L20.7912984,7.65957447 C20.8932409,7.40425533 20.9951834,7.06382978 20.9951834,6.72340425 C21.0971259,5.27659575 19.5679882,4 17.6310803,4 Z"></path></g></g></g></g></svg><span>微博</span></div><div class="icon-v-right"></div></div></a></div><div class="col-lg-3 col-sm-6"><a id="btn-twitter" href="https://twitter.com/ApacheECharts"><div class="btn-content"><div class="btn-logo"><svg width="22px" height="19px" viewBox="0 0 22 19" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-1029.000000, -2481.000000)" fill="rgba(0, 172, 237)" fill-rule="nonzero"><g transform="translate(1019.000000, 2470.000000)"><path d="M31.9965682,13.2536272 C31.3736136,14.2239084 30.6196136,15.0506018 29.7346591,15.7332964 C29.7441818,15.8714453 29.7489318,16.0792366 29.7489318,16.3566705 C29.7489318,17.6436908 29.5720682,18.9275445 29.2183409,20.2082316 C28.8645909,21.4890636 28.3274091,22.7184796 27.6069091,23.8965522 C26.8862955,25.0746247 26.0280455,26.1166031 25.0323864,27.0222697 C24.0366364,27.9281298 22.8360682,28.6508066 21.4306364,29.1904211 C20.0251818,29.7300356 18.5226591,30 16.9230227,30 C14.4015909,30 12.0938636,29.2822545 10,27.8470776 C10.3251136,27.8862863 10.6878182,27.9059148 11.0880909,27.9059148 C13.1819545,27.9059148 15.0477727,27.2230992 16.6854545,25.8575407 C15.7087727,25.8372354 14.8339318,25.5180789 14.0609545,24.8998053 C13.288,24.281701 12.7573636,23.4924033 12.4690909,22.532299 C12.7763409,22.581612 13.0604091,22.606341 13.32125,22.606341 C13.7215227,22.606341 14.1168864,22.5518066 14.5076136,22.4428346 C13.4654545,22.214883 12.6024318,21.6632061 11.9187955,20.7878041 C11.2351591,19.9125471 10.8933409,18.8958295 10.8933409,17.7380623 L10.8933409,17.6790802 C11.5258182,18.0553092 12.2052955,18.2580242 12.9318409,18.287201 C12.3172955,17.851458 11.8288409,17.2826425 11.4667727,16.5808028 C11.1046818,15.8790598 10.923,15.1170776 10.9219318,14.2949288 C10.9219318,13.4233702 11.1267045,12.6170789 11.5365227,11.8760064 C12.6620909,13.3505127 14.0323182,14.5304949 15.6474545,15.4160496 C17.2624545,16.3015076 18.9907727,16.7936705 20.8321364,16.8924898 C20.7582955,16.5162366 20.7213636,16.1501361 20.7213636,15.7941883 C20.7213636,14.4678626 21.1608409,13.3372176 22.0398409,12.4023257 C22.9188409,11.4674338 23.9818864,11 25.2289318,11 C26.5319318,11 27.6300455,11.5048779 28.5233636,12.5144402 C29.5382045,12.306673 30.4922273,11.9209198 31.3854091,11.3572048 C31.0412273,12.4947875 30.3808409,13.3759186 29.4041364,14.0003804 C30.2700455,13.9015611 31.1353409,13.6539809 32,13.2574224 L31.9965682,13.2536272 Z"></path></g></g></g></svg><span>Twitter</span></div><div class="icon-v-right"></div></div></a></div></div></div></section></div><footer><div class="container"><div class="row"><div class="col-md-9"><p>Copyright © 2017-2021, The Apache Software Foundation Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.</p><div class="icon-panel"><a href="mailto:dev@echarts.apache.org?body=%28Thanks%20for%20using%20ECharts.%20Email%20us%20if%20you%20have%20non-technical%20problems%20using%20ECharts.%20For%20technical%20support%2C%20please%20go%20to%20https%3A//github.com/apache/echarts/issues%20.%29" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-email.png?_v_=20200710_1"></a><a href="https://twitter.com/ApacheECharts" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-twitter.png?_v_=20200710_1"></a><a href="https://weibo.com/echarts" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-weibo.png?_v_=20200710_1"></a><a href="https://github.com/apache/echarts" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-github.png?_v_=20200710_1"></a></div></div><div id="footer-icon-panel" class="col-md-3"><a href="https://www.apache.org"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/asf_logo.svg?_v_=20200710_1" class="footer-apache-logo"></a></div></div></div></footer></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/js/common.js?_v_=b5b8944fb9"></script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@12.0.0/dist/lazyload.min.js"></script><script src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/js/index.js?_v_=1624430965835"></script><script>window.lazyLoadOptions = {
+<!--[if (gt IE 8)|!(IE)]><body class="undefined"></body><![endif]--><div id="apache-banner"><div class="txt"><p>请访问 Apache ECharts 的官网 &nbsp;</p><a id="a1" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>访问官网</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><nav role="navigation" 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/zh/index.html" class="navbar-brand"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/logo.png?_v_=20200710_1" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/zh/index.html">首页</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">文档<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/feature.html">特性</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html">教程</a></li><li><a href="https://echarts.apache.org/zh/api.html">API</a></li><li><a href="https://echarts.apache.org/zh/option.html">配置项手册</a></li><li><a href="https://echarts.apache.org/zh/changelog.html">版本记录</a></li><li><a href="https://echarts.apache.org/zh/faq.html">常见问题</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html#ECharts%205%20升级指南">v5 升级指南<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">下载<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/download.html">下载</a></li><li><a href="https://echarts.apache.org/zh/download-theme.html">主题下载</a></li><li><a href="https://echarts.apache.org/zh/download-extension.html">扩展下载</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/zh/index.html">示例</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">资源<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/spreadsheet.html">表格工具</a></li><li><a href="https://echarts.apache.org/zh/theme-builder.html">主题构建工具</a></li><li><a href="https://echarts.apache.org/zh/cheat-sheet.html">术语速查手册</a></li><li><a href="https://echarts.apache.org/zh/resources.html">更多资源</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">社区<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/events.html">活动</a></li><li><a href="https://echarts.apache.org/zh/committers.html">贡献者列表</a></li><li><a href="https://echarts.apache.org/zh/maillist.html">邮件列表</a></li><li><a href="https://echarts.apache.org/zh/contributing.html">如何贡献</a></li><li><a href="https://echarts.apache.org/zh/dependencies.html">依赖项</a></li><li><a href="https://echarts.apache.org/zh/coding-standard.html">代码规范</a></li><li><a href="https://github.com/apache/echarts" target="_blank">源码(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/zh/security.html">安全</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">版权<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">活动<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">捐赠<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">鸣谢<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('en')">EN</a></li></ul></div></div></nav><div id="page-index" class="page-main"><div id="main-content"><section id="home-section"><div class="home-brand-panel description container"><div class="home-info"><div class="home-brand">Apache ECharts</div><div class="home-subtitle">一个基于 JavaScript 的开源可视化图表库</div><div class="home-btn-panel"><a href="https://echarts.apache.org/tutorial.html#5%20分钟上手%20ECharts" class="btn btn-main btn-index-home"><svg width="22px" height="19px" viewBox="0 0 17 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="index-home-svg"><path fill="#fff" d="M10.9,16.2 C10.9,16.8 10.5,17.2 9.9,17.2 L5.3,17.2 C4.7,17.2 4.3,16.8 4.3,16.2 C4.3,15.6 4.7,15.2 5.3,15.2 L9.9,15.2 C10.5,15.2 10.9,15.7 10.9,16.2 Z M13.6,7.5 L5.3,7.5 C4.7,7.5 4.3,7.9 4.3,8.5 C4.3,9.1 4.7,9.5 5.3,9.5 L13.6,9.5 C14.2,9.5 14.6,9.1 14.6,8.5 C14.6,7.9 14.2,7.5 13.6,7.5 Z M17.9,6 L17.9,19 C17.9,20.7 16.6,22 14.9,22 L3.9,22 C2.2,22 0.9,20.7 0.9,19 L0.9,7.5 L0.9,6 L0.9,5 L0.9,4 L0.9,2 C0.9,0.9 1.8,0 2.9,0 L12.9,0 C14,0 14.9,0.9 14.9,2 L14.9,3 C16.6,3 17.9,4.3 17.9,6 Z M2.9,3 L3.9,3 L12.9,3 L12.9,2 L2.9,2 L2.9,3 Z M15.9,6 C15.9,5.4 15.5,5 14.9,5 L3.9,5 C3.3,5 2.9,5.4 2.9,6 L2.9,19 C2.9,19.6 3.3,20 3.9,20 L14.9,20 C15.5,20 15.9,19.6 15.9,19 L15.9,6 Z M13.6,11.5 L5.3,11.5 C4.7,11.5 4.3,11.9 4.3,12.5 C4.3,13.1 4.7,13.5 5.3,13.5 L13.6,13.5 C14.2,13.5 14.6,13.1 14.6,12.5 C14.6,11.9 14.2,11.5 13.6,11.5 Z"></path></svg><span>快速入门</span></a><a href="https://echarts.apache.org/examples/zh/index.html" class="btn btn-main btn-index-home"><svg width="25px" height="19px" viewBox="0 0 17 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="index-home-svg"><path fill="#F72C5B" d="M21,0 L6,0 C4.9,0 4,0.9 4,2 L4,4 L2,4 C0.9,4 0,4.9 0,6 L0,18 C0,19.1 0.9,20 2,20 L17,20 C18.1,20 19,19.1 19,18 L19,16 L21,16 C22.1,16 23,15.1 23,14 L23,2 C23,0.9 22.1,0 21,0 Z M17,18 L2,18 L2,6 L17,6 L17,18 Z M21,14 L19,14 L19,6 C19,4.9 18.1,4 17,4 L6,4 L6,2 L21,2 L21,14 Z M4,15 L4,12 C4,11.4 4.4,11 5,11 C5.6,11 6,11.4 6,12 L6,15 C6,15.6 5.6,16 5,16 C4.4,16 4,15.6 4,15 Z M13,15 L13,12 C13,11.4 13.4,11 14,11 C14.6,11 15,11.4 15,12 L15,15 C15,15.6 14.6,16 14,16 C13.4,16 13,15.6 13,15 Z M7,15 L7,9 C7,8.4 7.4,8 8,8 C8.6,8 9,8.4 9,9 L9,15 C9,15.6 8.6,16 8,16 C7.4,16 7,15.6 7,15 Z M10,15 L10,11 C10,10.4 10.4,10 11,10 C11.6,10 12,10.4 12,11 L12,15 C12,15.6 11.6,16 11,16 C10.4,16 10,15.6 10,15 Z"></path></svg><span>所有示例</span></a><a href="https://github.com/apache/echarts" target="_blank" class="btn btn-main btn-index-home btn-index-github"><svg width="22px" height="22px" viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-262.000000, -2480.000000)" fill="#081642"><g transform="translate(252.000000, 2470.000000)"><path d="M29.9006449,27.904446 C28.5016932,29.8668872 26.6944882,31.2248797 24.4790301,31.9784237 C24.2211218,32.0272886 24.0325745,31.9931534 23.9133882,31.876018 C23.7942019,31.7588827 23.7346171,31.6119968 23.7346338,31.4353603 L23.7346338,28.3376019 C23.7346338,27.3880159 23.4865017,26.6930482 22.9902375,26.2526987 C23.5347812,26.1938141 24.024319,26.1058042 24.458851,25.9886688 C24.893383,25.8715335 25.3422785,25.680801 25.8055376,25.4164714 C26.2687966,25.1521418 26.6556591,24.8267354 26.9661251,24.4402521 C27.276591,24.0537688 27.5296112,23.5398222 27.7251857,22.8984123 C27.9207602,22.2570024 28.0185475,21.5203805 28.0185475,20.6885464 C28.0185475,19.504056 27.6414612,18.4959023 26.8872886,17.6640854 C27.240536,16.7733669 27.2023419,15.7752328 26.7727063,14.6696833 C26.5050218,14.5813565 26.1181593,14.6352226 25.6121189,14.8312818 C25.1060784,15.0273409 24.6669591,15.2428141 24.2947609,15.4777015 L23.7502256,15.8300324 C22.8622108,15.5757225 21.9454689,15.4485675 21,15.4485675 C20.0545311,15.4485675 19.1377892,15.5757225 18.2497744,15.8300324 C18.0969813,15.7223001 17.8940788,15.5901353 17.641067,15.433538 C17.3880551,15.2769408 16.9892689,15.0884007 16.4447085,14.8679176 C15.9001481,14.6474346 15.4894467,14.5813479 15.2126043,14.6696576 C14.7921266,15.7758408 14.7588206,16.7739749 15.1126863,17.6640597 C14.3585137,18.4958938 13.9814275,19.5040475 13.9814275,20.6885208 C13.9814275,21.5203548 14.0792147,22.2544676 14.2747892,22.8908591 C14.4703637,23.5272505 14.720944,24.0411971 15.0265302,24.4326988 C15.3321164,24.8242005 15.7165391,25.1521076 16.1797981,25.41642 C16.6430571,25.6807325 17.0919527,25.871465 17.5264847,25.9886174 C17.9610167,26.1057699 18.4505545,26.1937799 18.9950982,26.2526473 C18.6131238,26.60467 18.3790461,27.1085884 18.292865,27.7644025 C18.0924107,27.8621152 17.8775846,27.935404 17.6483866,27.984269 C17.4191886,28.0331339 17.1469167,28.0575663 16.831571,28.0575663 C16.5162253,28.0575663 16.203612,27.9523346 15.8937309,27.7418712 C15.5838499,27.5314078 15.3189144,27.225424 15.0989244,26.8239198 C14.9174043,26.5107253 14.6857747,26.2564154 14.4040358,26.0609899 C14.1222969,25.8655645 13.8860801,25.7481209 13.6953854,25.708659 L13.4084408,25.6644956 C13.2079866,25.6644956 13.069557,25.6864188 12.9931521,25.7302654 C12.9167472,25.7741119 12.8929083,25.8304873 12.9216353,25.8993914 C12.9503623,25.9682956 12.9934529,26.0368829 13.050907,26.1051533 C13.1083611,26.1734238 13.1703941,26.2319915 13.2370061,26.2808564 L13.336924,26.3541538 C13.5471712,26.4518665 13.7549701,26.6378974 13.9603209,26.9122466 C14.1656716,27.1865958 14.3160164,27.4362043 14.4113555,27.661072 L14.554364,27.9983735 C14.67843,28.3704354 14.8886689,28.6714094 15.1850804,28.9012955 C15.481492,29.1311815 15.8014334,29.2780674 16.1449045,29.3419532 C16.4883756,29.405839 16.8202406,29.4399742 17.1404995,29.4443589 C17.4607584,29.4487435 17.7256939,29.4315218 17.935306,29.3926936 L18.2644137,29.3335008 C18.2644137,29.7055627 18.2668619,30.1412107 18.2717584,30.6404447 C18.2766548,31.1396787 18.279103,31.4040083 18.279103,31.4334334 C18.279103,31.6094533 18.21707,31.7563392 18.093004,31.8740912 C17.9689379,31.9918431 17.7779507,32.0259784 17.5200424,31.9764969 C15.3045843,31.22297 13.4973793,29.8649774 12.0984276,27.9025191 C10.6994759,25.9400608 10,23.7305118 10,21.2738721 C10,19.2281225 10.4916769,17.3417791 11.4750308,15.6148418 C12.4583846,13.8879045 13.7928551,12.5202092 15.4784422,11.5117558 C17.1640293,10.5033024 19.0045486,9.99938397 21,10.0000006 C22.9954514,10.0006172 24.8359707,10.5045356 26.5215578,11.5117558 C28.2071449,12.518976 29.5416154,13.8866713 30.5249692,15.6148418 C31.5083231,17.3430123 32,19.2293557 32,21.2738721 C31.9990725,23.7324558 31.2995966,25.9420048 29.9006449,27.904446 Z"></path></g></g></g></svg></a></div></div><div class="home-chart"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/index-home-pie.png?_v_=20200710_1"></div></div></section><section id="events-section"><div class="container"><a href="./events/2021-07-05-apachecon.html" class="event"><picture><source data-srcset="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20210705-apachecon.webp?_v_=20200710_1" type="image/webp" class="lazy"><source data-srcset="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20210705-apachecon.jpeg?_v_=20200710_1" type="image/jpeg" class="lazy"><img data-src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/event/20210705-apachecon.jpeg?_v_=20200710_1" alt="ApacheCon Asia 2021" class="lazy"></picture></a></div></section><section id="feature-section"><div class="container"><div class="index-features"><h2 class="reveal">特性</h2><hr class="reveal"><a href="https://echarts.apache.org/feature.html" class="more reveal">查看完整特性</a></div><div class="row"><div class="col-md-6"><div id="index-feature-1" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-1" class="index-feature-icon-bg"></div><div id="icon-1" class="index-feature-icon"></div></div><div class="index-feature-right reveal"><h3 class="reveal">丰富的图表类型</h3><p class="reveal-later">提供开箱即用的 20 多种图表和十几种组件,并且支持各种图表以及组件的任意组合。</p></div></div></div><div class="col-md-6"><div id="index-feature-2" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-2" class="index-feature-icon-bg"></div><div id="icon-2" class="index-feature-icon"></div></div><div class="index-feature-right"><h3 class="reveal">强劲的渲染引擎</h3><p class="reveal-later">Canvas、SVG 双引擎一键切换,增量渲染、流加载等技术实现千万级数据的流畅交互。</p></div></div></div><div class="col-md-6"><div id="index-feature-3" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-3" class="index-feature-icon-bg"></div><div id="icon-3" class="index-feature-icon"></div></div><div class="index-feature-right"><h3 class="reveal">专业的数据分析</h3><p class="reveal-later">通过数据集管理数据,支持数据过滤、聚类、回归,帮助实现同一份数据的多维度分析。</p></div></div></div><div class="col-md-6"><div id="index-feature-4" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-4" class="index-feature-icon-bg"></div><div id="icon-4" class="index-feature-icon"></div></div><div class="index-feature-right"><h3 class="reveal">优雅的可视化设计</h3><p class="reveal-later">默认设计遵从可视化原则,支持响应式设计,并且提供了灵活的配置项方便开发者定制。</p></div></div></div><div class="col-md-6"><div id="index-feature-5" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-5" class="index-feature-icon-bg"></div><div id="icon-5" class="index-feature-icon"></div></div><div class="index-feature-right"><h3 class="reveal">健康的开源社区</h3><p class="reveal-later">活跃的社区用户保证了项目的健康发展,也贡献了丰富的第三方插件满足不同场景的需求。</p></div></div></div><div class="col-md-6"><div id="index-feature-6" class="index-feature"><div class="index-feature-left reveal"><div id="bg-icon-6" class="index-feature-icon-bg"></div><div id="icon-6" class="index-feature-icon"></div></div><div class="index-feature-right"><h3 class="reveal">友好的无障碍访问</h3><p class="reveal-later">智能生成的图表描述和贴花图案,帮助视力障碍人士了解图表内容,读懂图表背后的故事。</p></div></div></div></div></div></section><section id="publication"><div class="container"><div id="start-line"></div><div class="paper"><div class="content"><h2 class="reveal-latest">ECharts: A Declarative Framework for Rapid Construction of Web-based Visualization</h2><p class="note reveal-latest">如果您在科研项目、产品、学术论文、技术报告、新闻报告、教育、专利以及其他相关活动中使用了 Apache ECharts,欢迎引用本论文。</p><div class="single-btn-panel reveal-latest"><a href="http://www.cad.zju.edu.cn/home/vagblog/VAG_Work/echarts.pdf" class="pdf reveal-later">Visual Informatics, 2018 [PDF]</a></div></div><div class="icon"><div id="paper-icon"></div></div></div><div id="end-line"></div></div></section><section id="about-section" class="normal reveal-about"><div class="container"><h3>关注我们</h3><hr><p>关注我们以及时获得更多最新动态</p><div class="btn-panel row"><div class="col-lg-3 col-sm-6"><a id="btn-github" href="https://github.com/apache/echarts"><div class="btn-content"><div class="btn-logo"><svg width="22px" height="22px" viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-262.000000, -2480.000000)" fill="#081642"><g transform="translate(252.000000, 2470.000000)"><path d="M29.9006449,27.904446 C28.5016932,29.8668872 26.6944882,31.2248797 24.4790301,31.9784237 C24.2211218,32.0272886 24.0325745,31.9931534 23.9133882,31.876018 C23.7942019,31.7588827 23.7346171,31.6119968 23.7346338,31.4353603 L23.7346338,28.3376019 C23.7346338,27.3880159 23.4865017,26.6930482 22.9902375,26.2526987 C23.5347812,26.1938141 24.024319,26.1058042 24.458851,25.9886688 C24.893383,25.8715335 25.3422785,25.680801 25.8055376,25.4164714 C26.2687966,25.1521418 26.6556591,24.8267354 26.9661251,24.4402521 C27.276591,24.0537688 27.5296112,23.5398222 27.7251857,22.8984123 C27.9207602,22.2570024 28.0185475,21.5203805 28.0185475,20.6885464 C28.0185475,19.504056 27.6414612,18.4959023 26.8872886,17.6640854 C27.240536,16.7733669 27.2023419,15.7752328 26.7727063,14.6696833 C26.5050218,14.5813565 26.1181593,14.6352226 25.6121189,14.8312818 C25.1060784,15.0273409 24.6669591,15.2428141 24.2947609,15.4777015 L23.7502256,15.8300324 C22.8622108,15.5757225 21.9454689,15.4485675 21,15.4485675 C20.0545311,15.4485675 19.1377892,15.5757225 18.2497744,15.8300324 C18.0969813,15.7223001 17.8940788,15.5901353 17.641067,15.433538 C17.3880551,15.2769408 16.9892689,15.0884007 16.4447085,14.8679176 C15.9001481,14.6474346 15.4894467,14.5813479 15.2126043,14.6696576 C14.7921266,15.7758408 14.7588206,16.7739749 15.1126863,17.6640597 C14.3585137,18.4958938 13.9814275,19.5040475 13.9814275,20.6885208 C13.9814275,21.5203548 14.0792147,22.2544676 14.2747892,22.8908591 C14.4703637,23.5272505 14.720944,24.0411971 15.0265302,24.4326988 C15.3321164,24.8242005 15.7165391,25.1521076 16.1797981,25.41642 C16.6430571,25.6807325 17.0919527,25.871465 17.5264847,25.9886174 C17.9610167,26.1057699 18.4505545,26.1937799 18.9950982,26.2526473 C18.6131238,26.60467 18.3790461,27.1085884 18.292865,27.7644025 C18.0924107,27.8621152 17.8775846,27.935404 17.6483866,27.984269 C17.4191886,28.0331339 17.1469167,28.0575663 16.831571,28.0575663 C16.5162253,28.0575663 16.203612,27.9523346 15.8937309,27.7418712 C15.5838499,27.5314078 15.3189144,27.225424 15.0989244,26.8239198 C14.9174043,26.5107253 14.6857747,26.2564154 14.4040358,26.0609899 C14.1222969,25.8655645 13.8860801,25.7481209 13.6953854,25.708659 L13.4084408,25.6644956 C13.2079866,25.6644956 13.069557,25.6864188 12.9931521,25.7302654 C12.9167472,25.7741119 12.8929083,25.8304873 12.9216353,25.8993914 C12.9503623,25.9682956 12.9934529,26.0368829 13.050907,26.1051533 C13.1083611,26.1734238 13.1703941,26.2319915 13.2370061,26.2808564 L13.336924,26.3541538 C13.5471712,26.4518665 13.7549701,26.6378974 13.9603209,26.9122466 C14.1656716,27.1865958 14.3160164,27.4362043 14.4113555,27.661072 L14.554364,27.9983735 C14.67843,28.3704354 14.8886689,28.6714094 15.1850804,28.9012955 C15.481492,29.1311815 15.8014334,29.2780674 16.1449045,29.3419532 C16.4883756,29.405839 16.8202406,29.4399742 17.1404995,29.4443589 C17.4607584,29.4487435 17.7256939,29.4315218 17.935306,29.3926936 L18.2644137,29.3335008 C18.2644137,29.7055627 18.2668619,30.1412107 18.2717584,30.6404447 C18.2766548,31.1396787 18.279103,31.4040083 18.279103,31.4334334 C18.279103,31.6094533 18.21707,31.7563392 18.093004,31.8740912 C17.9689379,31.9918431 17.7779507,32.0259784 17.5200424,31.9764969 C15.3045843,31.22297 13.4973793,29.8649774 12.0984276,27.9025191 C10.6994759,25.9400608 10,23.7305118 10,21.2738721 C10,19.2281225 10.4916769,17.3417791 11.4750308,15.6148418 C12.4583846,13.8879045 13.7928551,12.5202092 15.4784422,11.5117558 C17.1640293,10.5033024 19.0045486,9.99938397 21,10.0000006 C22.9954514,10.0006172 24.8359707,10.5045356 26.5215578,11.5117558 C28.2071449,12.518976 29.5416154,13.8866713 30.5249692,15.6148418 C31.5083231,17.3430123 32,19.2293557 32,21.2738721 C31.9990725,23.7324558 31.2995966,25.9420048 29.9006449,27.904446 Z"></path></g></g></g></svg><span>GitHub</span></div><div class="icon-v-right"></div></div></a></div><div class="col-lg-3 col-sm-6"><a id="btn-weixin"><div class="btn-content zh"><div class="btn-logo"><svg width="25px" height="21px" viewBox="0 0 25 21" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-512.000000, -2480.000000)" fill="rgba(93, 201, 116)"><g transform="translate(512.000000, 2480.000000)"><path d="M17.6290595,6.47976119 C17.7534123,6.47976119 17.8770026,6.48260946 18,6.4873469 C17.2166965,2.79549199 13.5198007,0 9.07678865,0 C4.06379837,0 0,3.55853831 0,7.94816178 C0,10.5128275 1.38756065,12.7933344 3.54074891,14.2466508 L2.63388325,17 L5.63681512,15.3050455 C6.69779456,15.6858421 7.85912588,15.8963236 9.07676039,15.8963236 C9.31148885,15.8963236 9.54412784,15.8885344 9.77433851,15.8731886 C9.52032463,15.1807388 9.38270085,14.4428328 9.38270085,13.676822 C9.38275733,9.70202902 13.0747399,6.47976119 17.6290595,6.47976119 Z M12.5,4 C13.328411,4 14,4.67155738 14,5.5 C14,6.32841103 13.3284426,7 12.5,7 C11.6715574,7 11,6.32844262 11,5.5 C11.0000316,4.67155738 11.671589,4 12.5,4 Z M5.5,7 C4.67158897,7 4,6.32844262 4,5.5 C4,4.67158897 4.67155738,4 5.5,4 C6.32844262,4 7,4.67155738 7,5.5 C7,6.32841103 6.32844262,7 5.5,7 Z"></path><path d="M25,13.4664775 C25,9.89513318 21.6421433,7 17.4999862,7 C13.3578291,7 10,9.89513318 10,13.4664775 C10,17.0378217 13.3578567,19.9329549 17.5000138,19.9329549 C18.36973,19.9329549 19.2046277,19.804878 19.9813841,19.5701641 L22.5457108,21 L21.8004292,18.7646117 C23.7349834,17.5951163 25,15.6582837 25,13.4664775 Z M15,12 C14.447707,12 14,11.552293 14,11 C14,10.447707 14.447707,10 15,10 C15.552293,10 16,10.447707 16,11 C16,11.552293 15.552293,12 15,12 Z M20,12 C19.447707,12 19,11.552293 19,11 C19,10.447707 19.447707,10 20,10 C20.552293,10 21,10.447707 21,11 C21,11.552293 20.5522667,12 20,12 Z"></path></g></g></g></svg><span>公众号</span></div><div class="weixin-code"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/ercode.jpg?_v_=20200710_1"></div></div></a></div><div class="col-lg-3 col-sm-6"><a id="btn-weibo" href="https://weibo.com/echarts"><div class="btn-content"><div class="btn-logo"><svg width="25px" height="20px" viewBox="0 0 25 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-774.000000, -2480.000000)" fill="rgba(174, 44, 53)"><g transform="translate(767.000000, 2470.000000)"><g transform="translate(7.000000, 10.000000)"><path d="M9.56107255,18.530208 C5.55942203,18.7083394 2.28534432,16.6598289 2.28534432,13.9878588 C2.28534432,11.3158886 5.55942203,9.08924686 9.56107255,8.91111551 C13.5627231,8.73298415 16.8368008,10.4252319 16.8368008,13.0972021 C16.8368008,15.7691722 13.5627231,18.3520767 9.56107255,18.530208 Z M18.1100532,9.71270657 C17.1096406,9.53457522 17.6553202,9.0001812 17.6553202,9.0001812 C17.6553202,9.0001812 18.5647862,7.48606478 17.473427,6.32821106 C16.1092279,4.90316031 12.7442036,6.50634241 12.7442036,6.50634241 C11.4709512,6.95167077 11.8347376,6.32821106 12.0166308,5.34848869 C12.0166308,4.19063497 11.6528444,2.14212451 8.19687348,3.3890439 C4.74090259,4.54689763 1.83061129,8.7329842 1.83061129,8.7329842 C-0.26116057,11.49402 0.0116792299,13.6315961 0.0116792299,13.6315961 C0.557358851,18.3520767 5.4684754,19.5989961 9.37917931,19.9552588 C13.4717764,20.3115215 18.9285726,18.5302081 20.5656115,14.9675812 C22.1117037,11.3158886 19.1104658,9.89083792 18.1100532,9.71270657 Z"></path><path d="M12.8641827,12.2517204 C12.2123929,10.4024172 10.0707976,9.57023078 7.92920237,10.2174869 C5.78760713,10.9572081 4.57714023,12.9914416 5.13581726,14.7482796 C5.78760713,16.5975828 7.92920237,17.4297692 10.0707976,16.7825131 C12.2123929,16.135257 13.4228598,14.1010235 12.8641827,12.2517204 Z M8.11542806,15.4880009 C7.37052537,15.6729312 6.53250982,15.3955358 6.34628415,14.7482797 C6.16005847,14.1010235 6.62562266,13.4537674 7.46363821,13.176372 C8.2085409,12.9914416 9.04655645,13.2688371 9.23278212,13.9160932 C9.32589493,14.5633493 8.86033075,15.3030706 8.11542806,15.4880009 Z M10.3501361,13.176372 C10.2570233,13.4537674 9.88457196,13.6386977 9.60523346,13.5462326 C9.32589496,13.4537674 9.23278212,13.0839068 9.32589496,12.8065113 C9.4190078,12.5291159 9.79145914,12.3441855 10.0707976,12.4366507 C10.3501361,12.621581 10.5363618,12.8989765 10.3501361,13.176372 Z"></path><path d="M24.5953609,9.4285714 C24.5953609,9.3333333 24.6913146,9.2380952 24.6913146,9.14285713 C25.2670362,7.5238095 24.9791754,5.9047619 24.3075001,4.38095238 C23.0601032,1.7142857 20.3734021,0 17.4947939,0 C16.9190722,0 16.3433505,0.0952380996 15.8635825,0.190476199 L15.8635825,0.190476199 L15.8635825,0.190476199 C15.8635825,0.190476199 15.7676289,0.190476199 15.6716753,0.285714299 L15.6716753,0.285714299 C15.2878608,0.476190498 15,0.857142874 15,1.33333335 C15,2.00000002 15.479768,2.4761905 16.1514433,2.4761905 C16.2473969,2.4761905 16.3433505,2.4761905 16.5352577,2.3809524 L16.5352577,2.3809524 C16.8231186,2.1904762 17.3988402,2.09523812 17.4947938,2.09523812 L17.5907475,2.09523812 C19.6057732,2.09523812 21.5248454,3.23809527 22.3884279,5.23809525 C22.8681959,6.2857143 22.9641496,7.42857143 22.6762887,8.57142857 C22.6762887,8.66666667 22.5803351,8.85714285 22.5803351,8.95238095 C22.5803351,9.52380952 23.0601031,10 23.6358248,10 L23.827732,10 L23.827732,10 L23.9236856,10 C24.2115465,9.9047619 24.4034537,9.8095238 24.5953609,9.61904762 C24.4994073,9.5238095 24.4994073,9.5238095 24.5953609,9.4285714 C24.5953609,9.5238095 24.5953609,9.4285714 24.5953609,9.4285714 Z"></path><path d="M17.6310803,4 C17.3252528,4 16.9174827,4.08510639 16.6116551,4.08510639 C16.3058276,4.17021275 16,4.42553192 16,4.76595745 C16,5.10638297 16.3058275,5.36170214 16.7135976,5.36170214 C16.8155402,5.36170214 16.9174827,5.36170214 17.0194252,5.27659575 C17.2233102,5.27659575 17.3252527,5.19148936 17.5291378,5.19148936 C18.548563,5.19148936 19.4660456,5.87234042 19.4660456,6.72340425 C19.4660456,6.89361703 19.4660456,6.97872339 19.3641031,7.14893617 L19.3641031,7.40425531 L19.3641031,7.40425531 L19.3641031,7.40425531 L19.3641031,7.40425531 L19.3641031,7.40425531 L19.3641031,7.4893617 L19.3641031,7.4893617 C19.4660456,7.82978723 19.7718732,8 20.0777008,8 C20.3835283,8 20.5874133,7.82978723 20.7912984,7.65957447 L20.7912984,7.65957447 C20.8932409,7.40425533 20.9951834,7.06382978 20.9951834,6.72340425 C21.0971259,5.27659575 19.5679882,4 17.6310803,4 Z"></path></g></g></g></g></svg><span>微博</span></div><div class="icon-v-right"></div></div></a></div><div class="col-lg-3 col-sm-6"><a id="btn-twitter" href="https://twitter.com/ApacheECharts"><div class="btn-content"><div class="btn-logo"><svg width="22px" height="19px" viewBox="0 0 22 19" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-1029.000000, -2481.000000)" fill="rgba(0, 172, 237)" fill-rule="nonzero"><g transform="translate(1019.000000, 2470.000000)"><path d="M31.9965682,13.2536272 C31.3736136,14.2239084 30.6196136,15.0506018 29.7346591,15.7332964 C29.7441818,15.8714453 29.7489318,16.0792366 29.7489318,16.3566705 C29.7489318,17.6436908 29.5720682,18.9275445 29.2183409,20.2082316 C28.8645909,21.4890636 28.3274091,22.7184796 27.6069091,23.8965522 C26.8862955,25.0746247 26.0280455,26.1166031 25.0323864,27.0222697 C24.0366364,27.9281298 22.8360682,28.6508066 21.4306364,29.1904211 C20.0251818,29.7300356 18.5226591,30 16.9230227,30 C14.4015909,30 12.0938636,29.2822545 10,27.8470776 C10.3251136,27.8862863 10.6878182,27.9059148 11.0880909,27.9059148 C13.1819545,27.9059148 15.0477727,27.2230992 16.6854545,25.8575407 C15.7087727,25.8372354 14.8339318,25.5180789 14.0609545,24.8998053 C13.288,24.281701 12.7573636,23.4924033 12.4690909,22.532299 C12.7763409,22.581612 13.0604091,22.606341 13.32125,22.606341 C13.7215227,22.606341 14.1168864,22.5518066 14.5076136,22.4428346 C13.4654545,22.214883 12.6024318,21.6632061 11.9187955,20.7878041 C11.2351591,19.9125471 10.8933409,18.8958295 10.8933409,17.7380623 L10.8933409,17.6790802 C11.5258182,18.0553092 12.2052955,18.2580242 12.9318409,18.287201 C12.3172955,17.851458 11.8288409,17.2826425 11.4667727,16.5808028 C11.1046818,15.8790598 10.923,15.1170776 10.9219318,14.2949288 C10.9219318,13.4233702 11.1267045,12.6170789 11.5365227,11.8760064 C12.6620909,13.3505127 14.0323182,14.5304949 15.6474545,15.4160496 C17.2624545,16.3015076 18.9907727,16.7936705 20.8321364,16.8924898 C20.7582955,16.5162366 20.7213636,16.1501361 20.7213636,15.7941883 C20.7213636,14.4678626 21.1608409,13.3372176 22.0398409,12.4023257 C22.9188409,11.4674338 23.9818864,11 25.2289318,11 C26.5319318,11 27.6300455,11.5048779 28.5233636,12.5144402 C29.5382045,12.306673 30.4922273,11.9209198 31.3854091,11.3572048 C31.0412273,12.4947875 30.3808409,13.3759186 29.4041364,14.0003804 C30.2700455,13.9015611 31.1353409,13.6539809 32,13.2574224 L31.9965682,13.2536272 Z"></path></g></g></g></svg><span>Twitter</span></div><div class="icon-v-right"></div></div></a></div></div></div></section></div><footer><div class="container"><div class="row"><div class="col-md-9"><p>Copyright © 2017-2021, The Apache Software Foundation Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.</p><div class="icon-panel"><a href="mailto:dev@echarts.apache.org?body=%28Thanks%20for%20using%20ECharts.%20Email%20us%20if%20you%20have%20non-technical%20problems%20using%20ECharts.%20For%20technical%20support%2C%20please%20go%20to%20https%3A//github.com/apache/echarts/issues%20.%29" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-email.png?_v_=20200710_1"></a><a href="https://twitter.com/ApacheECharts" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-twitter.png?_v_=20200710_1"></a><a href="https://weibo.com/echarts" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-weibo.png?_v_=20200710_1"></a><a href="https://github.com/apache/echarts" class="footer-icon"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/icon-github.png?_v_=20200710_1"></a></div></div><div id="footer-icon-panel" class="col-md-3"><a href="https://www.apache.org"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/asf_logo.svg?_v_=20200710_1" class="footer-apache-logo"></a></div></div></div></footer></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/js/common.js?_v_=b5b8944fb9"></script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@12.0.0/dist/lazyload.min.js"></script><script src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/js/index.js?_v_=1625800930981"></script><script>window.lazyLoadOptions = {
     elements_selector: ".lazy"
 };</script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@12.0.0/dist/lazyload.min.js"></script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
 (function() {
diff --git a/zh/option-gl.html b/zh/option-gl.html
index 3ffc285..d3d3098 100644
--- a/zh/option-gl.html
+++ b/zh/option-gl.html
@@ -19,7 +19,7 @@
 };
 if (window.EC_WWW_CDN_PAY_ROOT) {
     window.globalArgsExtra.cdnRoot = window.EC_WWW_CDN_PAY_ROOT + '/zh/' + window.globalArgsExtra.baseUrl
-}</script><script type="text/javascript">window.globalArgsExtra.version = 'afc0a98992';
+}</script><script type="text/javascript">window.globalArgsExtra.version = '03f79426a6';
 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/zh/option.html b/zh/option.html
index 239e906..6e95f00 100644
--- a/zh/option.html
+++ b/zh/option.html
@@ -19,7 +19,7 @@
 };
 if (window.EC_WWW_CDN_PAY_ROOT) {
     window.globalArgsExtra.cdnRoot = window.EC_WWW_CDN_PAY_ROOT + '/zh/' + window.globalArgsExtra.baseUrl
-}</script><script type="text/javascript">window.globalArgsExtra.version = 'afc0a98992';
+}</script><script type="text/javascript">window.globalArgsExtra.version = '03f79426a6';
 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/zh/spreadsheet.html b/zh/spreadsheet.html
index bdc886b..2ae2554 100644
--- a/zh/spreadsheet.html
+++ b/zh/spreadsheet.html
@@ -6,13 +6,13 @@
         + '@font-face {font-family:"noto-light";src:local("Microsoft Yahei");}';
     document.head.insertBefore(el, document.getElementById('font-hack'));
 }
-</script><title>Spreadsheet Tool - Apache ECharts</title><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/vendors/handsontable/0.26.1/dist/handsontable.full.min.css?_v_=20200710_1"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/css/spreadsheet.css?_v_=1624430965835"><script src="vendors/esl.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://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/forie.png?_v_=20200710_1" alt="ie tip"></div></body><![endif]-->
+</script><title>Spreadsheet Tool - Apache ECharts</title><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/vendors/handsontable/0.26.1/dist/handsontable.full.min.css?_v_=20200710_1"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/css/spreadsheet.css?_v_=1625800930981"><script src="vendors/esl.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://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/forie.png?_v_=20200710_1" 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 的官网 &nbsp;</p><a id="a1" href="https://echarts.apache.org/zh/index.html">https://echarts.apache.org</a></div><a href="https://echarts.apache.org" target="_blank" onclick="logApache()" class="btn btn-main"><div>访问官网</div></a><a href="javascript:;" onclick="closeApacheBanner(true)" class="close-btn">x</a></div><div id="main"><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/zh/index.html" class="navbar-brand"><img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/logo.png?_v_=20200710_1" alt="echarts logo" class="navbar-logo"></a></div><div id="navbar-collapse" class="collapse navbar-collapse"><ul class="nav navbar-nav navbar-left"><li id="nav-index"><a href="https://echarts.apache.org/zh/index.html">首页</a></li><li id="nav-doc" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">文档<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/feature.html">特性</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html">教程</a></li><li><a href="https://echarts.apache.org/zh/api.html">API</a></li><li><a href="https://echarts.apache.org/zh/option.html">配置项手册</a></li><li><a href="https://echarts.apache.org/zh/changelog.html">版本记录</a></li><li><a href="https://echarts.apache.org/zh/faq.html">常见问题</a></li><li><a href="https://echarts.apache.org/zh/tutorial.html#ECharts%205%20升级指南">v5 升级指南<span class="new">new</span></a></li></ul></li><li id="nav-download" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">下载<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/download.html">下载</a></li><li><a href="https://echarts.apache.org/zh/download-theme.html">主题下载</a></li><li><a href="https://echarts.apache.org/zh/download-extension.html">扩展下载</a></li></ul></li><li id="nav-examples"><a href="https://echarts.apache.org/examples/zh/index.html">示例</a></li><li id="nav-resources"><a href="#" data-toggle="dropdown" class="dropdown-toggle">资源<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/spreadsheet.html">表格工具</a></li><li><a href="https://echarts.apache.org/zh/theme-builder.html">主题构建工具</a></li><li><a href="https://echarts.apache.org/zh/cheat-sheet.html">术语速查手册</a></li><li><a href="https://echarts.apache.org/zh/resources.html">更多资源</a></li></ul></li><li id="nav-contribute"><a href="#" data-toggle="dropdown" class="dropdown-toggle">社区<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://echarts.apache.org/zh/events.html">活动</a></li><li><a href="https://echarts.apache.org/zh/committers.html">贡献者列表</a></li><li><a href="https://echarts.apache.org/zh/maillist.html">邮件列表</a></li><li><a href="https://echarts.apache.org/zh/contributing.html">如何贡献</a></li><li><a href="https://echarts.apache.org/zh/dependencies.html">依赖项</a></li><li><a href="https://echarts.apache.org/zh/coding-standard.html">代码规范</a></li><li><a href="https://github.com/apache/echarts" target="_blank">源码(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://github.com/apache/echarts/issues" target="_blank">Issues(GitHub)<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li id="nav-others"><a href="#" data-toggle="dropdown" class="dropdown-toggle">ASF<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://www.apache.org/" target="_blank">Apache Software Foundation<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://echarts.apache.org/zh/security.html">安全</a></li><li><a href="https://www.apache.org/licenses/" target="_blank">版权<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank">活动<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">捐赠<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank">鸣谢<svg width="15px" height="15px" viewbox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon-external-link"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul><ul class="nav navbar-nav navbar-right"><li id="nav-homeen"><a href="javascript:;" onclick="changeLang('en')">EN</a></li></ul></div></div></nav><div class="ecdoc-sprsht"></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/js/common.js?_v_=b5b8944fb9"></script><script type="text/javascript">document.getElementById('nav-resources').className = 'active';
 
 var vendorPath = '../vendors';
 
 define('globalArgs', extend({
-    version: '1624430965835',
+    version: '1625800930981',
     basePath: './'
 }, window.globalArgsExtra || {}));
 
@@ -31,7 +31,7 @@
         numeral: vendorPath + '/numeral/1.4.7/numeral.min',
         immutable: vendorPath + '/immutable/3.7.4/dist/immutable'
     },
-    urlArgs: '_v_=1624430965835'
+    urlArgs: '_v_=1625800930981'
 });
 
 require(['spreadsheet/spreadsheet'], function (spreadsheet) {
diff --git a/zh/tutorial.html b/zh/tutorial.html
index aae618c..dee151a 100644
--- a/zh/tutorial.html
+++ b/zh/tutorial.html
@@ -19,7 +19,7 @@
 };
 if (window.EC_WWW_CDN_PAY_ROOT) {
     window.globalArgsExtra.cdnRoot = window.EC_WWW_CDN_PAY_ROOT + '/zh/' + window.globalArgsExtra.baseUrl
-}</script><script type="text/javascript">window.globalArgsExtra.version = 'afc0a98992';
+}</script><script type="text/javascript">window.globalArgsExtra.version = '03f79426a6';
 echartsDoc.init('#ec-doc-main', window.globalArgsExtra);</script><!-- Baidu Tongji--><script type="text/javascript">var _hmt = _hmt || [];
 (function() {
 var hm = document.createElement("script");