前言:

echarts实现西安地铁图

效果图:

官网入口

实现代码:

var data = [{name: "地铁一号线",tooltip: {formatter: "{b}: 19999<br />"},symbolSize: 0.1,value: [5, 750],x: 800,y: 400,fixed: true,// draggable: false,category: 1,label: {color: "#35c2ff",position: 'bottom',fontSize: 24,fontWeight: 1000},itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "地铁二号线",tooltip: {formatter: "{b}: 19999<br />"},symbolSize: 0.1,value: [855, 1050],x: 800,y: 400,fixed: true,// draggable: false,category: 1,label: {color: "red",position: 'bottom',fontSize: 24,fontWeight: 1000},itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "地铁三号线",tooltip: {formatter: "{b}: 19999<br />"},symbolSize: 0.1,value: [280, 250],x: 800,y: 400,fixed: true,// draggable: false,category: 1,label: {color: "#FF00FF",position: 'bottom',fontSize: 24,fontWeight: 1000},itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "地铁四号线",tooltip: {formatter: "{b}: 19999<br />"},symbolSize: 0.1,value: [1040, 140],x: 800,y: 400,fixed: true,// draggable: false,category: 1,label: {color: "#48D1CC",position: 'bottom',fontSize: 24,fontWeight: 1000},itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "机场城际",tooltip: {formatter: "{b}: 19999<br />"},symbolSize: 0.1,value: [20, 1050],x: 800,y: 400,fixed: true,// draggable: false,category: 1,label: {color: "#20B2AA",position: 'bottom',fontSize: 24,fontWeight: 1000         },itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},//地铁一号线,站点间X轴坐标相差50,Y轴坐标相同{name: "沣河森林公园",tooltip: {formatter: "{b}: 19999<br />"},symbol: 'circle',symbolSize: [25, 25],value: [5, 600],x: 800,y: 400,fixed: true,// draggable: false,category: 1,label: {color: "#FFF",position: 'bottom',},itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "北槐",x: 400,y: 400,value: [80, 600],fixed: true,symbol: 'circle',symbolSize: [15, 15],label: {color: "#FFF",position: 'top',},category: 1,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "上林路",x: 1000,y: 1000,value: [130, 600],fixed: true,symbol: 'circle',symbolSize: [15, 15],label: {color: "#fff",position: 'bottom',},category: 1,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "沣东自贸园",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'top',},value: [180, 600],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "后卫寨",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'bottom',},value: [230, 600],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "三桥",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'top',},value: [280, 600],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "皂河",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'bottom',},value: [330, 600],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "枣园",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'top',},value: [380, 600],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "汉城路",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'bottom',},value: [430, 600],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "开远门",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'top',},value: [480, 600],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "劳动路",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'bottom',},value: [530, 600],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "玉祥门",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'top',},value: [580, 600],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "洒金桥",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'bottom',},value: [630, 600],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "北大街",symbol: 'circle',symbolSize: [20, 20],label: {color: "#efefef",position: 'top',},value: [680, 600],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{offset: 0,color: "#FF1493"},{offset: 1,color: "#0000FF"}])}}},{name: "五路口",symbol: 'circle',symbolSize: [20, 20],label: {color: "#efefef",position: 'bottom',},value: [730, 600],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{offset: 0,color: "#FF1493"},{offset: 1,color: "#0000FF"}])}}},{name: "朝阳门",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'top',},value: [780, 600],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "康复路",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'bottom',},value: [830, 600],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "通化门",symbol: 'circle',symbolSize: [20, 20],label: {color: "#efefef",position: 'top',},value: [880, 600],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{offset: 0,color: "#FF1493"},{offset: 1,color: "#0000FF"}])}}},{name: "万寿路",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'bottom',},value: [930, 600],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "长乐坡",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'top',},value: [980, 600],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "浐河",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'bottom',},value: [1030, 600],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "半坡",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'top',},value: [1080, 600],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},{name: "纺织城",symbol: 'circle',symbolSize: [25, 25],label: {color: "#efefef",position: 'bottom',},value: [1130, 600],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#157eff"},{offset: 1,color: "#35c2ff"}])}}},//地铁二号线,垂直线路,站点间X轴坐标相同,Y轴坐标相差50{name: "钟楼",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'left',},value: [680, 540],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "red"},{offset: 1,color: "red"}])}}},{name: "永宁门",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'left',},value: [680, 500],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "red"},{offset: 1,color: "red"}])}}},{name: "南稍门",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'left',},value: [680, 450],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "red"},{offset: 1,color: "red"}])}}},{name: "体育场",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'left',},value: [680, 400],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "red"},{offset: 1,color: "red"}])}}},{name: "小寨",symbol: 'circle',symbolSize: [20, 20],label: {color: "#efefef",position: 'left',},value: [680, 350],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{offset: 0,color: "#FF1493"},{offset: 1,color: "#0000FF"}])}}},{name: "纬一街",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'left',},value: [680, 300],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "red"},{offset: 1,color: "red"}])}}},{name: "会展中心",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'left',},value: [680, 250],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "red"},{offset: 1,color: "red"}])}}},{name: "三爻",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'left',},value: [680, 200],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "red"},{offset: 1,color: "red"}])}}},{name: "凤栖原",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'left',},value: [680, 150],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "red"},{offset: 1,color: "red"}])}}},{name: "航天城",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'left',},value: [680, 100],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "red"},{offset: 1,color: "red"}])}}},{name: "韦曲南",symbol: 'circle',symbolSize: [25, 25],label: {color: "#efefef",position: 'left',},value: [680, 50],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "red"},{offset: 1,color: "red"}])}}},{name: "安远门",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'left',},value: [680, 660],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "red"},{offset: 1,color: "red"}])}}},{name: "龙首原",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'left',},value: [680, 700],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "red"},{offset: 1,color: "red"}])}}},{name: "大明宫西",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'left',},value: [680, 750],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "red"},{offset: 1,color: "red"}])}}},{name: "市图书馆",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'left',},value: [680, 800],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "red"},{offset: 1,color: "red"}])}}},{name: "凤城五路",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'left',},value: [680, 850],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "red"},{offset: 1,color: "red"}])}}},{name: "行政中心",symbol: 'circle',symbolSize: [20, 20],label: {color: "#efefef",position: 'left',},value: [680, 900],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{offset: 0,color: "#FF1493"},{offset: 1,color: "#0000FF"}])}}},{name: "运动公园",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'left',},value: [680, 950],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "red"},{offset: 1,color: "red"}])}}},{name: "北苑",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'left',},value: [680, 1000],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "red"},{offset: 1,color: "red"}])}}},{name: "北客站",symbol: 'circle',symbolSize: [25, 25],label: {color: "#efefef",position: 'left',},value: [680, 1050],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "red"},{offset: 1,color: "red"}])}}},//地铁三号线{name: "吉祥村",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'top',},value: [580, 350],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "太白南路",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'bottom',},value: [520, 350],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "科技路",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'top',},value: [460, 350],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "延平门",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'bottom',},value: [400, 350],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "丈八北路",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'top',},value: [340, 350],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "鱼化寨",symbol: 'circle',symbolSize: [25, 25],label: {color: "#efefef",position: 'bottom',},value: [280, 350],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "大雁塔",symbol: 'circle',symbolSize: [20, 20],label: {color: "#efefef",position: 'bottom',},value: [730, 350],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{offset: 0,color: "#FF1493"},{offset: 1,color: "#0000FF"}])}}},{name: "北池头",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'top',},value: [800, 350],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "青龙寺",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [850, 370],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "延兴门",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [880, 400],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "咸宁路",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [880, 450],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "长乐公园",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [880, 500],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "胡家庙",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [880, 660],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "石家街",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [880, 700],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "辛家庙",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'left',},value: [900, 750],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "广泰门",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'top',},value: [960, 755],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "桃花潭",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'bottom',},value: [1000, 757],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "浐灞中心",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [1040, 780],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "香湖湾",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [1040, 830],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "务庄",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [1040, 880],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "国际港务区",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [1040, 930],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "双寨",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [1040, 980],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "新筑",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [1040, 1030],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},{name: "保税区",symbol: 'circle',symbolSize: [25, 25],label: {color: "#efefef",position: 'right',},value: [1040, 1080],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#FF00FF"},{offset: 1,color: "#FF00FF"}])}}},//地铁四号线{name: "大唐芙蓉园",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [730, 300],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "曲江池西",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [730, 250],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "金滹沱",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [730, 200],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "航天大道",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [730, 150],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "飞天路",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [730, 100],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "东长安街",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [730, 50],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "神舟大道",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'bottom',},value: [820, 30],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "航天东路",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'bottom',},value: [920, 30],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "航天新城",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'bottom',},value: [1020, 30],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "西安科技大学",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [730, 400],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "建筑科技大学",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [730, 450],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "和平门",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [730, 500],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "大差市",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [730, 550],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "火车站",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [730, 660],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "含元殿",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [730, 695],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "大明宫",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [730, 735],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "大明宫北",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [730, 770],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "余家寨",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [730, 805],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "百花村",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [730, 835],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "常青路",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [730, 865],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "市中医院",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [710, 890],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "文景路",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'bottom',},value: [550, 900],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "凤城九路",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'left',},value: [530, 930],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "凤城十二路",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'left',},value: [530, 970],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "元朔路",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'left',},value: [530, 1010],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},{name: "北客站(北广场)",symbol: 'circle',symbolSize: [25, 25],label: {color: "#efefef",position: 'right',},value: [640, 1100],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#48D1CC"},{offset: 1,color: "#48D1CC"}])}}},//机场城际{name: "渭河南",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'bottom',},value: [530, 1120],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#20B2AA"},{offset: 1,color: "#20B2AA"}])}}},{name: "秦宫",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'left',},value: [450, 1145],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#20B2AA"},{offset: 1,color: "#20B2AA"}])}}},{name: "秦汉新城",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'bottom',},value: [380, 1105],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#20B2AA"},{offset: 1,color: "#20B2AA"}])}}},{name: "长陵",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'bottom',},value: [310, 1080],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#20B2AA"},{offset: 1,color: "#20B2AA"}])}}},{name: "摆旗寨",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'bottom',},value: [230, 1070],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#20B2AA"},{offset: 1,color: "#20B2AA"}])}}},{name: "艺术中心",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [170, 1100],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#20B2AA"},{offset: 1,color: "#20B2AA"}])}}},{name: "空港新城",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [120, 1150],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#20B2AA"},{offset: 1,color: "#20B2AA"}])}}},{name: "机场(T5)",symbol: 'circle',symbolSize: [15, 15],label: {color: "#efefef",position: 'right',},value: [80, 1190],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#20B2AA"},{offset: 1,color: "#20B2AA"}])}}},{name: "机场西(T1、T2、T3)",symbol: 'circle',symbolSize: [25, 25],label: {color: "#efefef",position: 'bottom',},value: [20, 1130],x: 1000,y: 1000,fixed: true,category: 2,itemStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#20B2AA"},{offset: 1,color: "#20B2AA"}])}}},];option = ({title: {text: '西安地铁线路图',textStyle: {color: 'white',fontSize: 20},x: 'center',top: 10},//不设置背景颜色就是透明色backgroundColor: '#000',xAxis: {show: false,min: 0,max: 1200,// type: "value",//开启x轴坐标axisPointer: {show: true},},yAxis: {show: false,min: 0,max: 1200,//   type: "value",//开启y轴坐标axisPointer: {show: true},},tooltip: {},//  legend: {//     show: false//  },series: [{type: "graph",zlevel: 5,draggable: false,coordinateSystem: "cartesian2d", //使用二维的直角坐标系(也称笛卡尔坐标系)// edgeSymbolSize: [0, 8], //边两端的标记大小,可以是一个数组分别指定两端,也可以是单个统一指定// edgeLabel: {//   normal: {//     textStyle: {//       fontSize: 60//     }//   }// },symbol: "rect",symbolOffset: ["15%", 0],label: {normal: {show: true}},data: data,links: [{source: "沣河森林公园",target: "北槐"// lineStyle: {//   normal: {//     color: "#12b5d0",////   }// }},{source: "北槐",target: "上林路",lineStyle: {normal: {// color: "#12b5d0",}}},{source: "上林路",target: "沣东自贸园",lineStyle: {normal: {// color: "#12b5d0",}}},{source: "沣东自贸园",target: "后卫寨",lineStyle: {normal: {// color: "#12b5d0",}}},{source: "后卫寨",target: "三桥",lineStyle: {normal: {// color: "#12b5d0",}}},{source: "三桥",target: "皂河",lineStyle: {normal: {// color: "#12b5d0",}}},{source: "皂河",target: "枣园"// lineStyle: {//   normal: {//     color: "#12b5d0",////   }// }},{source: "枣园",target: "汉城路",lineStyle: {normal: {// color: "#12b5d0",}}},{source: "汉城路",target: "开远门",lineStyle: {normal: {// color: "#12b5d0",}}},{source: "开远门",target: "劳动路",lineStyle: {normal: {// color: "#12b5d0",}}},{source: "劳动路",target: "玉祥门",lineStyle: {normal: {// color: "#12b5d0",}}},{source: "玉祥门",target: "洒金桥",lineStyle: {normal: {// color: "#12b5d0",}}},{source: "洒金桥",target: "北大街",lineStyle: {normal: {// color: "#12b5d0",}}},{source: "北大街",target: "五路口",lineStyle: {normal: {// color: "#12b5d0",}}},{source: "五路口",target: "朝阳门",lineStyle: {normal: {// color: "#12b5d0",}}},{source: "朝阳门",target: "康复路",lineStyle: {normal: {// color: "#12b5d0",}}},{source: "康复路",target: "通化门",lineStyle: {normal: {// color: "#12b5d0",}}},{source: "通化门",target: "万寿路",lineStyle: {normal: {// color: "#12b5d0",}}},{source: "万寿路",target: "长乐坡",lineStyle: {normal: {// color: "#12b5d0",}}},{source: "长乐坡",target: "浐河",lineStyle: {normal: {// color: "#12b5d0",}}},{source: "浐河",target: "半坡",lineStyle: {normal: {// color: "#12b5d0",}}},{source: "半坡",target: "纺织城",lineStyle: {normal: {// color: "#12b5d0",}}},//地铁二号线连接{source: "韦曲南",target: "航天城",lineStyle: {normal: {color: "red",}}},{source: "航天城",target: "凤栖原",lineStyle: {normal: {color: "red",}}},{source: "凤栖原",target: "三爻",lineStyle: {normal: {color: "red",}}},{source: "三爻",target: "会展中心",lineStyle: {normal: {color: "red",}}},{source: "会展中心",target: "纬一街",lineStyle: {normal: {color: "red",}}},{source: "纬一街",target: "小寨",lineStyle: {normal: {color: "red",}}},{source: "小寨",target: "体育场",lineStyle: {normal: {color: "red",}}},{source: "体育场",target: "南稍门",lineStyle: {normal: {color: "red",}}},{source: "南稍门",target: "永宁门",lineStyle: {normal: {color: "red",}}},{source: "永宁门",target: "钟楼",lineStyle: {normal: {color: "red",}}},{source: "钟楼",target: "北大街",lineStyle: {normal: {color: "red",}}},{source: "北大街",target: "安远门",lineStyle: {normal: {color: "red",}}},{source: "安远门",target: "龙首原",lineStyle: {normal: {color: "red",}}},{source: "龙首原",target: "大明宫西",lineStyle: {normal: {color: "red",}}},{source: "大明宫西",target: "市图书馆",lineStyle: {normal: {color: "red",}}},{source: "市图书馆",target: "凤城五路",lineStyle: {normal: {color: "red",}}},{source: "凤城五路",target: "行政中心",lineStyle: {normal: {color: "red",}}},{source: "行政中心",target: "运动公园",lineStyle: {normal: {color: "red",}}},{source: "运动公园",target: "北苑",lineStyle: {normal: {color: "red",}}},{source: "北苑",target: "北客站",lineStyle: {normal: {color: "red",}}},{source: "鱼化寨",target: "丈八北路",lineStyle: {normal: {color: "#FF00FF",}}},{source: "丈八北路",target: "延平门",lineStyle: {normal: {color: "#FF00FF",}}},{source: "延平门",target: "科技路",lineStyle: {normal: {color: "#FF00FF",}}},{source: "科技路",target: "太白南路",lineStyle: {normal: {color: "#FF00FF",}}},{source: "太白南路",target: "吉祥村",lineStyle: {normal: {color: "#FF00FF",}}},{source: "吉祥村",target: "小寨",lineStyle: {normal: {color: "#FF00FF",}}},{source: "小寨",target: "大雁塔",lineStyle: {normal: {color: "#FF00FF",}}},{source: "大雁塔",target: "北池头",lineStyle: {normal: {color: "#FF00FF",}}},{source: "北池头",target: "青龙寺",lineStyle: {normal: {color: "#FF00FF",}}},{source: "青龙寺",target: "延兴门",lineStyle: {normal: {color: "#FF00FF",}}},{source: "延兴门",target: "咸宁路",lineStyle: {normal: {color: "#FF00FF",}}},{source: "咸宁路",target: "长乐公园",lineStyle: {normal: {color: "#FF00FF",}}},{source: "长乐公园",target: "通化门",lineStyle: {normal: {color: "#FF00FF",}}},{source: "通化门",target: "胡家庙",lineStyle: {normal: {color: "#FF00FF",}}},{source: "胡家庙",target: "石家街",lineStyle: {normal: {color: "#FF00FF",}}},{source: "石家街",target: "辛家庙",lineStyle: {normal: {color: "#FF00FF",}}},{source: "辛家庙",target: "广泰门",lineStyle: {normal: {color: "#FF00FF",}}},{source: "广泰门",target: "桃花潭",lineStyle: {normal: {color: "#FF00FF",}}},{source: "桃花潭",target: "浐灞中心",lineStyle: {normal: {color: "#FF00FF",}}},{source: "浐灞中心",target: "香湖湾",lineStyle: {normal: {color: "#FF00FF",}}},{source: "香湖湾",target: "务庄",lineStyle: {normal: {color: "#FF00FF",}}},{source: "务庄",target: "国际港务区",lineStyle: {normal: {color: "#FF00FF",}}},{source: "国际港务区",target: "双寨",lineStyle: {normal: {color: "#FF00FF",}}},{source: "双寨",target: "新筑",lineStyle: {normal: {color: "#FF00FF",}}},{source: "新筑",target: "保税区",lineStyle: {normal: {color: "#FF00FF",}}},//地铁四号线和机场城际的连线{source: "航天新城",target: "航天东路",lineStyle: {normal: {color: "#48D1CC",}}},{source: "航天东路",target: "神舟大道",lineStyle: {normal: {color: "#48D1CC",}}},{source: "神舟大道",target: "东长安街",lineStyle: {normal: {color: "#48D1CC",}}},{source: "东长安街",target: "飞天路",lineStyle: {normal: {color: "#48D1CC",}}},{source: "飞天路",target: "航天大道",lineStyle: {normal: {color: "#48D1CC",}}},{source: "航天大道",target: "金滹沱",lineStyle: {normal: {color: "#48D1CC",}}},{source: "金滹沱",target: "曲江池西",lineStyle: {normal: {color: "#48D1CC",}}},{source: "曲江池西",target: "大唐芙蓉园",lineStyle: {normal: {color: "#48D1CC",}}},{source: "大唐芙蓉园",target: "大雁塔",lineStyle: {normal: {color: "#48D1CC",}}},{source: "大雁塔",target: "西安科技大学",lineStyle: {normal: {color: "#48D1CC",}}},{source: "西安科技大学",target: "建筑科技大学",lineStyle: {normal: {color: "#48D1CC",}}},{source: "建筑科技大学",target: "和平门",lineStyle: {normal: {color: "#48D1CC",}}},{source: "和平门",target: "大差市",lineStyle: {normal: {color: "#48D1CC",}}},{source: "大差市",target: "五路口",lineStyle: {normal: {color: "#48D1CC",}}},{source: "五路口",target: "火车站",lineStyle: {normal: {color: "#48D1CC",}}},{source: "火车站",target: "含元殿",lineStyle: {normal: {color: "#48D1CC",}}},{source: "含元殿",target: "大明宫",lineStyle: {normal: {color: "#48D1CC",}}},{source: "大明宫",target: "大明宫北",lineStyle: {normal: {color: "#48D1CC",}}},{source: "大明宫北",target: "余家寨",lineStyle: {normal: {color: "#48D1CC",}}},{source: "余家寨",target: "百花村",lineStyle: {normal: {color: "#48D1CC",}}},{source: "百花村",target: "常青路",lineStyle: {normal: {color: "#48D1CC",}}},{source: "常青路",target: "市中医院",lineStyle: {normal: {color: "#48D1CC",}}},{source: "市中医院",target: "行政中心",lineStyle: {normal: {color: "#48D1CC",}}},{source: "行政中心",target: "文景路",lineStyle: {normal: {color: "#48D1CC",}}},{source: "文景路",target: "凤城九路",lineStyle: {normal: {color: "#48D1CC",}}},{source: "凤城九路",target: "凤城十二路",lineStyle: {normal: {color: "#48D1CC",}}},{source: "凤城十二路",target: "元朔路",lineStyle: {normal: {color: "#48D1CC",}}},{source: "元朔路",target: "北客站(北广场)",lineStyle: {normal: {color: "#48D1CC",}}},//机场城际各站点连线{source: "北客站(北广场)",target: "渭河南",lineStyle: {normal: {color: "#48D1CC",}}},{source: "渭河南",target: "秦宫",lineStyle: {normal: {color: "#48D1CC",}}},{source: "秦宫",target: "秦汉新城",lineStyle: {normal: {color: "#48D1CC",}}},{source: "秦汉新城",target: "长陵",lineStyle: {normal: {color: "#48D1CC",}}},{source: "长陵",target: "摆旗寨",lineStyle: {normal: {color: "#48D1CC",}}},{source: "摆旗寨",target: "艺术中心",lineStyle: {normal: {color: "#48D1CC",}}},{source: "艺术中心",target: "空港新城",lineStyle: {normal: {color: "#48D1CC",}}},{source: "空港新城",target: "机场(T5)",lineStyle: {normal: {color: "#48D1CC",}}},{source: "机场(T5)",target: "机场西(T1、T2、T3)",lineStyle: {normal: {color: "#48D1CC",}}},],lineStyle: {normal: {opacity: 0.6, //线条透明度color: "#53B5EA",curveness: 0, //站点间连线曲度,0表示直线width: 10 //线条宽度}}}, {type: "lines",coordinateSystem: "cartesian2d",z: 1,zlevel:7,animation: true,effect: {show: true,period: 5,trailLength: 0.71,symbolSize: 14,symbol: "circle",loop: true,color: 'yellow'//   color: "rgba(55,155,255,0.5)"},lineStyle: {normal: {// color: "green",width: 0,curveness: 0  //动画线路的曲度}},data: [{  //一号线coords: [[5, 600],[1130, 600]]},{  //二号线coords: [[680, 50],[680, 1050]]},//   {  //三号线//     coords: [//       [280, 350],//       [1040, 1080]//     ]//   }]},]
});

