You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by ov...@apache.org on 2018/08/10 04:58:10 UTC

[incubator-echarts] branch master updated (6d43d3a -> 879186a)

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

ovilia pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git.


    from 6d43d3a  Merge branch 'master' of https://github.com/apache/incubator-echarts
     new 56c93b6  feat(radar): support `radius: [r0, r1]` form #8717
     new d77672b  test(radar): add test for radar radius: [r0, r] form #8717
     new 879186a  Merge branch 'master' of github.com:ecomfe/echarts

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/coord/radar/Radar.js | 15 +++++++++++++--
 test/radar.html          |  7 ++++---
 2 files changed, 17 insertions(+), 5 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[incubator-echarts] 03/03: Merge branch 'master' of github.com:ecomfe/echarts

Posted by ov...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 879186ad70dfce94dfc7ad37d63965102c89a9c5
Merge: d77672b 6d43d3a
Author: Ovilia <zw...@gmail.com>
AuthorDate: Fri Aug 10 12:39:31 2018 +0800

    Merge branch 'master' of github.com:ecomfe/echarts

 src/chart/sankey/SankeyView.js | 62 ++++++++++++++++++++++++++----------------
 1 file changed, 38 insertions(+), 24 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[incubator-echarts] 02/03: test(radar): add test for radar radius: [r0, r] form #8717

Posted by ov...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d77672b255defc449ed6c56d91534d2486bff35b
Author: Ovilia <zw...@gmail.com>
AuthorDate: Fri Aug 10 12:39:07 2018 +0800

    test(radar): add test for radar radius: [r0, r] form #8717
---
 test/radar.html | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/test/radar.html b/test/radar.html
index c38e249..6e78c93 100644
--- a/test/radar.html
+++ b/test/radar.html
@@ -52,6 +52,7 @@ under the License.
                         data: ['预算分配(Allocated Budget)', '实际开销(Actual Spending)']
                     },
                     radar: {
+                        radius: [50, '70%'],
                         name: {
                             formatter:'【{value}】',
                             color:'#72ACD1'
@@ -59,7 +60,7 @@ under the License.
                         triggerEvent: true,
                         // shape: 'circle',
                         indicator: [
-                           { text: '销售(sales)', max: 6500},
+                           { text: '销售(sales)', max: 100},
                            { text: '管理(Administration)', max: 16000},
                            { text: '信息技术(Information Techology)', max: 30000},
                            { text: '客服(Customer Support)', max: 38000},
@@ -78,11 +79,11 @@ under the License.
                         // areaStyle: {normal: {}},
                         data : [
                             {
-                                value : [4300, 10000, 28000, 35000, 50000, 19000],
+                                value : [0, 10000, 28000, 35000, 50000, 19000],
                                 name : '预算分配(Allocated Budget)'
                             },
                              {
-                                value : [5000, 14000, 28000, 31000, 42000, 21000],
+                                value : [50, 14000, 28000, 31000, 42000, 21000],
                                 name : '实际开销(Actual Spending)'
                             }
                         ]


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[incubator-echarts] 01/03: feat(radar): support `radius: [r0, r1]` form #8717

Posted by ov...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 56c93b6f366b2fddccc8ee6b302d96bd351cea44
Author: Ovilia <zw...@gmail.com>
AuthorDate: Fri Aug 10 12:37:58 2018 +0800

    feat(radar): support `radius: [r0, r1]` form #8717
---
 src/coord/radar/Radar.js | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/coord/radar/Radar.js b/src/coord/radar/Radar.js
index 44d78b6..be308ca 100644
--- a/src/coord/radar/Radar.js
+++ b/src/coord/radar/Radar.js
@@ -70,6 +70,11 @@ function Radar(radarModel, ecModel, api) {
      * @type {number}
      * @readOnly
      */
+    this.r0;
+    /**
+     * @type {number}
+     * @readOnly
+     */
     this.startAngle;
 }
 
@@ -128,10 +133,16 @@ Radar.prototype.resize = function (radarModel, api) {
 
     this.startAngle = radarModel.get('startAngle') * Math.PI / 180;
 
-    this.r = numberUtil.parsePercent(radarModel.get('radius'), viewSize);
+    // radius may be single value like `20`, `'80%'`, or array like `[10, '80%']`
+    var radius = radarModel.get('radius');
+    if (typeof radius === 'string' || typeof radius === 'number') {
+        radius = [0, radius];
+    }
+    this.r0 = numberUtil.parsePercent(radius[0], viewSize);
+    this.r = numberUtil.parsePercent(radius[1], viewSize);
 
     zrUtil.each(this._indicatorAxes, function (indicatorAxis, idx) {
-        indicatorAxis.setExtent(0, this.r);
+        indicatorAxis.setExtent(this.r0, this.r);
         var angle = (this.startAngle + idx * Math.PI * 2 / this._indicatorAxes.length);
         // Normalize to [-PI, PI]
         angle = Math.atan2(Math.sin(angle), Math.cos(angle));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org