var myChart = echarts.init(document.getElementById('main'));
var geoCoordMap = {
'上海': [121.4648,31.2891],
'東莞': [113.8953,22.901],
'東營': [118.7073,37.5513],
'中山': [113.4229,22.478],
'臨汾': [111.4783,36.1615],
'臨沂': [118.3118,35.2936],
'丹東': [124.541,40.4242],
'麗水': [119.5642,28.1854],
'烏魯木齊': [87.9236,43.5883],
'佛山': [112.8955,23.1097],
};
var BJData = [
[{name:'成都'},{name:'濰坊',value:5}],
[{name:'濰坊'},{name:'西寧',value:5}],
[{name:'西寧'},{name:'溫州',value:5}],
[{name:'溫州'},{name:'東莞',value:5}],
[{name:'東莞'},{name:'汕頭',value:5}],
[{name:'汕頭'},{name:'福州',value:5}],
[{name:'廊坊'},{name:'廊坊',value:5}]
];
var planePath = 'path://M1705.06,1318.313v-89.254l-319.9-221.799l0.073-208.063c0.521-84.662-26.629-121.796-63.961-121.491c-37.332-0.305-64.482,36.829-63.961,121.491l0.073,208.063l-319.9,221.799v89.254l330.343-157.288l12.238,241.308l-134.449,92.931l0.531,42.034l175.125-42.917l175.125,42.917l0.531-42.034l-134.449-92.931l12.238-241.308L1705.06,1318.313z';
var convertData = function (data) {
var res = [];
for (var i = 0; i < data.length; i++) {
var dataItem = data[i];
var fromCoord = geoCoordMap[dataItem[0].name];
var toCoord = geoCoordMap[dataItem[1].name];
if (fromCoord && toCoord) {
res.push({
fromName: dataItem[0].name,
toName: dataItem[1].name,
coords: [fromCoord, toCoord]
});
}
}
return res;
};
var color = ['#a6c84c', '#ffa022', '#46bee9'];
var series = [];
[['北京', BJData]].forEach(function (item, i) {
series.push({
name: item[0] + ' Top10',
type: 'lines',
coordinateSystem: 'bmap',//百度地圖
// coordinateSystem: 'geo',// echarts3的地圖
zlevel: 1,
effect: {
show: true,
period: 6,
trailLength: 0.7,
color: '#fff',
symbolSize: 3
},
lineStyle: {
normal: {
color: color[i],
width: 0,
curveness: 0.2
}
},
data: convertData(item[1])
},
{
name: item[0] + ' Top10',
type: 'lines',
coordinateSystem: 'bmap', //百度地圖
// coordinateSystem: 'geo', // echarts3的地圖
zlevel: 2,
effect: {
show: true,
period: 6,
trailLength: 0,
symbol: planePath,
symbolSize: 15
},
lineStyle: {
normal: {
color: color[i],
width: 1,
opacity: 0.4,
curveness: 0.2
}
},
data: convertData(item[1])
},
{
name: item[0] + ' Top10',
type: 'effectScatter',
coordinateSystem: 'bmap',//百度地圖
// coordinateSystem: 'geo',// echarts3的地圖
zlevel: 2,
rippleEffect: {
brushType: 'stroke'
},
label: {
normal: {
show: true,
position: 'right',
formatter: ''
}
},
symbolSize: function (val) {
return val[2] / 8;
},
itemStyle: {
normal: {
color: color[i]
}
},
data: item[1].map(function (dataItem) {
return {
name: dataItem[1].name,
value: geoCoordMap[dataItem[1].name].concat([dataItem[1].value])
};
})
});
});
option = {
backgroundColor: '#404a59',
title : {
text: '模擬遷徙',
subtext: '數(shù)據(jù)純屬虛構(gòu)',
left: 'center',
textStyle : {
color: '#fff'
}
},
tooltip : {
trigger: 'item'
},
legend: {
orient: 'vertical',
top: 'bottom',
left: 'right',
data:['北京 Top10', '上海 Top10', '廣州 Top10'],
textStyle: {
color: '#fff'
},
selectedMode: 'single'
},
dataRange: {
min: 0,
max: 100,
x: 'right',
calculable: true,
color: ['#ff3333', 'red'],
textStyle: {
color: '#fff'
}
},
bmap: {
center: [115.97, 29.71],
zoom: 5,
roam: true
},
// geo: {
// map: 'world',
// label: {
// emphasis: {
// show: false
// }
// },
// roam: true,
// itemStyle: {
// normal: {
// areaColor: '#323c48',
// borderColor: '#404a59'
// },
// emphasis: {
// areaColor: '#2a333d'
// }
// }
// },
series: series
};
myChart.setOption(option);
可是在這一行報錯,我看了官網(wǎng)的是這樣寫的沒有錯啊,不知道我這里錯了哪里..................
北大青鳥APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
北大青鳥中博軟件學(xué)院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學(xué)院和江蘇省首批服務(wù)外包人才培訓(xùn)基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團(tuán)創(chuàng)建于1999年,經(jīng)過二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術(shù)與教育服務(wù)機(jī)構(gòu),發(fā)展為教育服務(wù)業(yè)的綜合性企業(yè)集團(tuán),成為集合面授教學(xué)培訓(xùn)、網(wǎng)
達(dá)內(nèi)教育集團(tuán)成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機(jī)構(gòu),是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項目經(jīng)理從事移動互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
浪潮集團(tuán)項目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗,技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點難點突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開發(fā)經(jīng)驗。曾經(jīng)歷任德國Software AG 技術(shù)顧問,美國Dachieve 系統(tǒng)架構(gòu)師,美國AngelEngineers Inc. 系統(tǒng)架構(gòu)師。