You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.8 KiB
67 lines
1.8 KiB
export default function createOpt(data = [],extraData = []) {
|
|
return {
|
|
grid: {
|
|
left: '6%',
|
|
// top: '10%'
|
|
},
|
|
xAxis: {
|
|
splitLine: false,
|
|
scale: true,
|
|
axisLabel: {
|
|
color: '#FFF'
|
|
}
|
|
},
|
|
yAxis: {
|
|
splitLine: false,
|
|
scale: true,
|
|
axisLabel: {
|
|
formatter: function(value) {
|
|
return value / 10000 + '万元'
|
|
},
|
|
color: '#FFF'
|
|
}
|
|
},
|
|
series: [
|
|
{
|
|
name: 'total',
|
|
data: data,
|
|
type: 'scatter',
|
|
symbolSize: function (data) {
|
|
return data[2] / 600;
|
|
},
|
|
label: {
|
|
show: true,
|
|
formatter: function (param) {
|
|
return param.data[3];
|
|
},
|
|
color: '#FFF',
|
|
fontSize: 12,
|
|
fontWeight: 550,
|
|
position: 'inside'
|
|
},
|
|
itemStyle: {
|
|
color: '#3373CC',
|
|
}
|
|
},
|
|
{
|
|
name: 'extra',
|
|
data: extraData,
|
|
type: 'scatter',
|
|
symbolSize: function (data) {
|
|
return data[2] / 200;
|
|
},
|
|
label: {
|
|
show: true,
|
|
formatter: function (param) {
|
|
return param.data[3];
|
|
},
|
|
color: '#FFF',
|
|
position: 'inside'
|
|
},
|
|
itemStyle: {
|
|
color: '#CC9D12',
|
|
}
|
|
},
|
|
]
|
|
}
|
|
} |