提交 92cbb80e 编写于 作者: K kener

代码优化

上级 546d60c7
...@@ -108,6 +108,7 @@ option = { ...@@ -108,6 +108,7 @@ option = {
name: 'iphone3', name: 'iphone3',
type: 'map', type: 'map',
mapType: 'china', mapType: 'china',
roam: true,
itemStyle:{ itemStyle:{
normal:{label:{show:true}}, normal:{label:{show:true}},
emphasis:{label:{show:true}} emphasis:{label:{show:true}}
......
...@@ -141,8 +141,7 @@ define(function (require) { ...@@ -141,8 +141,7 @@ define(function (require) {
x: Math.round(this.shapeList[i].style.x * xScale), x: Math.round(this.shapeList[i].style.x * xScale),
y: Math.round(this.shapeList[i].style.y * yScale) y: Math.round(this.shapeList[i].style.y * yScale)
} }
}, }
true
); );
} }
}, },
......
...@@ -528,8 +528,7 @@ define(function (require) { ...@@ -528,8 +528,7 @@ define(function (require) {
y = this.shapeList[i].style.y[0]; y = this.shapeList[i].style.y[0];
this.zr.modShape( this.zr.modShape(
this.shapeList[i].id, this.shapeList[i].id,
{ scale : [1, 0, x, y] }, { scale : [1, 0, x, y] }
true
); );
this.zr.animate(this.shapeList[i].id, '') this.zr.animate(this.shapeList[i].id, '')
.when( .when(
......
...@@ -1005,7 +1005,7 @@ define(function (require) { ...@@ -1005,7 +1005,7 @@ define(function (require) {
clearTimeout(this._refreshDelayTicket); clearTimeout(this._refreshDelayTicket);
this._refreshDelayTicket = setTimeout( this._refreshDelayTicket = setTimeout(
function(){ function(){
self.animationEffect(); self && self.shapeList && self.animationEffect();
}, },
100 100
); );
......
...@@ -905,8 +905,7 @@ define(function (require) { ...@@ -905,8 +905,7 @@ define(function (require) {
r0 : 0, r0 : 0,
r : 0 r : 0
} }
}, }
true
); );
serie = ecData.get(this.shapeList[i], 'series'); serie = ecData.get(this.shapeList[i], 'series');
...@@ -939,8 +938,7 @@ define(function (require) { ...@@ -939,8 +938,7 @@ define(function (require) {
this.shapeList[i].id, this.shapeList[i].id,
{ {
scale : [0, 0, x, y] scale : [0, 0, x, y]
}, }
true
); );
this.zr.animate(this.shapeList[i].id, '') this.zr.animate(this.shapeList[i].id, '')
.when( .when(
......
...@@ -448,8 +448,7 @@ ...@@ -448,8 +448,7 @@
this.shapeList[i].id, this.shapeList[i].id,
{ {
scale : [0.1, 0.1, x, y] scale : [0.1, 0.1, x, y]
}, }
true
); );
this.zr.animate(item.id, '') this.zr.animate(item.id, '')
......
...@@ -499,8 +499,7 @@ define(function (require) { ...@@ -499,8 +499,7 @@ define(function (require) {
this.shapeList[i].id, this.shapeList[i].id,
{ {
scale : [0, 0, x, y] scale : [0, 0, x, y]
}, }
true
); );
this.zr.animate(this.shapeList[i].id, '') this.zr.animate(this.shapeList[i].id, '')
.when( .when(
......
...@@ -104,7 +104,7 @@ define(function (require) { ...@@ -104,7 +104,7 @@ define(function (require) {
var label = this._getReformedLabel(i) + ''; var label = this._getReformedLabel(i) + '';
var wLen = (label.match(/\w/g) || '').length; var wLen = (label.match(/\w/g) || '').length;
var oLen = label.length - wLen; var oLen = label.length - wLen;
labelSize = wLen * fontSize / 2 + oLen * fontSize; labelSize = wLen * fontSize * 2 / 3 + oLen * fontSize;
} }
if (labelSpace < labelSize) { if (labelSpace < labelSize) {
......
...@@ -593,7 +593,7 @@ define(function (require) { ...@@ -593,7 +593,7 @@ define(function (require) {
this._min = this.option.min - 0; // 指定min忽略boundaryGay[0] this._min = this.option.min - 0; // 指定min忽略boundaryGay[0]
this._max = this.option.max - 0; // 指定max忽略boundaryGay[1] this._max = this.option.max - 0; // 指定max忽略boundaryGay[1]
customerDefine = true; customerDefine = true;
_customerValue(); this._customerValue();
} }
}, },
......
...@@ -25,6 +25,7 @@ function option(chartType, n) { ...@@ -25,6 +25,7 @@ function option(chartType, n) {
show : true, show : true,
feature : { feature : {
mark : {show: true}, mark : {show: true},
dataZoom : {show: true},
dataView : {show: true, readOnly: false}, dataView : {show: true, readOnly: false},
magicType : {show: true, type: ['line', 'bar']}, magicType : {show: true, type: ['line', 'bar']},
restore : {show: true}, restore : {show: true},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册