Toggle navigation
分布及流向
By
肆肆肆厮
2017-10-12 07:00:13
脚本
16
21
作品使用的第三方脚本
/dep/echarts/map/js/china.js
数据管理
上传数据
支持小于 5M 任意格式(csv, xlsx, json, xml, ...)的数据文件
上传后可以通过生成的文件链接异步获取托管的数据。
历史数据
0 条
无历史数据
代码修改记录
信息提示
保存作品
对当前截图不满意?你还可以
上传本地截图
重新截图
作品名称
作品描述
标签
geo
grid
legend
markLine
markPoint
bar
effectScatter
line
lines
map
timeline
title
toolbox
tooltip
visualMap
作品默认版本
最新
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
20:11:45
图表已生成
整理代码
刷新
代码
var allData = { "citys": [{ "name": "上海", "value":[121.47,31.23], "symbolSize": 5, //点的大小 "itemStyle": { "normal": { "color": "#F58158" //每个点的颜色 } } }, { "name": "北京", "value": [116.4,39.9], "symbolSize": 2, "itemStyle": { "normal": { "color": "#58B3CC" } } }, { "name": "广州", "value": [113.5107,23.2196], "symbolSize": 2, "itemStyle": { "normal": { "color": "#58B3CC" } } }, { "name": "成都", "value": [104.07,30.67], "symbolSize": 2, "itemStyle": { "normal": { "color": "#58B3CC" } } }, { "name": "沈阳", "value": [123.43,41.8], "symbolSize": 2, "itemStyle": { "normal": { "color": "#58B3CC" } } }, { "name": "南京", "value": [118.78,32.07], "symbolSize": 2, "itemStyle": { "normal": { "color": "#58B3CC" } } }, { "name": "连云港", "value": [119.22,34.6], "symbolSize": 2, "itemStyle": { "normal": { "color": "#58B3CC" } } }, { "name": "青岛", "value": [120.38,36.07], "symbolSize": 2, "itemStyle": { "normal": { "color": "#58B3CC" } } }, { "name": "杭州", "value": [120.15,30.28], "symbolSize": 2, "itemStyle": { "normal": { "color": "#58B3CC" } } }, { "name": "西安", "value": [108.93,34.27], "symbolSize": 2, "itemStyle": { "normal": { "color": "#58B3CC" } } }, { "name": "郑州", "value": [113.62,34.75], "symbolSize": 2, "itemStyle": { "normal": { "color": "#58B3CC" } } }, { "name": "佛山", "value": [113.12,23.02], "symbolSize": 2, "itemStyle": { "normal": { "color": "#58B3CC" } } }, { "name": "珠海", "value": [113.57,22.27], "symbolSize": 2, "itemStyle": { "normal": { "color": "#58B3CC" } } }, { "name": "武汉", "value": [114.3,30.6], "symbolSize": 2, "itemStyle": { "normal": { "color": "#58B3CC" } } }], "moveLines": [{ "fromName": "上海", "toName": "北京", "coords": [ [121.47,31.23], [116.4,39.9] ] },{ "fromName": "上海", "toName": "广州", "coords": [ [121.47,31.23], [113.5107,23.2196] ] },{ "fromName": "上海", "toName": "成都", "coords": [ [121.47,31.23], [104.07,30.67] ] },{ "fromName": "上海", "toName": "沈阳", "coords": [ [121.47,31.23], [123.43,41.8] ] },{ "fromName": "上海", "toName": "南京", "coords": [ [121.47,31.23], [118.78,32.07] ] },{ "fromName": "上海", "toName": "连云港", "coords": [ [121.47,31.23], [119.22,34.6] ] },{ "fromName": "上海", "toName": "青岛", "coords": [ [121.47,31.23], [120.38,36.07] ] },{ "fromName": "上海", "toName": "杭州", "coords": [ [121.47,31.23], [120.15,30.28] ] },{ "fromName": "上海", "toName": "西安", "coords": [ [121.47,31.23], [108.93,34.27] ] },{ "fromName": "上海", "toName": "郑州", "coords": [ [121.47,31.23], [113.62,34.75] ] },{ "fromName": "上海", "toName": "佛山", "coords": [ [121.47,31.23], [113.12,23.02] ] },{ "fromName": "上海", "toName": "珠海", "coords": [ [121.47,31.23], [113.57,22.27] ] },{ "fromName": "上海", "toName": "武汉", "coords": [ [121.47,31.23], [114.3,30.6] ] }] }; option = {toolbox: { feature: { saveAsImage: { show: true } } }, backgroundColor: '#404a59', visualMap: { show:false, min: 0, max: 20, left: 'left', top: 'bottom', text: ['High', 'Low'], seriesIndex: [2], inRange: { color: ['#f3d999','#ea7e53']//有值地图块颜色区间 }, calculable: true }, title: { text: '', left: 'center', textStyle: { color: '#fff' } }, geo: { map: 'china', label: { emphasis: { show: true } }, roam: true, itemStyle: { normal: { areaColor: '#323c48',//地图块 borderColor: '#404a59'//地图边线 }, emphasis: { areaColor: '#2a333d' } } }, series: [{ name: '地点', type: 'effectScatter', coordinateSystem: 'geo', zlevel: 2, rippleEffect: { brushType: 'stroke' }, label: { normal: { fontSize:16, show: true, position: 'right', formatter: '{b}' } }, symbolSize: 2, showEffectOn: 'render', itemStyle: { normal: { color: '#46bee9' } }, data: allData.citys },{ name: '线路', type: 'lines', coordinateSystem: 'geo', zlevel: 2, large: true, effect: { show: true, constantSpeed: 30, symbol: 'pin', symbolSize: 3, trailLength: 0, }, lineStyle: { normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#58B3CC' }, { offset: 1, color: '#F58158' }], false), width: 2, opacity: 0.2, curveness: 0.1 } }, data: allData.moveLines },{ name: '', type: 'map', // coordinateSystem: 'geo', zlevel: 3, geoIndex: 0, rippleEffect: { brushType: 'stroke' }, label: { normal: { show: true, position: 'right', formatter: '{b}' } }, symbolSize: function(val) { return val[2] / 8; }, itemStyle: { normal: { color: '#fff000' } }, data: [{name:'广东',value:22}, {name:'重庆',value:8}, {name:'甘肃',value:12}, {name:'河南',value:2}, {name:'贵州',value:1}, {name:'四川',value:2}, {name:'陕西',value:21}, {name:'江西',value:1}, {name:'湖南',value:1}, {name:'宁夏',value:1},] } ] };