配置项如下
//app.title = '全球经向水分布';
var colors = ['#5793f3', '#d14a61', '#675bba'];
option = {
color: colors,
title: [{
text: '全球经向水分布',
//subtext: 'by lyc',
left: 'center',
textStyle: {
color: '#404a59',
fontSize: 18
}
},],
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross'
}
},
grid: {
right: '1%',
top: '8%',
//width: '99%',
bottom: 10,
left: '2%',
height:'30%',
containLabel: true
},
/*toolbox: {
feature: {
dataView: {show: true, readOnly: false},
restore: {show: true},
saveAsImage: {show: true}
}
},*/
legend: {
top: '4%',
data:['水域率','水域面积']
},
xAxis: [
{
position:'top',
type: 'category',
axisTick: {
alignWithLabel: true
},
axisLabel : {
show:true,
interval: 19
},
data: ['-180','-179','-178','-177','-176','-175','-174','-173','-172','-171','-170','-169','-168','-167','-166','-165','-164','-163','-162','-161','-160','-159','-158','-157','-156','-155','-154','-153','-152','-151','-150','-149','-148','-147','-146','-145','-144','-143','-142','-141','-140','-139','-138','-137','-136','-135','-134','-133','-132','-131','-130','-129','-128','-127','-126','-125','-124','-123','-122','-121','-120','-119','-118','-117','-116','-115','-114','-113','-112','-111','-110','-109','-108','-107','-106','-105','-104','-103','-102','-101','-100','-99','-98','-97','-96','-95','-94','-93','-92','-91','-90','-89','-88','-87','-86','-85','-84','-83','-82','-81','-80','-79','-78','-77','-76','-75','-74','-73','-72','-71','-70','-69','-68','-67','-66','-65','-64','-63','-62','-61','-60','-59','-58','-57','-56','-55','-54','-53','-52','-51','-50','-49','-48','-47','-46','-45','-44','-43','-42','-41','-40','-39','-38','-37','-36','-35','-34','-33','-32','-31','-30','-29','-28','-27','-26','-25','-24','-23','-22','-21','-20','-19','-18','-17','-16','-15','-14','-13','-12','-11','-10','-9','-8','-7','-6','-5','-4','-3','-2','-1','0','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','65','66','67','68','69','70','71','72','73','74','75','76','77','78','79','80','81','82','83','84','85','86','87','88','89','90','91','92','93','94','95','96','97','98','99','100','101','102','103','104','105','106','107','108','109','110','111','112','113','114','115','116','117','118','119','120','121','122','123','124','125','126','127','128','129','130','131','132','133','134','135','136','137','138','139','140','141','142','143','144','145','146','147','148','149','150','151','152','153','154','155','156','157','158','159','160','161','162','163','164','165','166','167','168','169','170','171','172','173','174','175','176','177','178','179',],
}
],
yAxis: [
{
type: 'value',
name: '水域率(%)',
//min: 0,
//max: 250,
position: 'right',
inverse:true,
axisLine: {
lineStyle: {
color: colors[0]
}
},
axisLabel: {
formatter: '{value}'
}
},
{
type: 'value',
name: '水域面积(万km²)',
//min: 0,
//max: 25,
position: 'left',
inverse:true,
axisLine: {
lineStyle: {
color: colors[2]
}
},
axisLabel: {
formatter: '{value}'
}
}
],
series: [
{
name:'水域率',
type:'line',
data:[0.26,0.28,0.32,0.75,0.68,1.28,0.76,1.04,1.04,0.79,0.8,1.14,1.37,1.39,1.29,1.2,1.05,1.07,0.7,0.57,0.52,0.45,0.66,0.7,0.98,1.13,1.79,2.11,4.16,3.32,3.71,5.73,4.5,4.64,2.35,1.41,1.51,1.47,0.64,0.5,0.48,1.09,1.35,0.59,1.47,0.81,3.08,6.72,13.67,18.17,17.8,16.01,10.02,2.03,1.13,1.61,2,1.59,2.29,1.6,1.6,0.92,0.81,1.41,2.2,1.82,2.73,2.86,2.95,3.84,3.21,2.53,2.75,2.82,2.25,2.5,3.2,2.6,2.18,1.82,3.13,1.96,2.33,1.92,2.16,2.31,2.98,2.74,3,3.31,1.95,2.35,1.82,1.12,1.6,1.22,1.34,1.26,1.29,2.47,1.42,1.62,1.5,1.7,1.8,1.7,1.88,2.35,2.47,0.96,1.45,1.74,1.62,1.1,0.95,1.58,2.01,1.82,1.77,1.92,1.39,0.99,1.43,1.83,1.32,1.01,1.35,1.15,0.84,0.76,0.62,1.61,0.72,0.72,0.94,1.26,1.19,1.18,2.66,2.01,1.96,1.31,1.26,1.42,1.41,1.89,1.5,1.22,1.48,2.21,3.52,3.23,4.82,6.94,6.17,3.83,2.65,3.98,4.47,4.06,2.12,1.26,0.84,1.15,0.91,1.5,2.67,1.95,1.65,2.43,2.55,1.41,2.27,2.5,2.91,3.12,3.33,2.1,2.01,1.41,2.88,3.06,5.55,4.72,3.07,3.77,2.56,1.94,7.83,8.41,1.78,1.43,2.55,8.51,12.29,13.33,7.55,5.85,4.4,3.88,4.13,3.57,6.6,6.05,5.49,4.03,3.34,3.28,3.39,2.51,2.19,1.66,2.92,2.23,1.93,1.74,1.36,0.79,2.05,2.51,1.86,1.87,1.8,4.43,7.98,5.54,4.69,4.28,3.82,3.64,3.17,3.61,5.18,6.12,5.62,3.57,4.46,5.29,5.18,4.82,4.56,4.26,4.22,5.67,6.31,5.53,5.92,5.74,6.48,6.16,5.77,5.67,6.01,5.81,4.72,5.08,5.62,5.35,5.75,6.48,7.67,7.6,6.42,7,7.63,7.1,5.79,6.08,6.93,6.24,6.96,14.41,16.14,9.74,4.47,6.38,10.99,9.37,7.22,5.15,3.96,4.54,6.08,5.48,6.02,5.2,4.54,4.3,3.38,3.39,3.15,3.49,2.35,2.46,2.5,2.71,3.31,1.92,2.67,2.58,1.91,2.62,2.42,2.19,1.86,1.61,2.29,1.91,2.2,1.99,1.7,0.72,0.45,0.96,0.49,0.34,0.76,0.89,0.55,0.56,1.25,0.66,0.59,0.28,0.19,0.02,0.01,0.01,0.01,0.09,0.12,0.14,0.52,0.2,0.47,0.48,0.95,1.59,2.32,1.81,2.6,0.72,1.27,0.92,0.36,0.27,0.25,0.17,0.27,0.21,0.31,0.47,0.4,0.56,0.51,0.43,0.22,0.37,0.99,1.17,]
},
{
name:'水域面积',
type:'line',
yAxisIndex: 1,
data:[0.1135,0.1186,0.1342,0.3170,0.3129,0.6149,0.3655,0.5243,0.5873,0.4600,0.4719,0.7773,1.0659,1.1610,1.1354,1.0728,0.9286,0.9638,0.6326,0.5439,0.5134,0.4517,0.6384,0.6821,0.9519,1.1034,1.7664,2.0187,3.9378,3.0840,3.3732,5.1610,3.9565,3.9436,1.8625,1.1036,1.1481,1.1112,0.4577,0.3194,0.2944,0.6687,0.8695,0.4118,1.0435,0.5610,2.0884,4.2312,7.6169,8.6192,7.9054,6.8351,4.3668,0.8948,0.5009,0.6827,0.8260,0.6287,0.8518,0.5843,0.5884,0.3379,0.2971,0.5143,0.7964,0.6594,1.0329,1.1227,1.2197,1.6352,1.3574,1.0382,1.2574,1.4057,1.1883,1.3908,1.8184,1.4624,1.2023,0.9719,1.5619,0.9210,1.0694,0.8698,0.9551,1.0096,1.2623,1.1610,1.2683,1.3831,0.8137,1.0423,0.8252,0.5425,0.8099,0.6214,0.7086,0.7413,0.8049,1.4938,0.9158,1.0665,0.9751,1.0595,1.1184,0.9519,0.9920,1.1851,1.2409,0.4973,0.7500,0.9031,0.8596,0.6542,0.6128,1.0629,1.2728,1.0191,0.9818,1.0900,0.7549,0.4858,0.6755,0.8987,0.6640,0.5053,0.6678,0.5358,0.3561,0.3391,0.2759,0.7523,0.3458,0.3361,0.4344,0.5531,0.4977,0.5171,1.1752,0.9311,0.8947,0.6878,0.5609,0.5506,0.5190,0.6465,0.4844,0.3436,0.3724,0.4766,0.6307,0.4832,0.3842,0.4269,0.4162,0.3424,0.2575,0.3498,0.3890,0.3504,0.1737,0.0800,0.0386,0.0632,0.0509,0.0924,0.1853,0.1408,0.1199,0.1742,0.1766,0.1032,0.1465,0.1615,0.2351,0.1926,0.1696,0.0895,0.0580,0.0249,0.0445,0.0426,0.0770,0.0657,0.0340,0.0514,0.0295,0.0164,0.0363,0.0204,0.0033,0.0051,0.0309,0.1803,0.4381,0.5315,0.3477,0.3303,0.2870,0.2775,0.2936,0.2705,0.5201,0.4933,0.3926,0.2666,0.1948,0.1786,0.1896,0.1399,0.1159,0.0813,0.1425,0.1118,0.0994,0.0917,0.0707,0.0407,0.1091,0.1344,0.1026,0.1067,0.1059,0.2890,0.5507,0.4073,0.4103,0.3653,0.3438,0.3573,0.3338,0.4316,0.6432,0.7921,0.8569,0.7946,1.0746,1.3844,1.4136,1.3235,1.2769,1.2391,1.3161,1.8653,2.0659,1.8437,2.0634,2.0952,2.3495,2.2778,2.1486,2.1829,2.4016,2.4643,2.0858,2.2611,2.5169,2.4162,2.6457,3.0328,3.6500,3.3087,2.4531,2.5733,2.6774,2.4575,1.9980,2.1613,2.5421,2.3384,2.5314,4.7188,5.0941,3.3863,1.6164,2.1708,3.5368,2.9242,2.3437,1.6881,1.5227,2.1739,3.2209,3.0349,3.5044,3.3182,3.2584,3.3198,2.8730,3.0310,2.6980,2.8393,1.8374,1.8778,1.7959,1.9020,2.2296,1.2328,1.6467,1.5409,1.1127,1.4804,1.3071,1.1494,0.9807,0.8322,1.1351,0.8966,0.9835,0.8343,0.6616,0.2675,0.1611,0.3390,0.1651,0.1125,0.2451,0.2687,0.1534,0.1351,0.2136,0.0963,0.0740,0.0290,0.0108,0.0010,0.0003,0.0005,0.0004,0.0040,0.0054,0.0059,0.0216,0.0080,0.0166,0.0188,0.0358,0.0489,0.0592,0.0409,0.0531,0.0137,0.1125,0.1491,0.0682,0.0568,0.0592,0.0423,0.0714,0.0690,0.1267,0.2000,0.1740,0.2452,0.2280,0.1999,0.1008,0.1737,0.4659,0.5191,]
}
]
};