You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2019/11/28 16:16:33 UTC
[incubator-echarts] branch pie-visual-color updated: test(legend):
add more test case for legend using visualMap encoded color.
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch pie-visual-color
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
The following commit(s) were added to refs/heads/pie-visual-color by this push:
new ba0602d test(legend): add more test case for legend using visualMap encoded color.
ba0602d is described below
commit ba0602d9824e3a70680a6717a2eef63733e5434b
Author: pissang <bm...@gmail.com>
AuthorDate: Fri Nov 29 00:16:12 2019 +0800
test(legend): add more test case for legend using visualMap encoded color.
---
test/legend-visualMapColor.html | 79 +++++++++++++++++++++++++
test/runTest/actions/__meta__.json | 1 +
test/runTest/actions/legend-visualMapColor.json | 1 +
3 files changed, 81 insertions(+)
diff --git a/test/legend-visualMapColor.html b/test/legend-visualMapColor.html
index 6eebe09..93c2769 100644
--- a/test/legend-visualMapColor.html
+++ b/test/legend-visualMapColor.html
@@ -125,6 +125,85 @@ under the License.
});
</script>
+
+ <script>
+ require(['echarts'/*, 'map/js/china' */], function (echarts) {
+ var data = [
+ {value:335, name:'直接访问'},
+ {value:310, name:'邮件营销'},
+ {value:274, name:'联盟广告'},
+ {value:235, name:'视频广告'},
+ {value:400, name:'搜索引擎'}
+ ].sort(function (a, b) { return a.value - b.value; });
+ var option = {
+ backgroundColor: '#2c343c',
+
+ legend: {
+ data: data.map(function (item) {
+ return item.name
+ }),
+ textStyle: {
+ color: '#fff'
+ }
+ },
+ visualMap: {
+ show: false,
+ min: 80,
+ max: 600,
+ inRange: {
+ colorLightness: [0, 1]
+ }
+ },
+ series : [
+ {
+ name:'访问来源',
+ type:'pie',
+ radius : '55%',
+ center: ['50%', '50%'],
+ data: data,
+ roseType: 'radius',
+ label: {
+ normal: {
+ textStyle: {
+ color: 'rgba(255, 255, 255, 0.3)'
+ }
+ }
+ },
+ labelLine: {
+ normal: {
+ lineStyle: {
+ color: 'rgba(255, 255, 255, 0.3)'
+ },
+ smooth: 0.2,
+ length: 10,
+ length2: 20
+ }
+ },
+ itemStyle: {
+ normal: {
+ color: '#c23531',
+ shadowBlur: 200,
+ shadowColor: 'rgba(0, 0, 0, 0.5)'
+ }
+ },
+
+ animationType: 'scale',
+ animationEasing: 'elasticOut',
+ animationDelay: function (idx) {
+ return Math.random() * 200;
+ }
+ }
+ ]
+ };
+
+ var chart = testHelper.create(echarts, 'main1', {
+ title: [
+ 'Legend use color from lightness visualMap.'
+ ],
+ option: option
+ });
+ });
+ </script>
</body>
</html>
diff --git a/test/runTest/actions/__meta__.json b/test/runTest/actions/__meta__.json
index fc1096e..ebfa267 100644
--- a/test/runTest/actions/__meta__.json
+++ b/test/runTest/actions/__meta__.json
@@ -85,6 +85,7 @@
"label-position": 1,
"largeLine-tooltip": 1,
"legend": 6,
+ "legend-visualMapColor": 2,
"line": 1,
"line-animation": 1,
"map": 3,
diff --git a/test/runTest/actions/legend-visualMapColor.json b/test/runTest/actions/legend-visualMapColor.json
new file mode 100644
index 0000000..471656d
--- /dev/null
+++ b/test/runTest/actions/legend-visualMapColor.json
@@ -0,0 +1 @@
+[{"name":"Action 1","ops":[{"type":"mousemove","time":108,"x":248,"y":111},{"type":"mousemove","time":312,"x":288,"y":95},{"type":"mousemove","time":524,"x":323,"y":87},{"type":"mousemove","time":725,"x":325,"y":87},{"type":"mousedown","time":786,"x":325,"y":87},{"type":"mouseup","time":904,"x":325,"y":87},{"time":905,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":1341,"x":325,"y":87},{"type":"mouseup","time":1423,"x":325,"y":87},{"time":1424,"delay":400,"type":"screens [...]
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org