You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by wa...@apache.org on 2020/11/05 04:40:24 UTC

[incubator-echarts-examples] branch next updated: improve some sunburst chart examples

This is an automated email from the ASF dual-hosted git repository.

wangdd pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/incubator-echarts-examples.git


The following commit(s) were added to refs/heads/next by this push:
     new e81286a  improve some sunburst chart examples
e81286a is described below

commit e81286aeaef8c0e4e6eb8228a336743dbc4dd11d
Author: Wdingding <wa...@gmail.com>
AuthorDate: Thu Nov 5 12:34:47 2020 +0800

    improve some sunburst chart examples
---
 public/data/sunburst-book.js         | 33 +++++++++++++++++----------------
 public/data/sunburst-drink.js        |  1 +
 public/data/sunburst-label-rotate.js | 16 +++++++---------
 public/data/sunburst-monochrome.js   |  2 +-
 public/data/sunburst-visualMap.js    |  4 ++--
 5 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/public/data/sunburst-book.js b/public/data/sunburst-book.js
index a0c95a7..3d641e5 100644
--- a/public/data/sunburst-book.js
+++ b/public/data/sunburst-book.js
@@ -2,10 +2,11 @@
 title: Book Records
 category: sunburst
 titleCN: 书籍分布
+shotWidth: 820
 difficulty: 6
 */
 
- var colors = ['#FFAE57', '#FF7853', '#EA5151', '#CC3F57', '#9A2555'];
+var colors = ['#FFAE57', '#FF7853', '#EA5151', '#CC3F57', '#9A2555'];
 var bgColor = '#2E2733';
 
 var itemStyle = {
@@ -114,7 +115,7 @@ var data = [{
             }, {
                 name: '进化'
             }, {
-                name: '后物欲时代的来临',
+                name: '后物欲时代的来临'
             }]
         }, {
             name: '3☆',
@@ -137,7 +138,7 @@ var data = [{
                 name: '受伤的人'
             }]
         }, {
-            name: '3☆',
+            name: '3☆'
         }, {
             name: '2☆',
             children: [{
@@ -209,18 +210,18 @@ for (var j = 0; j < data.length; ++j) {
         for (var star = 0; star < block.length; ++star) {
             var style = (function (name) {
                 switch (name) {
-                    case '5☆':
-                        bookScoreId = 0;
-                        return itemStyle.star5;
-                    case '4☆':
-                        bookScoreId = 1;
-                        return itemStyle.star4;
-                    case '3☆':
-                        bookScoreId = 2;
-                        return itemStyle.star3;
-                    case '2☆':
-                        bookScoreId = 3;
-                        return itemStyle.star2;
+                case '5☆':
+                    bookScoreId = 0;
+                    return itemStyle.star5;
+                case '4☆':
+                    bookScoreId = 1;
+                    return itemStyle.star4;
+                case '3☆':
+                    bookScoreId = 2;
+                    return itemStyle.star3;
+                case '2☆':
+                    bookScoreId = 3;
+                    return itemStyle.star2;
                 }
             })(block[star].name);
 
@@ -323,7 +324,7 @@ option = {
             label: {
                 position: 'outside',
                 textShadowBlur: 5,
-                textShadowColor: '#333',
+                textShadowColor: '#333'
             },
             downplay: {
                 label: {
diff --git a/public/data/sunburst-drink.js b/public/data/sunburst-drink.js
index 6b94d56..8c9876e 100644
--- a/public/data/sunburst-drink.js
+++ b/public/data/sunburst-drink.js
@@ -2,6 +2,7 @@
 title: Drink Flavors
 category: sunburst
 titleCN: Drink Flavors
+shotWidth: 1000
 difficulty: 5
 */
 
diff --git a/public/data/sunburst-label-rotate.js b/public/data/sunburst-label-rotate.js
index 653475d..cf1ff0e 100644
--- a/public/data/sunburst-label-rotate.js
+++ b/public/data/sunburst-label-rotate.js
@@ -2,7 +2,7 @@
 title: Sunburst Label Rotate
 category: sunburst
 titleCN: 旭日图标签旋转
-difficulty: 3
+difficulty: 2
 */
 
 option = {
@@ -53,11 +53,9 @@ option = {
             }]
         }],
         label: {
-            color: '#fff',
-            textBorderColor: '#666',
+            color: '#000',
+            textBorderColor: '#fff',
             textBorderWidth: 2,
-            borderColor: '#999',
-            borderWidth: 1,
             formatter: function (param) {
                 var depth = param.treePathInfo.length;
                 if (depth === 2) {
@@ -73,25 +71,25 @@ option = {
         },
         levels: [{}, {
             itemStyle: {
-                color: 'red'
+                color: '#CD4949'
             },
             label: {
                 rotate: 'radial'
             }
         }, {
             itemStyle: {
-                color: 'orange'
+                color: '#F47251'
             },
             label: {
                 rotate: 'tangential'
             }
         }, {
             itemStyle: {
-                color: 'yellow'
+                color: '#FFC75F'
             },
             label: {
                 rotate: 0
             }
         }]
     }]
-};
+};
\ No newline at end of file
diff --git a/public/data/sunburst-monochrome.js b/public/data/sunburst-monochrome.js
index 24708a8..e1fe90d 100644
--- a/public/data/sunburst-monochrome.js
+++ b/public/data/sunburst-monochrome.js
@@ -2,7 +2,7 @@
 title: Monochrome Sunburst
 category: sunburst
 titleCN: Monochrome Sunburst
-difficulty: 2
+difficulty: 3
 */
 
 var item1 = {
diff --git a/public/data/sunburst-visualMap.js b/public/data/sunburst-visualMap.js
index 223e9a4..304cda2 100644
--- a/public/data/sunburst-visualMap.js
+++ b/public/data/sunburst-visualMap.js
@@ -80,7 +80,7 @@ option = {
         min: 0,
         max: 10,
         inRange: {
-            color: ['#2D5F73', '#538EA6', '#F2D1B3', '#F2B8A2', '#F28C8C']
+            color: ['#2F93C8', '#AEC48F', '#FFDB5C', '#F98862']
         }
     },
     series: {
@@ -91,4 +91,4 @@ option = {
             rotate: 'radial'
         }
     }
-};
+};
\ 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