配置项如下
app.title = '折柱混合';
//已修正
option = {
tooltip: {
trigger: 'axis'
},
dataZoom: [
{ // 这个dataZoom组件,默认控制x轴。
type: 'slider', // 这个 dataZoom 组件是 slider 型 dataZoom 组件
start: 10, // 左边在 10% 的位置。
end: 60 // 右边在 60% 的位置。
},
{ // 这个dataZoom组件,也控制x轴。
type: 'inside', // 这个 dataZoom 组件是 inside 型 dataZoom 组件
start: 10, // 左边在 10% 的位置。
end: 60 // 右边在 60% 的位置。
}
],
toolbox: {
feature: {
dataView: {show: true, readOnly: false},
magicType: {show: true, type: ['line', 'bar']},
restore: {show: true},
saveAsImage: {show: true}
}
},
legend: {
data:['Time','speed(m/min)']
},
xAxis: [
{
type: 'category',
data: [
'2015-08-12 17:35:03',
'2015-08-12 17:50:03',
'2015-08-12 18:05:03',
'2015-08-12 18:20:03',
'2015-08-12 18:35:03',
'2015-08-12 18:50:03',
'2015-08-12 19:05:03',
'2015-08-12 19:20:03',
'2015-08-12 19:35:03',
'2015-08-12 19:50:03',
'2015-08-12 20:05:03',
'2015-08-12 20:20:03',
'2015-08-12 20:35:03',
'2015-08-12 20:50:03',
'2015-08-12 21:05:03',
'2015-08-12 21:20:03',
'2015-08-12 21:35:03',
'2015-08-12 21:50:03',
'2015-08-12 22:05:03',
'2015-08-12 22:20:03',
'2015-08-12 22:35:03',
'2015-08-12 22:50:03',
'2015-08-12 23:05:03',
'2015-08-12 23:20:03',
'2015-08-12 23:35:03',
'2015-08-12 23:50:03',
'2015-08-13 00:05:03',
'2015-08-13 00:20:03',
'2015-08-13 00:35:03',
'2015-08-13 00:50:03',
'2015-08-13 01:05:03',
'2015-08-13 01:20:03',
'2015-08-13 01:35:03',
'2015-08-13 01:50:03',
'2015-08-13 02:05:03',
'2015-08-13 02:20:03',
'2015-08-13 02:35:03',
'2015-08-13 02:50:03',
'2015-08-13 03:05:03',
'2015-08-13 03:20:03',
'2015-08-13 03:35:03',
'2015-08-13 03:50:03',
'2015-08-13 04:05:03',
'2015-08-13 04:20:03',
'2015-08-13 04:35:03',
'2015-08-13 04:50:03',
'2015-08-13 05:05:03',
'2015-08-13 05:20:03',
'2015-08-13 05:35:03',
'2015-08-13 05:50:03',
'2015-08-13 06:05:03',
'2015-08-13 06:20:03',
'2015-08-13 06:35:03',
'2015-08-13 06:50:03',
'2015-08-13 07:05:03',
'2015-08-13 07:20:03',
'2015-08-13 07:35:03',
'2015-08-13 07:50:03',
'2015-08-13 08:05:03',
'2015-08-13 08:20:03',
'2015-08-13 08:35:03',
'2015-08-13 08:50:03',
'2015-08-13 09:05:03',
'2015-08-13 09:20:03',
'2015-08-13 09:35:03',
'2015-08-13 09:50:03',
'2015-08-13 10:05:03',
'2015-08-13 10:20:03',
'2015-08-13 10:35:03',
'2015-08-13 10:50:03',
'2015-08-13 11:05:03',
'2015-08-13 11:20:03',
'2015-08-13 11:35:03',
'2015-08-13 11:50:03',
'2015-08-13 12:05:03',
'2015-08-13 12:20:03',
'2015-08-13 12:35:03',
'2015-08-13 12:50:03',
'2015-08-13 13:05:03',
'2015-08-13 13:20:03',
'2015-08-13 13:35:03',
'2015-08-13 13:50:03',
'2015-08-13 14:05:03',
'2015-08-13 14:20:03',
'2015-08-13 14:35:03',
'2015-08-13 14:50:03',
'2015-08-13 15:05:03',
'2015-08-13 15:20:03',
'2015-08-13 15:35:03',
'2015-08-13 15:50:03',
'2015-08-13 16:05:03',
'2015-08-13 16:20:03',
'2015-08-13 16:35:03',
'2015-08-13 16:50:03',
'2015-08-13 17:05:03',
'2015-08-13 17:20:03',
'2015-08-13 17:35:03',
'2015-08-13 17:50:03',
'2015-08-13 18:05:03',
'2015-08-13 18:20:03',
'2015-08-13 18:35:03',
'2015-08-13 18:50:03',
'2015-08-13 19:05:03',
'2015-08-13 19:20:03',
'2015-08-13 19:35:03',
'2015-08-13 19:50:03',
'2015-08-13 20:05:03',
'2015-08-13 20:20:03',
'2015-08-13 20:35:03',
'2015-08-13 20:50:03',
'2015-08-13 21:05:03',
'2015-08-13 21:20:03',
'2015-08-13 21:35:03',
'2015-08-13 21:50:03',
'2015-08-13 22:05:03',
'2015-08-13 22:20:03',
'2015-08-13 22:35:03',
'2015-08-13 22:50:03',
'2015-08-13 23:05:03',
]
}
],
yAxis: [
{
type: 'value',
name: 'group',
min: 0,
max: 1000,
axisLabel: {
formatter: 'number '
}
},
{
type: 'value',
name: 'speed(m/min)',
min: 0,
max: 1000,
axisLabel: {
formatter: '{value}m/min '
}
}
],
series: [
{
name:'group',
type:'bar',
yAxisIndex: 1,
data:[1, 2, 2, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 229, 211, 180, 149, 115, 92, 67, 52, 30, 17, 14, 10, 7, 6, 5, 5, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 6, 6, 6, 6, 11, 25, 50, 83, 125, 163, 217, 265, 328, 362, 434, 457, 480, 489, 503, 488, 487, 485, 472, 465, 439, 441, 423, 413, 397, 374, 357, 336, 315, 299, 284, 288, 276, 275, 263, 280, 282, 284, 292, 299, 299, 314, 325, 349, 359, 365, 394, 409, 424, 441, 462, 478, 468, 473, 469, 468, 441, 427, 403, 363, 356, 339, 314, 290, 261, 250, 235, 207, 176, 141, 117, 94, 70, 43
]
},
{
name:'speed(m/min)',
type:'line',
data:[279.42709854712115, 304.08242229654564, 336.0518750223682, 408.3067268151232, 1.2191575683256748, 0, 0, 0, 0, 289.2186867112427, 323.2760195195567, 261.0740346211636, 292.9646407244956, 266.2043967047769, 188.64685982629416, 230.70300008842642, 232.03365932626363, 225.0699754239335, 211.13535313335768, 204.93344654566488, 183.12426152712854, 149.13046296562368, 84.96656950307366, 91.68209685780363, 89.95493351658526, 79.65284774639896, 87.2696373836412, 98.55786313312464, 60.40985635161774, 2.3293999755437693, 2.8091721371410707, 60.53475878927281, 46.97173599375631, 51.40519606199535, 54.07381041224398, 45.404775593560295, 1.8077426340639366, 1.7659123790840927, 1.3630321009295876, 1.939639576387212, 2.1807889310446154, 44.85104422091619, 38.56373596401792, 49.164608391738504, 45.19794599579322, 33.936270325317885, 28.037341286675943, 128.83671371233632, 184.12648543677346, 220.18415535196016, 235.5734895210424, 249.27279410666992, 255.74808972330163, 258.9259256364895, 258.55282982701556, 252.10305235282883, 246.04610889978417, 245.5648053586891, 237.81586994800003, 236.01281008697316, 234.67749451696272, 232.56958960768065, 229.69919685829117, 223.58683225135528, 226.07278774247942, 227.38188233943248, 230.14571079384078, 224.98846859830505, 233.71911571118193, 229.44882886873697, 231.46621836521018, 226.03020997398494, 235.09231604184356, 240.08217151685542, 244.71332843903315, 245.0270763673084, 228.69468864450977, 228.2328555007145, 235.8972572205178, 226.13282708566726, 222.64101256055608, 227.84299517206972, 232.80509546271853, 248.34163330574216, 242.66879453993613, 246.2405842176031, 254.54321978174522, 237.61128219624112, 242.41332934075, 236.5360491069628, 243.78068993603736, 247.77503131183775, 245.14169136970713, 252.17924363266215, 235.79398428000292, 240.26039840938316, 231.55031417476928, 224.51530321636014, 224.2092406451564, 231.38932487384764, 231.16440133155905, 232.5154516945124, 238.21765800819912, 238.73862143279916, 241.02371836833328, 235.64985939292438, 229.57825631921196, 235.15523119369047, 243.7704304867546, 238.7626237224111, 233.37923433879826, 238.9586003780096, 245.04563515421754, 234.56163445617113, 220.4875861247288, 201.16861003562516, 157.746864941227, 134.15061975288248, 88.70937215471618
]
}
]
};