提交 2bf50aee 编写于 作者: K kener

fastmerge

上级 ac3005d1
...@@ -83,259 +83,189 @@ option = { ...@@ -83,259 +83,189 @@ option = {
mapType: 'world', mapType: 'world',
selectedMode : 'single', selectedMode : 'single',
itemStyle:{ itemStyle:{
normal:{label:{show:true}}, normal:{label:{show:false}},
emphasis:{label:{show:true}} emphasis:{label:{show:true}}
}, },
data:[ data:[],
{name:'CN',selected:true}
],
// 自定义名称 // 自定义名称
nameMap : { nameMap : {
'Afghanistan':'AF', 'Afghanistan':'阿富汗',
'Andorra':'AD', 'Angola':'安哥拉',
'United Arab Emirates':'AE', 'Albania':'阿尔巴尼亚',
'Antigua and Barbuda':'AG', 'United Arab Emirates':'阿联酋',
'Anguilla':'AI', 'Argentina':'阿根廷',
'Albania':'AL', 'Armenia':'亚美尼亚',
'Armenia':'AM', 'French Southern and Antarctic Lands':'法属南半球和南极领地',
'Netherlands Antilles':'AN', 'Australia':'澳大利亚',
'Angola':'AO', 'Austria':'奥地利',
'Antarctica':'AQ', 'Azerbaijan':'阿塞拜疆',
'Argentina':'AR', 'Burundi':'布隆迪',
'American Samoa':'AS', 'Belgium':'比利时',
'Austria':'AT', 'Benin':'贝宁',
'Australia':'AU', 'Burkina Faso':'布基纳法索',
'Aruba':'AW', 'Bangladesh':'孟加拉国',
'Azerbaijan':'AZ', 'Bulgaria':'保加利亚',
'Bosnia and Herzegovina':'BA', 'The Bahamas':'巴哈马',
'Barbados':'BB', 'Bosnia and Herzegovina':'波斯尼亚和黑塞哥维那',
'Bangladesh':'BD', 'Belarus':'白俄罗斯',
'Belgium':'BE', 'Belize':'伯利兹',
'Burkina Faso':'BF', 'Bermuda':'百慕大',
'Bulgaria':'BG', 'Bolivia':'玻利维亚',
'Bahrain':'BH', 'Brazil':'巴西',
'Burundi':'BI', 'Brunei':'文莱',
'Benin':'BJ', 'Bhutan':'不丹',
'Bermuda':'BM', 'Botswana':'博茨瓦纳',
'Brunei':'BN', 'Central African Republic':'中非共和国',
'Bolivia':'BO', 'Canada':'加拿大',
'Brazil':'BR', 'Switzerland':'瑞士',
'The Bahamas':'BS', 'Chile':'智利',
'Bhutan':'BT', 'China':'中国',
'Bouvet Island':'BV', 'Ivory Coast':'象牙海岸',
'Botswana':'BW', 'Cameroon':'喀麦隆',
'Belarus':'BY', 'Democratic Republic of the Congo':'刚果民主共和国',
'Belize':'BZ', 'Republic of the Congo':'刚果共和国',
'Canada':'CA', 'Colombia':'哥伦比亚',
'Cocos Islands':'CC', 'Costa Rica':'哥斯达黎加',
'Central African Republic':'CF', 'Cuba':'古巴',
'Democratic Republic of the Congo' : 'CD', 'Northern Cyprus':'北塞浦路斯',
'Republic of the Congo' : 'CG', 'Cyprus':'塞浦路斯',
'Switzerland':'CH', 'Czech Republic':'捷克共和国',
'Ivory Coast':'CI', 'Germany':'德国',
'Cook Islands':'CK', 'Djibouti':'吉布提',
'Chile':'CL', 'Denmark':'丹麦',
'Cameroon':'CM', 'Dominican Republic':'多明尼加共和国',
'China':'CN', 'Algeria':'阿尔及利亚',
'Colombia':'CO', 'Ecuador':'厄瓜多尔',
'Equatorial Guinea':'CQ', 'Egypt':'埃及',
'Costa Rica':'CR', 'Eritrea':'厄立特里亚',
'Cuba':'CU', 'Spain':'西班牙',
'Cape Verde':'CV', 'Estonia':'爱沙尼亚',
'Christmas Island':'CX', 'Ethiopia':'埃塞俄比亚',
'Northern Cyprus':'CY', 'Finland':'芬兰',
'Czech Republic':'CZ', 'Fiji':'斐',
'Germany':'DE', 'Falkland Islands':'福克兰群岛',
'Djibouti':'DJ', 'France':'法国',
'Denmark':'DK', 'Gabon':'加蓬',
'Dominica':'DM', 'United Kingdom':'联合王国',
'Dominican Republic':'DO', 'Georgia':'格鲁吉亚',
'Algeria':'DZ', 'Ghana':'加纳',
'Ecuador':'EC', 'Guinea':'几内亚',
'Estonia':'EE', 'Gambia':'冈比亚',
'Egypt':'EG', 'Guinea Bissau':'几内亚比绍',
'Western Sahara':'EH', 'Equatorial Guinea':'赤道几内亚',
'Spain':'ES', 'Greece':'希腊',
'Ethiopia':'ET', 'Greenland':'格陵兰',
'El Salvador':'EV', 'Guatemala':'危地马拉',
'Eritrea' : '?', 'French Guiana':'法属圭亚那',
'Finland':'FI', 'Guyana':'圭亚那',
'Fiji':'FJ', 'Honduras':'洪都拉斯',
'Falkland Islands':'FK', 'Croatia':'克罗地亚',
'Micronesia':'FM', 'Haiti':'海地',
'Faroe Islands':'FO', 'Hungary':'匈牙利',
'France':'FR', 'Indonesia':'印尼',
'Gabon':'GA', 'India':'印度',
'Great Britain (UK)':'GB', 'Ireland':'爱尔兰',
'Grenada':'GD', 'Iran':'伊朗',
'Georgia':'GE', 'Iraq':'伊拉克',
'French Guiana':'GF', 'Iceland':'冰岛',
'Ghana':'GH', 'Israel':'以色列',
'Gibraltar':'GI', 'Italy':'意大利',
'Greenland':'GL', 'Jamaica':'牙买加',
'Gambia':'GM', 'Jordan':'约旦',
'Guinea':'GN', 'Japan':'日本',
'Guadeloupe':'GP', 'Kazakhstan':'哈萨克斯坦',
'Greece':'GR', 'Kenya':'肯尼亚',
'Guatemala':'GT', 'Kyrgyzstan':'吉尔吉斯斯坦',
'Guam':'GU', 'Cambodia':'柬埔寨',
'Guinea Bissau':'GW', 'South Korea':'韩国',
'Guyana':'GY', 'Kosovo':'科索沃',
'Hong Kong':'HK', 'Kuwait':'科威特',
'Heard and McDonald Is.':'HM', 'Laos':'老挝',
'Honduras':'HN', 'Lebanon':'黎巴嫩',
'Croatia':'HR', 'Liberia':'利比里亚',
'Haiti':'HT', 'Libya':'利比亚',
'Hungary':'HU', 'Sri Lanka':'斯里兰卡',
'Indonesia':'ID', 'Lesotho':'莱索托',
'Ireland':'IE', 'Lithuania':'立陶宛',
'Israel':'IL', 'Luxembourg':'卢森堡',
'India':'IN', 'Latvia':'拉脱维亚',
'British Indian Ocean Territory':'IO', 'Morocco':'摩洛哥',
'Iraq':'IQ', 'Moldova':'摩尔多瓦',
'Iran':'IR', 'Madagascar':'马达加斯加',
'Iceland':'IS', 'Mexico':'墨西哥',
'Italy':'IT', 'Macedonia':'马其顿',
'Jamaica':'JM', 'Mali':'马里',
'Jordan':'JO', 'Myanmar':'缅甸',
'Japan':'JP', 'Montenegro':'黑山',
'Kenya':'KE', 'Mongolia':'蒙古',
'Kyrgyzstan':'KG', 'Mozambique':'莫桑比克',
'Kosovo' : '?', 'Mauritania':'毛里塔尼亚',
'Cambodia':'KH', 'Malawi':'马拉维',
'Kiribati':'KI', 'Malaysia':'马来西亚',
'Comoros':'KM', 'Namibia':'纳米比亚',
'St. Kitts & Nevis':'KN', 'New Caledonia':'新喀里多尼亚',
'North Korea':'KP', 'Niger':'尼日尔',
'South Korea':'KR', 'Nigeria':'尼日利亚',
'Kuwait':'KW', 'Nicaragua':'尼加拉瓜',
'Cayman Islands':'KY', 'Netherlands':'荷兰',
'Kazakhstan':'KZ', 'Norway':'挪威',
"Laos":'LA', 'Nepal':'尼泊尔',
'Lebanon':'LB', 'New Zealand':'新西兰',
'St. Lucia':'LC', 'Oman':'阿曼',
'Liechtenstein':'LI', 'Pakistan':'巴基斯坦',
'Sri Lanka':'LK', 'Panama':'巴拿马',
'Liberia':'LR', 'Peru':'秘鲁',
'Lesotho':'LS', 'Philippines':'菲律宾',
'Lithuania':'LT', 'Papua New Guinea':'巴布亚新几内亚',
'Luxembourg':'LU', 'Poland':'波兰',
'Latvia':'LV', 'Puerto Rico':'波多黎各',
'Libya':'LY', 'North Korea':'北朝鲜',
'Morocco':'MA', 'Portugal':'葡萄牙',
'Monaco':'MC', 'Paraguay':'巴拉圭',
'Moldova':'MD', 'Qatar':'卡塔尔',
'Montenegro':'ME', 'Romania':'罗马尼亚',
'Madagascar':'MG', 'Russia':'俄国',
'Marshall Islands':'MH', 'Rwanda':'卢旺达',
'Mali':'ML', 'Western Sahara':'西撒哈拉',
'Myanmar':'MM', 'Saudi Arabia':'沙特阿拉伯',
'Mongolia':'MN', 'Sudan':'苏丹',
'Macau':'MO', 'South Sudan':'南苏丹',
'Northern Mariana Islands':'MP', 'Senegal':'塞内加尔',
'Martinique':'MQ', 'Solomon Islands':'所罗门群岛',
'Mauritania':'MR', 'Sierra Leone':'塞拉利昂',
'Montserrat':'MS', 'El Salvador':'萨尔瓦多',
'Malta':'MT', 'Somaliland':'索马里兰',
'Maldives':'MV', 'Somalia':'索马里',
'Malawi':'MW', 'Republic of Serbia':'塞尔维亚共和国',
'Mexico':'MX', 'Suriname':'苏里南',
'Malaysia':'MY', 'Slovakia':'斯洛伐克',
'Mozambique':'MZ', 'Slovenia':'斯洛文尼亚',
'Macedonia' : 'MKD', 'Sweden':'瑞典',
'Namibia':'NA', 'Swaziland':'斯威士兰',
'New Caledonia':'NC', 'Syria':'叙利亚',
'Niger':'NE', 'Chad':'乍得',
'Norfolk Island':'NF', 'Togo':'多哥',
'Nigeria':'NG', 'Thailand':'泰国',
'Nicaragua':'NI', 'Tajikistan':'塔吉克斯坦',
'Netherlands':'NL', 'Turkmenistan':'土库曼斯坦',
'Norway':'NO', 'East Timor':'东帝汶',
'Nepal':'NP', 'Trinidad and Tobago':'特里尼达和多巴哥',
'Nauru':'NR', 'Tunisia':'突尼斯',
'Neutral Zone':'NT', 'Turkey':'土耳其',
'Niue':'NU', 'United Republic of Tanzania':'坦桑尼亚联合共和国',
'New Zealand':'NZ', 'Uganda':'乌干达',
'Oman':'OM', 'Ukraine':'乌克兰',
'Panama':'PA', 'Uruguay':'乌拉圭',
'Peru':'PE', 'United States of America':'美国',
'French Polynesia':'PF', 'Uzbekistan':'乌兹别克斯坦',
'Papua New Guinea':'PG', 'Venezuela':'委内瑞拉',
'Philippines':'PH', 'Vietnam':'越南',
'Pakistan':'PK', 'Vanuatu':'瓦努阿图',
'Poland':'PL', 'West Bank':'西岸',
'St. Pierre & Mequielon':'PM', 'Yemen':'也门',
'Pitcairn Island':'PN', 'South Africa':'南非',
'Puerto Rico':'PR', 'Zambia':'赞比亚',
'Portugal':'PT', 'Zimbabwe':'津巴布韦'
'Palau':'PW',
'Paraguay':'PY',
'Qatar':'QA',
'Reunion Island':'RE',
'Republic of Serbia' : 'SRB',
'Romania':'RO',
'Russia':'RU',
'Rwanda':'RW',
'Saudi Arabia':'SA',
'Solomon Islands':'SB',
'Seychelles':'SC',
'South Sudan':'SSP',
'Sudan' : 'SD',
'Sweden':'SE',
'Singapore':'SG',
'St. Helena':'SH',
'Slovenia':'SI',
'Svalbard & Jan Mayen':'SJ',
'Slovakia':'SK',
'Sierra Leone':'SL',
'San Marino':'SM',
'Senegal':'SN',
'Somaliland': '?',
'Somalia':'SO',
'Suriname':'SR',
'Sao Tome & Principe':'ST',
'USSR':'SU',
'Syria':'SY',
'Swaziland':'SZ',
'Turks & Caicos Islands':'TC',
'Chad':'TD',
'French Southern Territories':'TF',
'Togo':'TG',
'Thailand':'TH',
'Tajikistan':'TJ',
'tokelau':'TK',
'Turkmenistan':'TM',
'Tunisia':'TN',
'Tonga':'TO',
'East Timor':'TP',
'Turkey':'TR',
'Trinidad and Tobago':'TT',
'Tuvalu':'TV',
'Taiwan':'TW',
'United Republic of Tanzania':'TZ',
'Ukraine':'UA',
'Uganda':'UG',
'United Kingdom':'UK',
'United States of America':'US',
'Uruguay':'UY',
'Uzbekistan' : '?',
'Vatican City State':'VA',
'St. Vincent and the Grenadines':'VC',
'Venezuela':'VE',
'Virgin Islands':'VG',
'Vietnam':'VN',
'Vanuatu':'VU',
'Wallis and Fortuna Is.':'WF',
'Samoa':'WS',
'Yemen':'YE',
'Yugoslavia':'YU',
'South Africa':'ZA',
'Zambia':'ZM',
'Zaire':'ZR',
'Zimbabwe':'ZW',
'West Bank' : '?',
'French Southern and Antarctic Lands' : '?'
} }
} }
] ]
......
...@@ -838,7 +838,8 @@ define(function(require) { ...@@ -838,7 +838,8 @@ define(function(require) {
x : x + width, x : x + width,
width: 0 width: 0
} }
} },
true
); );
zr.animate(self.shapeList[i].id, 'style') zr.animate(self.shapeList[i].id, 'style')
.when( .when(
...@@ -857,7 +858,8 @@ define(function(require) { ...@@ -857,7 +858,8 @@ define(function(require) {
style: { style: {
width: 0 width: 0
} }
} },
true
); );
zr.animate(self.shapeList[i].id, 'style') zr.animate(self.shapeList[i].id, 'style')
.when( .when(
...@@ -880,7 +882,8 @@ define(function(require) { ...@@ -880,7 +882,8 @@ define(function(require) {
style: { style: {
height: 0 height: 0
} }
} },
true
); );
zr.animate(self.shapeList[i].id, 'style') zr.animate(self.shapeList[i].id, 'style')
.when( .when(
...@@ -899,7 +902,8 @@ define(function(require) { ...@@ -899,7 +902,8 @@ define(function(require) {
y: y + height, y: y + height,
height: 0 height: 0
} }
} },
true
); );
zr.animate(self.shapeList[i].id, 'style') zr.animate(self.shapeList[i].id, 'style')
.when( .when(
......
...@@ -106,7 +106,8 @@ define(function (require) { ...@@ -106,7 +106,8 @@ define(function (require) {
x: Math.round(self.shapeList[i].style.x * xScale), x: Math.round(self.shapeList[i].style.x * xScale),
y: Math.round(self.shapeList[i].style.y * yScale) y: Math.round(self.shapeList[i].style.y * yScale)
} }
} },
true
); );
} }
} }
......
...@@ -460,9 +460,11 @@ define(function(require) { ...@@ -460,9 +460,11 @@ define(function(require) {
serie = series[self.shapeList[i]._seriesIndex]; serie = series[self.shapeList[i]._seriesIndex];
x = self.shapeList[i].style.x; x = self.shapeList[i].style.x;
y = self.shapeList[i].style.y[0]; y = self.shapeList[i].style.y[0];
zr.modShape(self.shapeList[i].id, { zr.modShape(
scale : [1, 0, x, y] self.shapeList[i].id,
}); { scale : [1, 0, x, y] },
true
);
zr.animate(self.shapeList[i].id, '') zr.animate(self.shapeList[i].id, '')
.when( .when(
(self.deepQuery([serie],'animationDuration') (self.deepQuery([serie],'animationDuration')
......
...@@ -904,11 +904,15 @@ define(function(require) { ...@@ -904,11 +904,15 @@ define(function(require) {
} }
isHorizontal ? (x = -dx, y = 0) : (x = 0, y = dy); isHorizontal ? (x = -dx, y = 0) : (x = 0, y = dy);
} }
zr.modShape(self.shapeList[i].id, { zr.modShape(
style : { self.shapeList[i].id,
pointList : self.shapeList[i].style.pointList {
} style : {
}); pointList: self.shapeList[i].style.pointList
}
},
true
);
} }
else { else {
// 拐点动画 // 拐点动画
...@@ -956,14 +960,22 @@ define(function(require) { ...@@ -956,14 +960,22 @@ define(function(require) {
x = self.shapeList[i].style.pointList[0][0]; x = self.shapeList[i].style.pointList[0][0];
y = self.shapeList[i].style.pointList[0][1]; y = self.shapeList[i].style.pointList[0][1];
if (self.shapeList[i]._orient == 'horizontal') { if (self.shapeList[i]._orient == 'horizontal') {
zr.modShape(self.shapeList[i].id, { zr.modShape(
scale : [0, 1, x, y] self.shapeList[i].id,
}); {
scale : [0, 1, x, y]
},
true
);
} }
else { else {
zr.modShape(self.shapeList[i].id, { zr.modShape(
scale : [1, 0, x, y] self.shapeList[i].id,
}); {
scale : [1, 0, x, y]
},
true
);
} }
zr.animate(self.shapeList[i].id, '') zr.animate(self.shapeList[i].id, '')
.when( .when(
...@@ -979,9 +991,13 @@ define(function(require) { ...@@ -979,9 +991,13 @@ define(function(require) {
else { else {
x = self.shapeList[i]._x || 0; x = self.shapeList[i]._x || 0;
y = self.shapeList[i]._y || 0; y = self.shapeList[i]._y || 0;
zr.modShape(self.shapeList[i].id, { zr.modShape(
scale : [0, 0, x, y] self.shapeList[i].id,
}); {
scale : [0, 0, x, y]
},
true
);
zr.animate(self.shapeList[i].id, '') zr.animate(self.shapeList[i].id, '')
.when( .when(
duration, duration,
......
...@@ -65,15 +65,13 @@ define(function(require) { ...@@ -65,15 +65,13 @@ define(function(require) {
|| _nameMap[mapType] || _nameMap[mapType]
|| {}; || {};
if (series[i].textFixed) { if (series[i].textFixed) {
zrUtil.merge( zrUtil.mergeFast(
_textFixed, series[i].textFixed, _textFixed, series[i].textFixed, true, false
{ 'overwrite': true}
); );
} }
if (series[i].geoCoord) { if (series[i].geoCoord) {
zrUtil.merge( zrUtil.mergeFast(
_geoCoord, series[i].geoCoord, _geoCoord, series[i].geoCoord, true, false
{ 'overwrite': true}
); );
} }
...@@ -122,7 +120,7 @@ define(function(require) { ...@@ -122,7 +120,7 @@ define(function(require) {
valueData[mt][k].value = valueData[mt][k].value =
valueData[mt][k].value valueData[mt][k].value
/ valueData[mt][k].seriesIndex.length; / valueData[mt][k].seriesIndex.length;
// TODO:小数点精度可配
if (valueData[mt][k].value > 10) { if (valueData[mt][k].value > 10) {
valueData[mt][k].value = Math.round( valueData[mt][k].value = Math.round(
valueData[mt][k].value valueData[mt][k].value
......
...@@ -891,13 +891,17 @@ define(function(require) { ...@@ -891,13 +891,17 @@ define(function(require) {
r0 = self.shapeList[i].style.r0; r0 = self.shapeList[i].style.r0;
r = self.shapeList[i].style.r; r = self.shapeList[i].style.r;
zr.modShape(self.shapeList[i].id, { zr.modShape(
rotation : [Math.PI*2, x, y], self.shapeList[i].id,
style : { {
r0 : 0, rotation : [Math.PI*2, x, y],
r : 0 style : {
} r0 : 0,
}); r : 0
}
},
true
);
serie = ecData.get(self.shapeList[i], 'series'); serie = ecData.get(self.shapeList[i], 'series');
dataIndex = ecData.get(self.shapeList[i], 'dataIndex'); dataIndex = ecData.get(self.shapeList[i], 'dataIndex');
...@@ -925,9 +929,13 @@ define(function(require) { ...@@ -925,9 +929,13 @@ define(function(require) {
} }
else { else {
dataIndex = self.shapeList[i]._dataIndex; dataIndex = self.shapeList[i]._dataIndex;
zr.modShape(self.shapeList[i].id, { zr.modShape(
scale : [0, 0, x, y] self.shapeList[i].id,
}); {
scale : [0, 0, x, y]
},
true
);
zr.animate(self.shapeList[i].id, '') zr.animate(self.shapeList[i].id, '')
.when( .when(
duration + dataIndex * 100, duration + dataIndex * 100,
......
...@@ -467,9 +467,13 @@ ...@@ -467,9 +467,13 @@
center = polar.getCenter(polarIndex); center = polar.getCenter(polarIndex);
x = center[0]; x = center[0];
y = center[1]; y = center[1];
zr.modShape(self.shapeList[i].id, { zr.modShape(
scale : [0.1, 0.1, x, y] self.shapeList[i].id,
}); {
scale : [0.1, 0.1, x, y]
},
true
);
zr.animate(item.id, '') zr.animate(item.id, '')
.when( .when(
...@@ -485,9 +489,13 @@ ...@@ -485,9 +489,13 @@
else { else {
x = self.shapeList[i]._x || 0; x = self.shapeList[i]._x || 0;
y = self.shapeList[i]._y || 0; y = self.shapeList[i]._y || 0;
zr.modShape(self.shapeList[i].id, { zr.modShape(
scale : [0, 0, x, y] self.shapeList[i].id,
}); {
scale : [0, 0, x, y]
},
true
);
zr.animate(self.shapeList[i].id, '') zr.animate(self.shapeList[i].id, '')
.when( .when(
duration, duration,
......
...@@ -418,9 +418,13 @@ define(function(require) { ...@@ -418,9 +418,13 @@ define(function(require) {
for (var i = 0, l = self.shapeList.length; i < l; i++) { for (var i = 0, l = self.shapeList.length; i < l; i++) {
x = self.shapeList[i]._x || 0; x = self.shapeList[i]._x || 0;
y = self.shapeList[i]._y || 0; y = self.shapeList[i]._y || 0;
zr.modShape(self.shapeList[i].id, { zr.modShape(
scale : [0, 0, x, y] self.shapeList[i].id,
}); {
scale : [0, 0, x, y]
},
true
);
zr.animate(self.shapeList[i].id, '') zr.animate(self.shapeList[i].id, '')
.when( .when(
(self.deepQuery([serie],'animationDuration') (self.deepQuery([serie],'animationDuration')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册