配置项如下
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-16 17:35:03',
'2015-08-16 17:50:03',
'2015-08-16 18:05:03',
'2015-08-16 18:20:03',
'2015-08-16 18:35:03',
'2015-08-16 18:50:03',
'2015-08-16 19:05:03',
'2015-08-16 19:20:03',
'2015-08-16 19:35:03',
'2015-08-16 19:50:03',
'2015-08-16 20:05:03',
'2015-08-16 20:20:03',
'2015-08-16 20:35:03',
'2015-08-16 20:50:03',
'2015-08-16 21:05:03',
'2015-08-16 21:20:03',
'2015-08-16 21:35:03',
'2015-08-16 21:50:03',
'2015-08-16 22:05:03',
'2015-08-16 22:20:03',
'2015-08-16 22:35:03',
'2015-08-16 22:50:03',
'2015-08-16 23:05:03',
'2015-08-16 23:20:03',
'2015-08-16 23:35:03',
'2015-08-16 23:50:03',
'2015-08-17 00:05:03',
'2015-08-17 00:20:03',
'2015-08-17 00:35:03',
'2015-08-17 00:50:03',
'2015-08-17 01:05:03',
'2015-08-17 01:20:03',
'2015-08-17 01:35:03',
'2015-08-17 01:50:03',
'2015-08-17 02:05:03',
'2015-08-17 02:20:03',
'2015-08-17 02:35:03',
'2015-08-17 02:50:03',
'2015-08-17 03:05:03',
'2015-08-17 03:20:03',
'2015-08-17 03:35:03',
'2015-08-17 03:50:03',
'2015-08-17 04:05:03',
'2015-08-17 04:20:03',
'2015-08-17 04:35:03',
'2015-08-17 04:50:03',
'2015-08-17 05:05:03',
'2015-08-17 05:20:03',
'2015-08-17 05:35:03',
'2015-08-17 05:50:03',
'2015-08-17 06:05:03',
'2015-08-17 06:20:03',
'2015-08-17 06:35:03',
'2015-08-17 06:50:03',
'2015-08-17 07:05:03',
'2015-08-17 07:20:03',
'2015-08-17 07:35:03',
'2015-08-17 07:50:03',
'2015-08-17 08:05:03',
'2015-08-17 08:20:03',
'2015-08-17 08:35:03',
'2015-08-17 08:50:03',
'2015-08-17 09:05:03',
'2015-08-17 09:20:03',
'2015-08-17 09:35:03',
'2015-08-17 09:50:03',
'2015-08-17 10:05:03',
'2015-08-17 10:20:03',
'2015-08-17 10:35:03',
'2015-08-17 10:50:03',
'2015-08-17 11:05:03',
'2015-08-17 11:20:03',
'2015-08-17 11:35:03',
'2015-08-17 11:50:03',
'2015-08-17 12:05:03',
'2015-08-17 12:20:03',
'2015-08-17 12:35:03',
'2015-08-17 12:50:03',
'2015-08-17 13:05:03',
'2015-08-17 13:20:03',
'2015-08-17 13:35:03',
'2015-08-17 13:50:03',
'2015-08-17 14:05:03',
'2015-08-17 14:20:03',
'2015-08-17 14:35:03',
'2015-08-17 14:50:03',
'2015-08-17 15:05:03',
'2015-08-17 15:20:03',
'2015-08-17 15:35:03',
'2015-08-17 15:50:03',
'2015-08-17 16:05:03',
'2015-08-17 16:20:03',
'2015-08-17 16:35:03',
'2015-08-17 16:50:03',
'2015-08-17 17:05:03',
'2015-08-17 17:20:03',
'2015-08-17 17:35:03',
'2015-08-17 17:50:03',
'2015-08-17 18:05:03',
'2015-08-17 18:20:03',
'2015-08-17 18:35:03',
'2015-08-17 18:50:03',
'2015-08-17 19:05:03',
'2015-08-17 19:20:03',
'2015-08-17 19:35:03',
'2015-08-17 19:50:03',
'2015-08-17 20:05:03',
'2015-08-17 20:20:03',
'2015-08-17 20:35:03',
'2015-08-17 20:50:03',
'2015-08-17 21:05:03',
'2015-08-17 21:20:03',
'2015-08-17 21:35:03',
'2015-08-17 21:50:03',
'2015-08-17 22:05:03',
'2015-08-17 22:20:03',
'2015-08-17 22:35:03',
'2015-08-17 22:50:03',
'2015-08-17 23:05:03',
]
}
],
yAxis: [
{
type: 'value',
name: 'group',
min: 0,
max: 1000,
axisLabel: {
formatter: '{value} '
}
},
{
type: 'value',
name: 'speed(m/min)',
min: 0,
max: 5000,
axisLabel: {
formatter: '{value}m/min '
}
}
],
series: [
{
name:'group',
type:'bar',
//yAxisIndex: 1,
data:[0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 1, 1, 2, 3, 168, 181, 157, 133, 112, 86, 65, 51, 31, 20, 11, 8, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 11, 17, 50, 80, 122, 170, 237, 282, 340, 395, 429, 466, 496, 506, 510, 517, 513, 514, 511, 489, 483, 460, 428, 434, 410, 395, 384, 364, 332, 310, 286, 279, 273, 273, 264, 269, 275, 271, 284, 298, 315, 328, 333, 350, 361, 377, 387, 414, 435, 449, 466, 478, 491, 482, 485, 479, 467, 450, 435, 391, 375, 344, 329, 300, 281, 251, 234, 203, 180, 150, 88, 0, 0, 0
]},
{
name:'speed(m/min)',
type:'line',
data:[0, 0, 0, 0, 0, 0, 227.82355380126083, 237.8659823234923, 199.49864307617344, 287.0708278036585, 276.27540799011854, 347.70086538651816, 8.655491714629036, 366.23614826830766, 137.8481730582628, 248.17166732770943, 249.6966348043329, 252.33629090942543, 228.18814049111631, 201.49800010196392, 181.9562628207755, 150.28269535851766, 99.0069421422894, 64.60966599035699, 72.15691050510091, 60.50911954570949, 36.50311683229495, 83.95908861824323, 59.11451393693206, 59.38562322524864, 12.304875087036685, 11.41960750780368, 7.1763885840623045, 15.853765915005502, 14.553784398920502, 11.24476995775124, 10.493815983386368, 6.580255255281702, 7.924193008472467, 7.860908823535551, 7.512662826485323, 10.251729467286651, 8.747917223141608, 41.28481248898486, 47.65971355436833, 25.925987340436688, 39.58313940752845, 118.38254365844925, 186.44973381541024, 215.72823122857577, 220.09942060744456, 239.54047744772976, 253.29463743364252, 244.34438371609764, 245.99125132865916, 240.11834235667135, 229.44692114260434, 219.85766482583165, 217.89251130423074, 221.16703601514408, 221.69515261135848, 227.80821625355637, 236.338439335364, 238.01225455398742, 230.1826602698935, 235.58689661830107, 242.12922692929527, 238.98659390043198, 238.42471121258566, 242.05437827688098, 242.0667928432824, 225.05938902943237, 240.90787108625966, 227.09585748510563, 231.3539057879352, 241.98544386897137, 224.9792184079468, 230.72062048837338, 238.19505336049417, 234.38811348044192, 227.8604833059007, 225.50143948735814, 232.7218089898096, 237.58544271343936, 236.65480533693062, 240.59277263214233, 236.0716397922824, 252.12435787231854, 251.0851480985439, 246.2734395627766, 249.2972341884837, 256.9838216705094, 249.7037909204906, 244.1306709400694, 242.90545189591552, 241.37151933023674, 231.57121754569172, 227.24787169301342, 223.621595331004, 232.90196740232102, 224.14734285626773, 226.45619821940662, 234.71478059848906, 229.87001545729166, 225.7467840625839, 229.43158941156852, 236.3230482851222, 233.57830738486123, 237.20292969702803, 230.20862742465633, 239.45668335419663, 241.77482059858778, 237.31338772718794, 220.96011697778965, 215.1637504698554, 198.76301626386396, 0, 0, 0
]}
]
};