配置项如下
option = {
tooltip: {
trigger: 'axis'
},
toolbox: {
show : true,
feature : {
dataView : {show: true},
restore : {show: true},
saveAsImage : {
pixelRatio:5} //值越大分辨率越高
}
},
legend: {
itemHeight: 25,
data: ['实际排队长度', '分车队预测排队长度','不分车队预测排队长度'],
textStyle:{
fontSize:15,
}
},
xAxis: {
nameTextStyle:{
fontSize:20
},
name:'周期数',
type: 'category',
axisLine:{
lineStyle:{
width:4,
color:'#000'
}
},
data: ['T1','T2','T3','T4','T5','T6','T7','T8','T9','T10',
'T11','T12','T13','T14','T15','T16','T17','T18','T19','T20',
'T21','T22','T23','T24','T25','T26','T27','T28','T29','T30',
'T31','T32','T33','T34','T35','T36','T37','T38','T39','T40',
'T41','T42','T43','T44','T45','T46','T47','T48','T49','T50',
'T51','T52','T53','T54','T55','T56','T57','T58','T59','T60',
'T61','T62','T63','T64','T65','T66','67','T68','T69','T70','T71','T72'],
axisLabel: {
show: true,
textStyle:{
color:'#000',
fontSize:10},
interval:0,
rotate:90
},
},
yAxis: {
splitLine:{
show:true,
lineStyle:{type:'dashed',color:'#315070'}
},
axisLabel:{
textStyle:{
fontSize:15
}
},
nameTextStyle:{
fontSize:20,
},
name:'排队长度(m)',
min:20,
max:120,
type: 'value',
axisLine:{
show:true,
lineStyle:{
width:2,
color:'#000'
}
},
},
series: [{
name:"实际排队长度",
data: [57.76501594,61.67705464,56.82777106,49.68740931
,49.28711945,51.86265299,49.22924759,51.47259736
,58.90273938,47.15784943,49.75768295,52.30838547
,51.97476387,50.64877535,53.12716071,49.41055461
,72.70966852,64.62101034,63.65124357,48.29977676
,65.03972473,50.15419897,51.86777745,52.02491404
,66.00710299,76.49554672,50.08350889,75.58290197
,48.85405759,49.80544885,55.27379705,72.80001125
,52.21518541,49.63743339,49.32587044,59.69738462
,61.06725917,47.27999131,47.17570825,47.44944803
,87.93028943,50.69982924,93.44619443,60.08757176
,57.11158137,51.74114203,50.59754052,63.54744179
,49.89670512,48.79965404,49.08098554,53.05477014
,58.06347234,75.73131817,51.90567653,51.82370396
,50.07026079,47.54960574,54.94712938,60.64041841
,60.14779747,50.38031882,58.0533182,52.18519111
,48.45082149,67.37264792,46.98958323,50.5131156
,59.86547232,55.85214978,52.12554301,58.5739455],
type: 'line',
symbol:'pin',
symbolSize: 10,
lineStyle: {
color: '#6495ED',
width: 3,
},
itemStyle: {
borderWidth: 3,
borderColor: '#6495ED',
color: '#6495ED'
}
}, {name:"分车队预测排队长度",
data: [54.76186376,66.02581708,60.84127655,63.66154054,
59.3088165,0,49.77973466,59.79494375,
53.18020448,47.34460999,58.01444176,0,
51.58139126,55.51368407,54.87667116,50.35354134,
63.390315,70.36868261,74.61015886,61.157764,
50.24891148,58.82458902,59.54341558,73.51257006,
78.25422851,83.31775892,54.1689776,73.3397823,
59.59201957,60.75245525,60.04033925,62.20979501,
56.91639687,48.99218245,51.69649819,77.23187491,
71.40324202,50.77166484,58.11755667,46.77470188,
64.0269985,75.2551766,80.65720123,56.67633634,
0,60.69408533,62.31514652,74.8011535,
52.96929005,57.49205393,55.77692488,56.04031396,
62.20367043,74.11505696,63.42186721,61.01942428,
63.5757696,0,68.9956974,0,
0,50.59148343,51.66487196,57.46994941,
56.05970278,65.7764721,45.55880053,88.3761996,
58.5336103,57.60672576,57.3081727,0],
type: 'bar',
symbolSize: 10,
lineStyle: {
color: '#cc00cc',
width: 4,
},
itemStyle: {
borderWidth: 3,
borderColor: '#d56641',
color:'#d56641'
}
},
{name:"不分车队预测排队长度",
data: [54.07450309,76.97456956,61.25302513,63.66154054,
59.24542758,0,49.55492289,52.81831848,
52.88370877,47.34460999,57.08855572,0,
27.2271721,51.49651479,54.87039896,45.57452449,
59.55981512,70.70106636,78.90194602,61.6248958,
45.6655433,73.6181821,58.34439007,44.20447627,
63.466514,80.79219015,55.21705916,53.98128912,
52.89037414,86.54382597,53.10772142,55.94337875,
54.06866681,52.14926468,50.10227999,48.56142998,
72.81917308,51.12303836,58.11755667,69.93,
42.94533553,85.72853987,83.13960764,59.69337572,
0,68.23095074,68.52658972,78.2207146,
55.0404259,57.72382423,55.77079604,56.00234034,
58.87914888,74.0533718,64.39657617,57.40708191,
70.70002632,0,68.99569838,0,
0,64.24976854,55.53934697,56.34776856,
54.96699374,66.70958765,45.55880053,77.81845819,
51.93067255,58.56458754,64.3081727,0],
type: 'bar',
symbolSize: 10,
lineStyle: {
color: '#d56600',
width: 4,
},
itemStyle: {
borderWidth: 3,
borderColor: '#006600',
color:'#006600'
}
}],
};