我想让坐标轴的交点是x轴和y轴的中心点,这个怎么设置,然后在x轴0点的位置在设置一条虚线,求大神赐教
配置项如下
option = {
title: {
text: ''
},
legend: {
right: 10,
data: ['养生茶', '汤膏']
},
xAxis: {
name: '市场曾速',
splitLine: {
lineStyle: {
type: 'dashed'
}
}
},
yAxis: {
name: '竞争率',
splitLine: {
lineStyle: {
type: 'dashed'
}
},
scale: true
},
series: [{
name: '养生茶',
data: [
[-8.57, 3.7, 3711884111.41, '养生茶'], [50.57, 5.7, 3718182111.41, '社会人']
],
type: 'scatter',
symbolSize: function(data) {
return Math.sqrt(data[2]) / 5e2;
},
label: {
emphasis: {
show: true,
formatter: function(param) {
return param.data[3];
},
position: 'inside'
}
},
itemStyle: {
}
}, {
name: '汤膏',
data: [
[12.06, 3.39, 3791864111.9, '汤膏']
],
type: 'scatter',
symbolSize: function(data) {
return Math.sqrt(data[2]) / 5e2;
},
label: {
emphasis: {
show: true,
formatter: function(param) {
return param.data[3];
},
position: 'inside'
}
},
itemStyle: {
}
}]
};