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/10/08 21:19:37 UTC

[incubator-echarts] branch master updated: Add log axis for radar charts (#11324)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new d050565  Add log axis for radar charts (#11324)
d050565 is described below

commit d050565a7ce8fd61dc5628d238ea1d5fb2cc8a3f
Author: zifix <zi...@gmail.com>
AuthorDate: Tue Oct 8 23:19:15 2019 +0200

    Add log axis for radar charts (#11324)
    
    * Add log axis for radar charts
    
    * Implementing comments
    
    * restoring echart.js
---
 CONTRIBUTING.md               | 4 ++--
 src/coord/radar/Radar.js      | 4 +++-
 src/coord/radar/RadarModel.js | 5 ++++-
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 504eef8..c816da6 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -204,13 +204,13 @@ If you are a committer of apache/incubator-echarts project, which means you have
 + About adding the license/header of 3rd-party work:
     + https://www.apache.org/legal/src-headers.html#3party
 + Licenses that are compatible with the Apache license:
-    + BSD and MIT are compatibal with the Apache license but CC_BY_SA is not (https://apache.org/legal/resolved.html#cc-sa).
+    + BSD and MIT are compatible with the Apache license but CC_BY_SA is not (https://apache.org/legal/resolved.html#cc-sa).
 + Stack overflow:
     + before intending to copy code from Stack overlow, we must check:
     + https://apache.org/legal/resolved.html#stackoverflow
     + https://issues.apache.org/jira/browse/LEGAL-471
 + Wikipedia:
-    + Wikipedia is licensed CC 4.0 BY_SA and is compatible with the Apache license. So we should not copy code from Wikipedia.
+    + Wikipedia is licensed CC 4.0 BY_SA and is incompatible with the Apache license. So we should not copy code from Wikipedia.
 + Working in progress disclaimer:
     + In some cases we might use the work in progress disclaimer and document the issues in that until they are fixed.
     + https://incubator.apache.org/policy/incubation.html#disclaimers
diff --git a/src/coord/radar/Radar.js b/src/coord/radar/Radar.js
index 01234b1..b7e57ae 100644
--- a/src/coord/radar/Radar.js
+++ b/src/coord/radar/Radar.js
@@ -28,6 +28,7 @@ import {
     niceScaleExtent
 } from '../axisHelper';
 import CoordinateSystem from '../../CoordinateSystem';
+import LogScale from '../../scale/Log';
 
 function Radar(radarModel, ecModel, api) {
 
@@ -40,7 +41,8 @@ function Radar(radarModel, ecModel, api) {
 
     this._indicatorAxes = zrUtil.map(radarModel.getIndicatorModels(), function (indicatorModel, idx) {
         var dim = 'indicator_' + idx;
-        var indicatorAxis = new IndicatorAxis(dim, new IntervalScale());
+        var indicatorAxis = new IndicatorAxis(dim,
+            (indicatorModel.get('axisType') === 'log') ? new LogScale() : new IntervalScale());
         indicatorAxis.name = indicatorModel.get('name');
         // Inject model and axis
         indicatorAxis.model = indicatorModel;
diff --git a/src/coord/radar/RadarModel.js b/src/coord/radar/RadarModel.js
index 7463eb6..1ee7a4c 100644
--- a/src/coord/radar/RadarModel.js
+++ b/src/coord/radar/RadarModel.js
@@ -41,6 +41,7 @@ var RadarModel = echarts.extendComponentModel({
         var scale = this.get('scale');
         var axisLine = this.get('axisLine');
         var axisTick = this.get('axisTick');
+        var axisType = this.get('axisType');
         var axisLabel = this.get('axisLabel');
         var nameTextStyle = this.get('name');
         var showName = this.get('name.show');
@@ -67,8 +68,9 @@ var RadarModel = echarts.extendComponentModel({
                 scale: scale,
                 axisLine: axisLine,
                 axisTick: axisTick,
+                axisType,
                 axisLabel: axisLabel,
-                // Competitable with 2 and use text
+                // Compatible with 2 and use text
                 name: indicatorOpt.text,
                 nameLocation: 'end',
                 nameGap: nameGap,
@@ -144,6 +146,7 @@ var RadarModel = echarts.extendComponentModel({
         ),
         axisLabel: defaultsShow(valueAxisDefault.axisLabel, false),
         axisTick: defaultsShow(valueAxisDefault.axisTick, false),
+        axisType: 'interval',
         splitLine: defaultsShow(valueAxisDefault.splitLine, true),
         splitArea: defaultsShow(valueAxisDefault.splitArea, true),
 


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