地铁最后一班的线路图
配置项如下
option = {
title: {
text: '深圳地铁1号线(罗宝线)线路图'
},
tooltip: {
trigger: 'axis'
},
legend: {
right: 50,
data: ['首班车', '末班车']
},
toolbox: {
feature: {
saveAsImage: {}
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: [{
type: 'category',
// boundaryGap: false,
data: ['罗湖', '国贸', '老街', '大剧院', '科学馆', '华强路', '岗厦', '会展中心', '购物公园', '香蜜湖', '车公庙', '竹子林', '侨城东', '华侨城', '世界之窗', '白石洲', '高新园', '深大', '桃园', '大新', '鲤鱼门', '前海湾', '新安', '宝安中心', '宝体', '坪洲', '西乡', '固戍', '后瑞', '机场东']
}],
yAxis: [{
type: 'value',
max: 24,
axisLabel: {
formatter(value, index) {
return value + ':00'
}
}
}],
series: [{
name: '首班车',
type: 'line',
label: {
normal: {
show: true,
position: 'top',
formatter(obj) {
return obj.value
}
}
},
// areaStyle: {normal: {}},
data: ['06.30', '06.32', '06.33', '06.36', '06.38', '06.40', '06.43', '06.45', '06.46', '06.49', '06.51', '06.54', '06.32', '06.34', '06.36', '06.38', '06.40', '06.31', '06.34', '06.36', '06.38', '06.42', '06.30', '06.32', '06.34', '06.36', '06.38', '06.42', '06.46', '——']
}, {
name: '末班车',
type: 'line',
label: {
normal: {
show: true,
position: 'top',
formatter(obj) {
return obj.value
}
}
},
data: ['23.00', '23.02', '23.04', '23.06', '23.08', '23.10', '23.13', '23.15', '23.16', '23.19', '23.21', '23.24', '23.26', '23.28', '23.30', '23.32', '23.35', '23.37', '23.40', '23.42', '23.44', '23.45', '23.48', '23.50', '23.52', '23.54', '23.56', '00.00', '00.04', '—']
}]
}