From 92cbb80ecdc439f5f4ca1785af2f73a54df0dc07 Mon Sep 17 00:00:00 2001 From: kener Date: Sun, 4 May 2014 18:28:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/example/map1.html | 1 + src/chart/island.js | 3 +-- src/chart/k.js | 3 +-- src/chart/map.js | 2 +- src/chart/pie.js | 6 ++---- src/chart/radar.js | 3 +-- src/chart/scatter.js | 3 +-- src/component/categoryAxis.js | 2 +- src/component/valueAxis.js | 2 +- test/performance/option.js | 1 + 10 files changed, 11 insertions(+), 15 deletions(-) diff --git a/doc/example/map1.html b/doc/example/map1.html index a48a1739e..dfb43bab6 100644 --- a/doc/example/map1.html +++ b/doc/example/map1.html @@ -108,6 +108,7 @@ option = { name: 'iphone3', type: 'map', mapType: 'china', + roam: true, itemStyle:{ normal:{label:{show:true}}, emphasis:{label:{show:true}} diff --git a/src/chart/island.js b/src/chart/island.js index fc22a9ca5..0fc20192c 100644 --- a/src/chart/island.js +++ b/src/chart/island.js @@ -141,8 +141,7 @@ define(function (require) { x: Math.round(this.shapeList[i].style.x * xScale), y: Math.round(this.shapeList[i].style.y * yScale) } - }, - true + } ); } }, diff --git a/src/chart/k.js b/src/chart/k.js index d9e56fa82..fcd53fa1e 100644 --- a/src/chart/k.js +++ b/src/chart/k.js @@ -528,8 +528,7 @@ define(function (require) { y = this.shapeList[i].style.y[0]; this.zr.modShape( this.shapeList[i].id, - { scale : [1, 0, x, y] }, - true + { scale : [1, 0, x, y] } ); this.zr.animate(this.shapeList[i].id, '') .when( diff --git a/src/chart/map.js b/src/chart/map.js index f98821656..b8e277e58 100644 --- a/src/chart/map.js +++ b/src/chart/map.js @@ -1005,7 +1005,7 @@ define(function (require) { clearTimeout(this._refreshDelayTicket); this._refreshDelayTicket = setTimeout( function(){ - self.animationEffect(); + self && self.shapeList && self.animationEffect(); }, 100 ); diff --git a/src/chart/pie.js b/src/chart/pie.js index 69a0538a3..f2db24bf6 100644 --- a/src/chart/pie.js +++ b/src/chart/pie.js @@ -905,8 +905,7 @@ define(function (require) { r0 : 0, r : 0 } - }, - true + } ); serie = ecData.get(this.shapeList[i], 'series'); @@ -939,8 +938,7 @@ define(function (require) { this.shapeList[i].id, { scale : [0, 0, x, y] - }, - true + } ); this.zr.animate(this.shapeList[i].id, '') .when( diff --git a/src/chart/radar.js b/src/chart/radar.js index b4b9741d7..dfbb0a3fb 100644 --- a/src/chart/radar.js +++ b/src/chart/radar.js @@ -448,8 +448,7 @@ this.shapeList[i].id, { scale : [0.1, 0.1, x, y] - }, - true + } ); this.zr.animate(item.id, '') diff --git a/src/chart/scatter.js b/src/chart/scatter.js index a36d53556..4b4bc5b9a 100644 --- a/src/chart/scatter.js +++ b/src/chart/scatter.js @@ -499,8 +499,7 @@ define(function (require) { this.shapeList[i].id, { scale : [0, 0, x, y] - }, - true + } ); this.zr.animate(this.shapeList[i].id, '') .when( diff --git a/src/component/categoryAxis.js b/src/component/categoryAxis.js index bcbcfd80c..ce542f902 100644 --- a/src/component/categoryAxis.js +++ b/src/component/categoryAxis.js @@ -104,7 +104,7 @@ define(function (require) { var label = this._getReformedLabel(i) + ''; var wLen = (label.match(/\w/g) || '').length; var oLen = label.length - wLen; - labelSize = wLen * fontSize / 2 + oLen * fontSize; + labelSize = wLen * fontSize * 2 / 3 + oLen * fontSize; } if (labelSpace < labelSize) { diff --git a/src/component/valueAxis.js b/src/component/valueAxis.js index 6efaab65a..6faadb58a 100644 --- a/src/component/valueAxis.js +++ b/src/component/valueAxis.js @@ -593,7 +593,7 @@ define(function (require) { this._min = this.option.min - 0; // 指定min忽略boundaryGay[0] this._max = this.option.max - 0; // 指定max忽略boundaryGay[1] customerDefine = true; - _customerValue(); + this._customerValue(); } }, diff --git a/test/performance/option.js b/test/performance/option.js index 3fa799790..8add598f1 100644 --- a/test/performance/option.js +++ b/test/performance/option.js @@ -25,6 +25,7 @@ function option(chartType, n) { show : true, feature : { mark : {show: true}, + dataZoom : {show: true}, dataView : {show: true, readOnly: false}, magicType : {show: true, type: ['line', 'bar']}, restore : {show: true}, -- GitLab