11111
配置项如下
option={
title : {
text: ''
},
grid:{
x:40,
y:100,
x2:40,
y2:50,
borderWidth:1
},
tooltip : {
trigger: 'axis',
formatter: function (params) {
var res = params[0].name;
if(!isNaN(params[0].value)&&(params[0].value!=0))
{
res += '<br/> 日注气量: ' + (-params[0].value) +'万方';
}
if(!isNaN(params[1].value)&&(params[1].value!=0))
{
res += '<br/> 日采气量: ' + (params[1].value) +'万方';
}
if(!isNaN(params[2].value)&&(params[2].value!=0))
{
res += '<br/> 累注气量: ' + (params[2].value) +'亿方';
}
if(!isNaN(params[3].value)&&(params[3].value!=0))
{
res += '<br/> 累采气量: ' + (params[3].value) +'亿方';
}
return res;
}
},
legend: {
x: 'center', // 'center' | 'left' | {number},
y: 'bottom', // 'center' | 'bottom' | {number}
padding:[0,0,0,0],
show:false,
textStyle: {
//fontWeight:'bold',
fontSize: 10,
fontFamily:'SimHei',
color: '#333' // 主标题文字颜色
},
data:['日注气量(万方)','日采气量(万方)','累注气量(亿方)','累采气量(亿方)']
},
toolbox: {
show : true,
right:'20',
feature : {
mark : {show: false},
dataView : {show: false, readOnly: false},
magicType : {show: false, type: ['line', 'bar', 'stack', 'tiled']},
restore : {show: false},
saveAsImage : {show: false}
}
},
calculable : true,
xAxis : [
{
splitLine:{show:false},//去除网格线
splitArea:{show:false},//保留网格区域
type : 'category',
boundaryGap : false,
axisTick: {show:false},
axisLabel: {
formatter: function(value) {
return echarts.format.formatTime('yyyy-MM', value);
},
textStyle: {
//fontWeight:'bold',
fontSize:10,
fontFamily:'SimHei',
color: '#333' // 主标题文字颜色
}
},
data :["2016-10-16", "2016-10-17", "2016-10-18", "2016-10-19", "2016-10-20", "2016-10-21", "2016-10-22", "2016-10-23", "2016-10-24", "2016-10-25", "2016-10-26", "2016-10-27", "2016-10-28", "2016-10-29", "2016-10-30", "2016-10-31", "2016-11-01", "2016-11-02", "2016-11-03", "2016-11-04", "2016-11-05", "2016-11-06", "2016-11-07", "2016-11-08", "2016-11-09", "2016-11-10", "2016-11-11", "2016-11-12", "2016-11-13", "2016-11-14", "2016-11-15", "2016-11-16", "2016-11-17", "2016-11-18", "2016-11-19", "2016-11-20", "2016-11-21", "2016-11-22", "2016-11-23", "2016-11-24", "2016-11-25", "2016-11-26", "2016-11-27", "2016-11-28", "2016-11-29", "2016-11-30", "2016-12-01", "2016-12-02", "2016-12-03", "2016-12-04", "2016-12-05", "2016-12-06", "2016-12-07", "2016-12-08", "2016-12-09", "2016-12-10", "2016-12-11", "2016-12-12", "2016-12-13", "2016-12-14", "2016-12-15", "2016-12-16", "2016-12-17", "2016-12-18", "2016-12-19", "2016-12-20", "2016-12-21", "2016-12-22", "2016-12-23", "2016-12-24", "2016-12-25", "2016-12-26", "2016-12-27", "2016-12-28", "2016-12-29", "2016-12-30", "2016-12-31", "2017-01-01", "2017-01-02", "2017-01-03", "2017-01-04", "2017-01-05", "2017-01-06", "2017-01-07", "2017-01-08", "2017-01-09", "2017-01-10", "2017-01-11", "2017-01-12", "2017-01-13", "2017-01-14", "2017-01-15", "2017-01-16", "2017-01-17", "2017-01-18", "2017-01-19", "2017-01-20", "2017-01-21", "2017-01-22", "2017-01-23"]
}
],
yAxis : [
{
type : 'value',
name : '日注(采)气量',
splitLine:{show:false},//去除网格线
splitArea:{show:false},//保留网格区域
nameTextStyle: {
padding: [0, 0, 0, 0],
//fontWeight:'bold',
fontSize:10,
fontFamily:'SimHei',
color: '#333'
},
axisLabel : {
formatter: '{value} ',
textStyle: {
//fontWeight:'bold',
fontSize:10,
fontFamily:'SimHei',
color: '#333' // 主标题文字颜色
}
}
},
{
type : 'value',
name : '累注(采)气量',
//min:-200,max:300,
splitLine:{show:false},//去除网格线
splitArea:{show:false},//保留网格区域
//axisLine : {onZero: true}, // 这里就是你要的东西
nameTextStyle: {
padding: [0, 0, 0, 0],
//fontWeight:'bold',
fontSize:10,
fontFamily:'SimHei',
color: '#333'
},
axisLabel : {
formatter: '{value} ',
textStyle: {
//fontWeight:'bold',
fontSize:10,
fontFamily:'SimHei',
color: '#333' // 主标题文字颜色
}
}
}
],
series : [{
name:'日注气量(万方)',
type:'line',
smooth:true,
symbolSize:0,
yAxisIndex: 0,
markPoint : {
symbol:'diamond', // 'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow', path://m 0,0 h 48 v 20 h -30 l -6,10 l -6,-10 h -6 z, path://m 0,0 h 48 v 20 h -34 l -6,10 l -6,-10 h -2 z
symbolOffset: ['0%', '50%'],
symbolSize:10,
label: {
textStyle: {
fontSize:15,
fontFamily:'SimHei',
color: '#000000'
}
},
data : [
/* {type : 'max', name: '最大值',symbolSize:30}, */
{type : 'min', name: '最小值',symbolSize:10}
]
},
itemStyle: {normal: {color:'#EB6E19',areaStyle: {type: 'default',color:'#EB6E19'}}},
//data:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,145.2036,249.3088,245.035,286.6269,313.5221,347.8436,356.7083,344.7486,288.5109,157.2248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5.9681,4.1115,77.1351,282.1564,285.4649,261.5552,249.7091,241.815,240.1556,259.2659,285.476,452.4309,408.8941,382.4623,379.5595,378.9889,390.1726,357.9986,347.7453,313.7095,310.5183,304.8644,314.1671,310.184,311.1016,310.9647,287.8277,284.5184,51.9628,12.1523,10.8348,13.1974,12.5348,13.0823,12.5415,11.8035,10.0536,10.2904,10.4599,15.0933,11.9266,14.9247,14.6647,8.6962,8.2462,13.8711,376.1062,612.6457,573.8246,552.6479,613.8029,623.8278,594.325,546.7027,533.4513,533.6117,533.1461,537.3377,536.7526,547.8789,564.48,557.5447,572.3319,565.4624,538.1165,517.3471,568.1039,561.5427,585.8869,588.9203,590.4346,566.2776,578.3547,560.2108,554.8928,553.3576,182.5453,30.4579,29.2136,28.1397,31.2521,35.7745,30.5961,28.3719,29.3339,25.823,19.5881,32.8931,31.0274,30.1686,27.94,26.4999,25.0559,23.4991,27.76,33.2739,33.8869,33.3148,31.8297,31.5712,15.2694,16.1831,15.181,15.6408,15.3582,15.4222,15.1683,15.2904,15.2721,15.1404,14.6896,15.6904,15.1726,14.4944,14.9585,14.8326,14.8873,15.0881,15.0301,14.9205,15.0107,14.848,15.0912,14.826,14.822,15.0599,14.6723,15.1908,14.7792,14.9058,14.6768,14.8088,14.894,14.7795,14.8265,15.9356,23.5643,21.8469,17.2301,16.4051,16.7324,16.7924,16.8178,16.9592,16.4551,16.8901,16.7442,16.5492,16.767,16.6262,16.667,16.9221,16.9194,16.4765,16.3484,16.8093,16.8429,16.6599,16.4276,16.8757,16.9826,16.4856,16.8511,16.6348,15.7907,12.9358,17.9382,18.5128,17.6002,19.5183,16.1967,17.6543,17.6713,17.6319,17.5404,17.4686,17.4079,17.8471,20.837,20.6303,19.4653,20.515,20.0289,22.8307,21.8716,24.1404,26.8794,28.4866,27.297,27.0113,28.4645,27.692,0,0,0,0,0,0,0,0,0,13.0056,18.7076,20.2003,17.9352,18.2433,17.9879,17.7244,17.385,16.956,16.6904,16.9622,16.5094,16.7659,16.6071,15.7689,17.7059,15.9097,15.561,17.6328,16.479,1.105,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,307.8384,463.2096,493.2755,567.4155,615.2254,674.353,698.4093,709.1766,658.6551,685.5085,757.7842,848.8017,799.3524,760.9264,762.7024,786.9832,714.2291,701.3665,729.8283,914.2222,913.8585,988.8531,980.014,1112.3767,1068.7079,1252.3164,1297.2276,1326.8477,1405.7552,1459.0658,1427.7002,1416.8877,1387.2348,1391.6511,1361.5232,1429.9045,1351.1775,1234.8663,1307.2043,1299.4992,1271.316,1239.5141,1251.2157,1256.5348,1275.224,768.9798,612.3887,346.8745,294.1861,294.1645,294.5486,297.7709,295.859,300.5928,284.14,286.0433,284.3822,302.9627,300.4133,299.2674,310.1272,307.4601,306.6137,306.7892,307.4886,308.1934,307.2689,302.8479,294.3253,292.7303,306.3414,305.5331,305.6394,304.1294,340.271,332.0551,304.3664,303.8387,301.2799,300.9021,300.9134,300.1523,299.0233,302.1227,82.2976,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31.1861,37.1361,26.931,19.1274,15.5951,63.3543,107.3564,117.6419,111.2734,108.2396,107.6768,109.071,46.4411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9.0063,5.3649,19.8736,25.4837,34.9755,42.4757,43.3489,43.4473,384.0896,499.5644,504.2988,745.4764,832.3475,924.8076,1034.1567,968.532,1232.5754,1549.7231,1544.3842,1551.9706,1614.3723,1592.1346,1595.2665,1597.4799,2033.1668,2040.1202,2037.6795,2161.4186,2200.1345,2190.3972,2228.6847,2288.2017,2420.9182,2021.7852,1938.8824,2192.3413,2478.9297,2521.1889,2500.4111,2110.9351,1907.2007,2320.9746,2527.4047,2534.7793,2562.035,2545.1157,2550.4864,2658.3026,2819.9093,2978.3067,2929.5904,2873.3155,2848.7874,2785.2927,2800.8207,2771.6832,2738.3627,2717.8078,2666.5679,2710.1473,2722.6846,2636.4196,2181.2262,2246.2221,2552.1806,2586.2527,2604.5253,2601.6508,2649.3223,2656.5264,2622.8937,2705.6052,2693.0878,2712.8545,2651.4786,2626.4907,2669.0134,2711.0269,2728.1438,2689.0191,2672.3523,2665.6826,2690.6227,2683.2166,2733.8854,2746.4777,2721.3911,2700.2467,2691.9203,2670.1754,2593.5399,2333.4156,2142.9483,2037.9706,1971.4353,1587.8015,825.787,568.3452,558.4664,589.3568,624.3987,1255.2314,2061.2065,2288.3759,2315.789,2332.6967,2327.6876,2312.3205,2301.7942,2241.47,2292.7736,2296.1935,2304.2613,2302.8787,2260.5822,2218.6134,2209.4808,1350.8311,1074.4633,939.0612,594.5338,540.9581,544.8092,543.6818,410.4006,321.528,299.2984,38.807,0.4876,2.0535,2.7156,3.2828,1.3497,1.3916,0.4634,4.9424,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,267.4433,317.1398,658.4361,786.3912,873.3734,819.5483,953.2574,1418.2487,1719.8929,1723.9563,1642.0159,1662.5472,2035.3081,2210.1462,2365.0113,2381.6574,2784.9961,2732.8749,2927.1638,3311.5183,3583.0297,3766.8306,3802.3276,3739.8397,3684.4183,3551.398,3428.9869,3318.8597,3167.0424,3214.4883,3291.2371,3245.9478,3265.9335,3388.4101,3114.2095,3025.6572,3160.2543,3221.1957,3359.5105,2941.649,2954.6797,2712.826,2656.3351,2043.3831,3063.2706,3171.0352,3236.5592,3331.4521,3095.4968,2948.8316,2965.2847,2639.9108,2430.8471,2971.9996,3191.4318,3488.9026,3555.0051,3736.6538,3712.1892,3716.9355,3726.3775,3871.2286,4008.7043,4112.1758,4158.6339,4142.4548,4120.6003,4228.0876,4340.731,4337.2424,4298.8275,4280.8625,4141.4075,3913.3589,3618.6234,3051.616,2869.0692,2878.5879,2722.1075,2482.3864,2558.4277,2685.7199,2752.9054,3542.6987,3754.109,3815.457,3814.7443,3927.682,4173.4298,4224.3624,4249.0462,4224.0878,4233.3595,4239.7154,4272.3258,4258.612,4208.7238,4210.6902,4160.3975,4134.2994,4087.2032,4001.6527,4006.7816,4006.3446,3979.2102,3981.1882,4002.2121,3935.5665,3842.1743,3824.5556,3400.8623,3146.4026,2501.3365,1710.7567,1594.9898,1765.4459,1837.9215,2089.8628,2149.7569,745.2397,52.2134,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
data :[-1358, -1353, -1336, -1305, -1308, -465, -448, -360, -313, -424, -432, -485, -215, -378, -249, -247, -326, -65, -75, -253, -230, -98, -97, -71, -52, -101, -2, 0, -10, -1, 0, -4, 0, -7, -7, -5, -3, -4, -4, 0, -6, null, null, -2, null, null, null, -43, -57, -110, -234, -422, -598, -554, -449, -420, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]
},{
name:'日采气量(万方)',
type:'line',
smooth:true,
symbolSize:0,
yAxisIndex: 0,
markPoint : {
symbol:'diamond', // 'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow', path://m 0,0 h 48 v 20 h -30 l -6,10 l -6,-10 h -6 z, path://m 0,0 h 48 v 20 h -34 l -6,10 l -6,-10 h -2 z
symbolOffset: ['0%', '-50%'],
symbolSize:10,
label: {
textStyle: {
fontSize:15,
fontFamily:'SimHei',
color: '#000000'
}
},
data : [
{type : 'max', name: '最大值',symbolSize:10}
/* ,
{type : 'min', name: '最小值',symbolSize:30} */
]
},
itemStyle: {normal: {color:'#FFC000',areaStyle: {type: 'default',color:'#FFC000'}}},
data :[20, 19, 0, 23, 25, 23, 7, 2, 9, 31, 7, 70, 9, 12, 0, 0, 9, 14, 7, 0, 3, 12, 10, 37, 2, 1, 34, 267, 389, 867, 1340, 1685, 1857, 2004, 2742, 3085, 3219, 3437, 3774, 4194, 4754, 5374, 5276, 5598, 5665, 5725, 5889, 5936, 6126, 6137, 5668, 5463, 5232, 4989, 4784, 4611, 4654, 4727, 4712, 4739, 4865, 4567, 4482, 4602, 4652, 4785, 4359, 4375, 4140, 4071, 4290, 4458, 4563, 4675, 5105, 5193, 5055, 5074, 4736, 4529, 5069, 5291, 5574, 5631, 5807, 5749, 5739, 5761, 5966, 6122, 6211, 6244, 6209, 6167, 6250, 6337, 6295, 6341, 6306, 6163]
},{
name:'累注气量(亿方)',
type:'line',
// smooth:true,
symbolSize:0,
yAxisIndex: 1,
itemStyle: {normal: {color:'#FF7F50'}},
data :[-405.39, -405.53, -405.66, -405.79, -405.92, -405.97, -406.01, -406.05, -406.08, -406.12, -406.17, -406.21, -406.24, -406.27, -406.3, -406.32, -406.36, -406.36, -406.37, -406.4, -406.42, -406.43, -406.44, -406.44, -406.45, -406.46, -406.46, -406.46, -406.46, -406.46, -406.46, -406.46, -406.46, -406.46, -406.46, -406.46, -406.46, -406.46, -406.46, -406.46, -406.47, -406.47, -406.47, -406.47, -406.47, -406.47, -406.47, -406.47, -406.48, -406.49, -406.51, -406.55, -406.61, -406.67, -406.71, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75, -406.75]
},{
name:'累采气量(亿方)',
type:'line',
//smooth:true,
symbolSize:0,
yAxisIndex: 1,
itemStyle: {normal: {color:'#3A5FCD'}},
data :[218.89, 218.89, 218.89, 218.89, 218.89, 218.9, 218.9, 218.9, 218.9, 218.9, 218.9, 218.91, 218.91, 218.91, 218.91, 218.91, 218.91, 218.91, 218.91, 218.91, 218.91, 218.92, 218.92, 218.92, 218.92, 218.92, 218.92, 218.95, 218.99, 219.08, 219.21, 219.38, 219.56, 219.76, 220.04, 220.35, 220.67, 221.01, 221.39, 221.81, 222.28, 222.82, 223.35, 223.91, 224.48, 225.05, 225.64, 226.23, 226.84, 227.46, 228.02, 228.57, 229.09, 229.59, 230.07, 230.53, 231, 231.47, 231.94, 232.42, 232.9, 233.36, 233.81, 234.27, 234.73, 235.21, 235.65, 236.08, 236.5, 236.91, 237.33, 237.78, 238.24, 238.7, 239.21, 239.73, 240.24, 240.75, 241.22, 241.67, 242.18, 242.71, 243.27, 243.83, 244.41, 244.99, 245.56, 246.14, 246.73, 247.34, 247.97, 248.59, 249.21, 249.83, 250.45, 251.09, 251.72, 252.35, 252.98, 253.6]
}
]
};