配置项如下
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-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',
'2015-08-17 23:20:03',
'2015-08-17 23:35:03',
'2015-08-17 23:50:03',
'2015-08-18 00:05:03',
'2015-08-18 00:20:03',
'2015-08-18 00:35:03',
'2015-08-18 00:50:03',
'2015-08-18 01:05:03',
'2015-08-18 01:20:03',
'2015-08-18 01:35:03',
'2015-08-18 01:50:03',
'2015-08-18 02:05:03',
'2015-08-18 02:20:03',
'2015-08-18 02:35:03',
'2015-08-18 02:50:03',
'2015-08-18 03:05:03',
'2015-08-18 03:20:03',
'2015-08-18 03:35:03',
'2015-08-18 03:50:03',
'2015-08-18 04:05:03',
'2015-08-18 04:20:03',
'2015-08-18 04:35:03',
'2015-08-18 04:50:03',
'2015-08-18 05:05:03',
'2015-08-18 05:20:03',
'2015-08-18 05:35:03',
'2015-08-18 05:50:03',
'2015-08-18 06:05:03',
'2015-08-18 06:20:03',
'2015-08-18 06:35:03',
'2015-08-18 06:50:03',
'2015-08-18 07:05:03',
'2015-08-18 07:20:03',
'2015-08-18 07:35:03',
'2015-08-18 07:50:03',
'2015-08-18 08:05:03',
'2015-08-18 08:20:03',
'2015-08-18 08:35:03',
'2015-08-18 08:50:03',
'2015-08-18 09:05:03',
'2015-08-18 09:20:03',
'2015-08-18 09:35:03',
'2015-08-18 09:50:03',
'2015-08-18 10:05:03',
'2015-08-18 10:20:03',
'2015-08-18 10:35:03',
'2015-08-18 10:50:03',
'2015-08-18 11:05:03',
'2015-08-18 11:20:03',
'2015-08-18 11:35:03',
'2015-08-18 11:50:03',
'2015-08-18 12:05:03',
'2015-08-18 12:20:03',
'2015-08-18 12:35:03',
'2015-08-18 12:50:03',
'2015-08-18 13:05:03',
'2015-08-18 13:20:03',
'2015-08-18 13:35:03',
'2015-08-18 13:50:03',
'2015-08-18 14:05:03',
'2015-08-18 14:20:03',
'2015-08-18 14:35:03',
'2015-08-18 14:50:03',
'2015-08-18 15:05:03',
'2015-08-18 15:20:03',
'2015-08-18 15:35:03',
'2015-08-18 15:50:03',
'2015-08-18 16:05:03',
'2015-08-18 16:20:03',
'2015-08-18 16:35:03',
'2015-08-18 16:50:03',
'2015-08-18 17:05:03',
'2015-08-18 17:20:03',
'2015-08-18 17:35:03',
'2015-08-18 17:50:03',
'2015-08-18 18:05:03',
'2015-08-18 18:20:03',
'2015-08-18 18:35:03',
'2015-08-18 18:50:03',
'2015-08-18 19:05:03',
'2015-08-18 19:20:03',
'2015-08-18 19:35:03',
'2015-08-18 19:50:03',
'2015-08-18 20:05:03',
'2015-08-18 20:20:03',
'2015-08-18 20:35:03',
'2015-08-18 20:50:03',
'2015-08-18 21:05:03',
'2015-08-18 21:20:03',
'2015-08-18 21:35:03',
'2015-08-18 21:50:03',
'2015-08-18 22:05:03',
'2015-08-18 22:20:03',
'2015-08-18 22:35:03',
'2015-08-18 22:50:03',
'2015-08-18 23:05:03',
]
}
],
yAxis: [
{
type: 'value',
name: 'group',
min: 0,
max: 1000,
axisLabel: {
formatter: '{value} '
}
},
{
type: 'value',
name: 'speed(m/min)',
min: 0,
max: 1000,
axisLabel: {
formatter: '{value}m/min '
}
}
],
series: [
{
name:'group',
type:'bar',
//yAxisIndex: 1,
data:[0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 131, 231, 208, 184, 158, 127, 113, 81, 59, 39, 22, 12, 6, 6, 6, 7, 7, 7, 6, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 9, 22, 45, 72, 107, 167, 232, 290, 338, 389, 440, 474, 498, 503, 505, 500, 510, 490, 500, 480, 478, 448, 437, 404, 397, 379, 360, 342, 325, 297, 286, 280, 267, 272, 272, 270, 268, 272, 289, 305, 314, 332, 340, 359, 375, 384, 404, 421, 429, 445, 462, 469, 462, 475, 477, 474, 469, 461, 436, 406, 377, 347, 326, 297, 284, 266, 240, 203, 177, 146, 114, 99, 62, 0
]},
{
name:'speed(m/min)',
type:'line',
data:[0, 0, 0, 0, 0.8905559270349879, 0, 188.35099962999215, 210.20984727283894, 276.5349394738517, 247.64331521397068, 369.95923273191505, 123.2039205715338, 23.824663363381344, 363.5569529478879, 238.4910510508349, 230.58007434836406, 233.7174291639514, 221.26330507855388, 215.90477362369415, 195.46795697500625, 179.9978563346609, 130.2991933092891, 109.08799825762836, 88.42884370041554, 52.25332192177937, 23.511156617131377, 71.26465330020105, 81.83615294360027, 69.69490540151327, 145.3814827891106, 101.48414629311574, 152.71729138200612, 149.91442749081804, 140.66919511773736, 46.21908650011867, 3.854921254919873, 4.032431625693936, 2.886052956729189, 2.657205919685203, 3.7076169207414615, 3.2614216692987514, 3.7461522608888775, 3.639596135765831, 2.6896359671012835, 12.406109458475505, 4.840626530486695, 47.18713895500907, 112.89878558074054, 205.6609209744311, 256.1665795687997, 245.40194189734112, 244.75203089280515, 252.5970867103545, 260.3294970085907, 249.83395509928962, 243.89134515240906, 243.104190696678, 233.5722494495648, 232.02460091944647, 229.71757473496962, 228.28709451974817, 237.48142800778473, 235.6722746848312, 231.4898794211785, 244.3674060430744, 231.58233615811997, 233.66095535543258, 240.46672179185967, 232.85000900213882, 225.90107833324691, 234.2592433782108, 235.19652445778843, 230.59551549569562, 233.49843450799546, 234.84992909314346, 235.97969866716636, 238.48797021771028, 229.87935421794757, 229.11276908773283, 229.54851306053467, 228.62012382655072, 231.4405301374, 236.60693791719046, 234.1062441763785, 237.8555864938718, 252.64080312368398, 241.951508711507, 253.08266050136749, 257.4923904337296, 252.06053896376665, 247.58030332981028, 245.16621233025947, 256.97681417184646, 251.22286070597428, 239.78714690996162, 239.94133143308702, 214.18599321571995, 213.39946566212458, 209.90851155830137, 213.4215603607151, 216.94209056970018, 226.00187276114463, 243.14943572064098, 238.5664393771292, 233.0476934782879, 236.33829326111578, 227.30730932876767, 231.89916133388965, 246.07394505042075, 256.18237048863597, 239.8827022772911, 248.29942081797734, 241.28553238190048, 242.71232483162404, 224.87385983497688, 218.88763574862585, 176.5179104972548, 158.75122145774023, 0
]}
]
};