option = { title : { text: '男性女性身高体重分布', subtext: '抽样调查来自: Heinz 2003' }, grid: { left: '3%', right: '7%', bottom: '3%', containLabel: true }, tooltip : { trigger: 'axis', showDelay : 0, formatter : function (params) { if (params.value.length > 1) { return params.seriesName + ' :<br/>' + params.value[0] + 'cm ' + params.value[1] + 'kg '; } else { return params.seriesName + ' :<br/>' + params.name + ' : ' + params.value + 'kg '; } }, // axisPointer:{ // show: true, // type : 'cross', // lineStyle: { // type : 'dashed', // width : 1 // } // } }, toolbox: { feature: { dataZoom: {}, brush: { type: ['rect', 'polygon', 'clear'] } } }, brush: { }, legend: { data: ['男性'], left: 'center' }, xAxis : [ { type : 'value', scale:true, axisLabel : { formatter: '{value} cm' }, splitLine: { show: false } } ], yAxis : [ { type : 'value', scale:true, axisLabel : { formatter: '{value} kg' }, splitLine: { show: false } } ], series : [ { name:'男性', type:'scatter', data: [[174.0, 65.6], [175.3, 71.8], [193.5, 80.7], [186.5, 72.6], [187.2, 78.8], [181.5, 74.8], [184.0, 86.4], [184.5, 78.4], [175.0, 62.0], [184.0, 81.6], [180.0, 76.6], [177.8, 83.6], [192.0, 90.0], [176.0, 74.6], [174.0, 71.0], [184.0, 79.6], [192.7, 93.8], [171.5, 70.0], [173.0, 72.4], [176.0, 85.9], [176.0, 78.8], [180.5, 77.8], [172.7, 66.2], [176.0, 86.4], [173.5, 81.8], [178.0, 89.6], [180.3, 82.8], [180.3, 76.4], [164.5, 63.2], [173.0, 60.9], [183.5, 74.8], [175.5, 70.0] ], markArea: { silent: true, itemStyle: { normal: { color: 'transparent', borderWidth: 0.5, borderType: 'dashed', borderColor: 'grey' } }, data: [[{ name: '男性分布区间', xAxis: 'min', yAxis: 'min' }, { xAxis: 'max', yAxis: 'max' }]] }, markPoint : { data : [ {type : 'max', name: '最大值'}, {type : 'min', name: '最小值'}, {type : 'max', name: '最大值', valueDim:'x'}, {type : 'min', name: '最小值', valueDim:'x'}, {type : 'max', name: '最大值', valueDim:'y'}, {type : 'min', name: '最小值', valueDim:'y'} ] }, markLine : { lineStyle: { normal: { color: 'blue', type: 'solid' } }, data : [ {type : 'average', name: '平均值'}, {type : 'average', valueDim:'x' } ] } } ] };