配置项如下
option = {
title : {
text: '男性女性生存周期分布图'
},
grid: {
//show:true,
left: '3%',
right: '50%',
top: '16%',
bottom: '16%',
containLabel: true
},
tooltip : {
// trigger: 'axis',
showDelay : 0,
formatter : function (params) {
if (params.value.length > 1) {
return params.seriesName + ' :<br/>'
+ params.value[0] + 'yes old '
+ params.value[1] + 'survival ';
}
else {
return params.seriesName + ' :<br/>'
+ params.name + ' : '
+ params.value + 'survival ';
}
},
axisPointer:{
show: true,
type : 'cross',
lineStyle: {
type : 'dashed',
width : 1
}
}
},
toolbox: {
feature: {dataView:{
show:true
},
dataZoom: {},
brush: {
type: ['rect', 'polygon', 'clear','lineX','lineY']
}
}
},
brush: {
},
legend: {
data: ['女性','男性','A','GBM','OA','OD','A','GBM','OA','OD'],
left: 'center'
},
xAxis : [
{
name: 'AGE',
type : 'value',
scale:true,
axisLabel : {
formatter: '{value} '
},
splitLine: {
show: false
}
}
],
yAxis : [
{
name: 'survival',
type : 'value',
axisLabel : {
formatter: '{value} '
},
splitLine: {
show: false
}
}
],
dataZoom: [
{
type: 'slider',
show: true,
xAxisIndex: [0],
start: 1,
end: 35
},
{
type: 'slider',
show: true,
yAxisIndex: [0],
left: '93%',
start: 29,
end: 36
},
{
type: 'inside',
xAxisIndex: [0],
start: 1,
end: 35
},
{
type: 'inside',
yAxisIndex: [0],
start: 29,
end: 36
}
],
series: [ {
name:'女性',
type:'scatter',
data: [[29,140.04],
[39,107.04],
[34,103.08],
[48,38.88],
[32,81.72],
[51,36.48],
[39,123.36],
[35,21.96],
[23,209.88],
[44,16.08],
[38,18],
[51,27.6],
[52,39.36],
[33,81.24],
[32,7.68],
[57,6.96],
[54,15.24],
[56,8.28],
[54,15.6],
[48,5.76],
[32,41.64],
[46,8.52],
[36,11.76],
[52,10.32],
[71,2.52],
[52,12.36],
[51,4.92],
[37,11.28],
[33,79.44],
[30,2.16],
[61,10.56],
[30,24.6],
[38,16.8],
[33,75.72],
[39,19.08],
[55,10.08],
[68,4.44],
[35,150.72],
[41,7.08],
[48,12.96],
[38,57.48],
[46,130.32],
[59,22.2],
[64,4.92],
[58,9.84],
[60,11.76],
[43,34.68],
[62,18.6],
[37,3.84],
[52,3],
[48,7.68],
[70,3.6],
[56,6.48],
[52,3.36],
[44,33.12],
[58,8.76],
[37,39.84],
[52,1.44],
[38,48.84],
[37,15.24],
[62,37.92],
[44,82.44],
[42,18.36],
[37,2.28],
[24,75.24],
[66,13.32],
[64,10.56],
[56,9.6],
[42,23.88],
[33,34.08],
[65,3.6],
[41,8.88],
[57,6.6],
[66,6.72],
[53,12.72],
[16,97.92],
[72,3.96],
[47,37.2],
[36,81.6],
[43,89.76],
[61,12.24],
[33,39.72],
[54,7.8],
[65,4.2],
[40,124.08],
[62,74.52],
[54,67.44],
[70,7.2],
[62,13.68],
[14,8.04],
[43,43.8],
[75,3.24],
[67,39.6],
[68,27.12],
[60,60.24],
[35,14.28],
[46,10.68],
[43,2.28],
[55,8.4],
[32,13.2],
[38,12.72],
[64,31.92],
[75,26.52],
[47,31.44],
[47,19.32],
[37,39.84],
[59,14.52],
[59,14.52],
[53,22.2],
[42,7.2],
[44,58.32],
[38,15.84],
[35,15.12],
[54,45.12],
[79,6.36],
[48,5.64],
[32,10.32],
[55,45.12],
[60,4.2],
[57,],
[52,14.16],
[50,5.4],
[71,7.32],
[81,9.84],
[54,124.32],
[37,248.16],
[56,7.8],
[46,14.4],
[35,63.96],
[67,6],
[64,4.08],
[47,62.04],
[36,35.16],
[36,73.44],
[33,192.6],
[44,224.64],
[61,4.2],
[81,11.04],
[61,6.6],
[44,58.92],
[67,2.88],
[55,3.12],
[79,5.76],
[52,41.28],
[33,44.4],
[70,6.36],
[57,11.76],
[40,34.08],
[56,39.96],
[68,8.76],
[59,33.48],
[29,44.28],
[70,2.52],
[23,39.84],
[53,],
[71,3.6],
[68,18.96],
[53,5.76],
[50,90.24],
[55,6.72],
[69,7.56],
[67,3.36],
[47,66.72],
[32,23.04],
[47,13.44],
[74,1.32],
[27,72.72],
[63,4.56],
[18,75.72],
[34,124.44],
[32,2.28],
[54,73.2],
[28,75.6],
[67,36],
[37,97.2],
[36,63.6],
[38,79.2],
[40,80.4],
[54,32.4],
[21,68.4],
[41,109.2],
[30,57.6],
[35,20.4],
[41,40.8],
[28,44.4],
[54,40.8],
[35,34.8],
[25,144],
[64,12],
[23,39.6],
[33,88.8],
[23,49.2],
[66,16.8],
[55,28.8],
[29,87.6],
[72,21.6],
[65,14.4],
[50,61.2],
[25,28.8],
[55,14.4],
[27,64.8],
[40,99.6],
[49,96],
[64,56.4],
[45,75.6],
[26,20.4],
[40,100.8],
[40,115.2],
[45,76.8],
[60,70.8],
[49,52.8],
[68,52.8],
[41,14.4],
[45,70.8],
[51,52.8],
[63,55.2],
[39,69.6],
[47,88.8],
[40,46.8],
[39,97.2],
[44,73.2],
[43,61.2],
[30,85.2]
],
markArea: {
silent: true,
itemStyle: {
normal: {
color: 'transparent',
borderWidth: 1,
borderType: 'dashed'
}
},
data: [[{
name: '女性分布区间',
xAxis: 'min',
yAxis: 'min'
}, {
xAxis: 'max',
yAxis: 'max'
}]]
},
markPoint : {
data : [
{type : 'max', name: '最大值'},
{type : 'min', name: '最小值'}
]
},
markLine : {
lineStyle: {
normal: {
type: 'solid'
}
},
data : [
{type : 'average', name: '平均值'},
{ xAxis: 160 }
]
}
},
{
name:'男性',
type:'scatter',
data: [[45,117.84],
[44,97.44],
[53,23.04],
[49,3.36],
[48,57.24],
[54,7.92],
[63,5.64],
[63,15.12],
[58,7.44],
[74,7.08],
[31,17.76],
[26,38.52],
[32,21.72],
[53,7.8],
[73,6.96],
[44,12],
[63,15.48],
[60,41.52],
[46,8.52],
[30,29.52],
[58,19.2],
[46,13.92],
[41,3.48],
[67,8.64],
[43,23.52],
[55,21],
[55,3.12],
[62,5.4],
[34,47.64],
[59,7.44],
[33,8.52],
[60,98.76],
[58,109.32],
[57,17.64],
[66,89.28],
[15,3.36],
[50,95.52],
[53,66.72],
[71,7.56],
[47,35.88],
[22,78],
[24,28.92],
[41,7.32],
[43,14.64],
[70,4.8],
[73,14.28],
[43,2.16],
[79,19.68],
[49,117.48],
[38,118.2],
[32,21.72],
[50,49.56],
[53,23.04],
[40,72.48],
[38,189.84],
[37,136.92],
[53,66.72],
[56,12.6],
[37,23.64],
[24,54.6],
[79,20.28],
[63,21.36],
[50,36],
[38,72.96],
[71,10.92],
[33,38.4],
[51,18.36],
[71,9.48],
[43,27.6],
[45,39.24],
[64,3.6],
[59,5.76],
[45,24.24],
[37,159.6],
[71,4.2],
[55,2.76],
[64,13.68],
[49,9.12],
[66,26.64],
[44,16.08],
[33,84.48],
[78,1.8],
[62,4.08],
[61,3.48],
[34,12.6],
[65,15.72],
[37,134.52],
[47,26.4],
[29,14.4],
[43,43.2],
[47,26.4],
[39,212.4],
[41,20.4],
[30,54],
[33,169.2],
[40,37.2],
[31,79.2],
[43,50.4],
[42,39.6],
[36,67.2],
[50,12],
[38,7.2],
[31,34.8],
[26,44.4],
[35,43.2],
[24,145.2],
[35,136.8],
[44,42],
[47,46.8],
[47,108],
[23,37.2],
[44,70.8],
[36,46.8],
[50,151.2],
[37,115.2],
[39,87.6],
[44,116.4],
[64,26.4],
[39,48],
[66,24],
[46,132],
[61,18],
[61,28.8],
[29,36],
[29,69.6],
[50,32.4],
[30,58.8],
[28,40.8],
[32,76.8],
[21,86.4],
[51,46.8],
[30,49.2],
[74,60],
[45,19.2],
[37,64.8],
[55,9.6],
[34,58.8],
[49,1.2],
[52,105.6],
[24,39.6],
[48,68.4],
[47,86.4],
[50,79.2],
[65,58.8],
[52,43.2],
[57,78],
[41,80.4],
[37,7.2],
[35,54],
[68,15.6],
[32,46.8],
[33,82.8],
[35,84],
[80,33.6],
[38,61.2],
[68,27.6],
[46,76.8],
[27,81.6],
[60,44.4],
[34,43.2],
[54,1.2],
[51,48],
[36,109.2],
[49,37.2],
[24,79.2],
[59,52.8],
[33,12],
[59,90],
[56,90],
[30,38.4],
[41,74.4]
],
markArea: {
silent: true,
itemStyle: {
normal: {
color: 'transparent',
borderWidth: 1,
borderType: 'dashed'
}
},
data: [[{
name: '男性分布区间',
xAxis: 'min',
yAxis: 'min'
}, {
xAxis: 'max',
yAxis: 'max'
}]]
},
markPoint : {
data : [
{type : 'max', name: '最大值'},
{type : 'min', name: '最小值'}
]
},
markLine : {
lineStyle: {
normal: {
type: 'solid'
}
},
data : [
{type : 'average', name: '平均值'}
]
}
},
{
name:'Sample number',
type:'pie',
selectedMode: 'single',
center: ['70%', '20%'],
radius: [0, '10%'],
label: {
normal: {
position: 'inner'
}
},
labelLine: {
normal: {
show: false
}
},
data:[
{value:633, name:'IDHwt'},
{value:335, name:'IDHmut'}
]
},
{
name:'Sample number',
type:'pie',
center: ['70%', '20%'],
radius: ['13%', '20%'],
label: {
normal: {
formatter: '{a|{a}}{abg|}\n{hr|}\n {b|{b}:}{c} {per|{d}%} ',
backgroundColor: '#eee',
borderColor: '#aaa',
borderWidth: 1,
borderRadius: 4,
// shadowBlur:3,
// shadowOffsetX: 2,
// shadowOffsetY: 2,
// shadowColor: '#999',
// padding: [0, 7],
rich: {
a: {
color: '#999',
lineHeight: 22,
align: 'center'
},
// abg: {
// backgroundColor: '#333',
// width: '100%',
// align: 'right',
// height: 22,
// borderRadius: [4, 4, 0, 0]
// },
hr: {
borderColor: '#aaa',
width: '100%',
borderWidth: 0.5,
height: 0
},
b: {
fontSize: 4,
lineHeight: 3
},
per: {
color: '#eee',
backgroundColor: '#334455',
padding: [2, 4],
borderRadius: 1
}
}
}
},
data:[
{value:57, name:'A'},
{value:556, name:'GBM'},
{value:4, name:'OA'},
{value:16, name:'OD'},
{value:145, name:'A'},
{value:62, name:'GBM'},
{value:53, name:'OA'},
{value:73, name:'OD'}
]
}
]
};