更多类型的echarts图入口

echarts实现西安地铁图相关推荐

  1. 基于ECharts的职位地铁图的实现

    目的 现在有一个需求,是要实现如下图所示的一个职位地铁图,用来表示公司所有的职位情况,其中黄色表示经历过的职位,绿色表示当前的职位,实现的方法可能包括canvas绘制甚至是一个个div拼凑而成,本篇文 ...

  2. 西安建6条地铁考验文物保护(组图)-西安-地铁-文物

    西安建6条地铁考验文物保护(组图)|西安|地铁|文物 为了保护文物,西安地铁开挖较深. 西安地铁盾构施工. 绕钟楼 过阿房宫 穿长安城 经帝王陵 西安修首条地铁与文物保护相协调 地铁开挖前先考古避让文 ...

  3. Leaflet中使用leaflet-echarts插件实现Echarts的Migration迁徙图(带炫光特效)

    场景 Leaflet中使用leaflet-echarts插件实现Echarts的Migration迁徙图: Leaflet中使用leaflet-echarts插件实现Echarts的Migration ...

  4. 西安地铁行业投融资状况与发展策略建议报告2022版

    西安地铁行业投融资状况与发展策略建议报告2022版 HS--HS--HS--HS--HS--HS--HS--HS--HS--HS--HS--HS-- [修订日期]:2021年11月 [搜索鸿晟信合研究 ...

  5. 迪杰斯特拉算法-西安地铁最短路线问题

    文章说明 图是一种较线性表和树更为复杂的数据结构,在各个领域都有着广泛的应用,如城市交通.电路网络分析.交通灯的设置等,其中,最短路径问题的求解是日常生活中最为常见的问题.在现实生活和生产实践中,有许 ...

  6. 地铁闸门会夹伤人吗_西安地铁率先推出分类垃圾箱 四种类型你会放吗?

    垃圾分类就是新时尚[西安地铁率先推出分类垃圾箱 四种类型你会放吗?]近日,不少上海人已被垃圾分类"逼疯",各类段子刷爆网络."你是什么垃圾?"直击灵魂深处的拷问 ...

  7. 公路图和地铁图有什么区别?

    本文转载自:彭翕成讲数学(pengxichengmath) 彭翕成注: 不知道你注意过没有,公路图和地铁图有什么区别? 公路图是根据实际情况按比例缩放画出.所以你看到的就是弯弯曲曲的. 而地铁图则看上 ...

  8. echarts 堆叠树状图排序

    echarts 堆叠树状图.没有相关的配置API,要自己先把数据排好,再传到数据配置中... 未排序: 它的配置项: option = {tooltip: {trigger: 'axis',axisP ...

  9. layui + echarts股票K线图(含案例、代码、截图)(转载篇)

    文章目录 layui + echarts股票K线图(含案例.代码.截图)(转载篇) 一.案例.代码.截图 经验 · 补充说明: layui + echarts股票K线图(含案例.代码.截图)(转载篇) ...

最新文章

  1. 都996了,需求还是没法按时交付,怎么办?
  2. dapper 注意事项之GUID
  3. Linux程序内存跟踪,分享一款Linux进程和内存活动监视神器
  4. DataGridView 用户输入时,单元格输入值的设定
  5. 硬盘的原理以及SQL Server如何利用硬盘原理减少IO
  6. 【做题记录】图论杂题
  7. php背景图添加字,怎样给视频后面加背景图 视频加背景图片并添加一行广告文字...
  8. JQuery Datatables editor 本地编辑功能
  9. 计算机安装应用程序卸的步骤,电脑软件怎么卸载,干货在这里,如何卸载电脑上安装的软件...
  10. Voleon Group:一家『纯』用机器学习策略的对冲基金
  11. 【NOIP2012-Day2-T2-换教室】
  12. 手把手教你写一个web聊天室之bookstap框架
  13. CentOS7.5.1804 Minimal 静默安装oracle 12c R1企业版
  14. C++:乱码之字符串编码
  15. 如何查询一个 app 的 Android 和 iOS 下载量?
  16. IDEA惊天bug:进程已结束,退出代码-1073741819 (0xC0000005)
  17. 可以打勾的计划表app?标记完成计划试试这款便签
  18. Mysql-12章-函数和操作符 (翻译+理解)
  19. element ui textarea实现输入字数统计
  20. 比特币钱包开发:通过助记词扩展子地址的原理与编码

热门文章

  1. AD设计图纸模板创建(转)
  2. 业精于勤,荒于嬉;行成于思,毁于随
  3. 【SoC FPGA学习】五、基于虚拟地址映射的 Linux 硬件编程,在已有工程上实现按键与LED的联动
  4. 二进制数求反(C语言)
  5. GRE考试中--名词与动词的关系讲解
  6. HTML简洁单页网址导航模板
  7. 嵌入式Linux学习笔记(1-2)——vi编辑器
  8. C语言入门 -- 数字的两种读法(2021/1/7)
  9. [安卓刷机实战]小米/红米手机刷机降系统图文教程-解锁小米手机-K30 5G版[开箱可用][解锁+刷机全步骤教程]
  10. 移动互联网——2011年最值得关注的100个应用程序(目录)