markPoint的label定位, position, 如何相对于整个图来定位, 而不是根据markPoint的位置啊?
配置项如下
var option = {
grid: {
left: 14,
right: 270,
top: 14,
bottom: 14,
containLabel: true,
show: false,
},
xAxis: [{
type: 'value',
boundaryGap: false,
axisLine: {
show: false,
},
axisTick: {
show: false
},
axisLabel: {
show: false,
},
splitLine: {
lineStyle: {
color: 'transparent',
},
},
}],
yAxis: [{
type: 'value',
boundaryGap: false,
axisLine: {
show: false,
},
axisTick: {
show: false
},
axisLabel: {
color: '#c4c4c4',
},
splitLine: {
lineStyle: {
color: 'transparent',
},
},
}],
series: [{
type: 'line',
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: 'rgba(99,217,139,.2)' // 0% 处的颜色
// color:'red'
}, {
offset: 0.2,
color: 'rgba(99,217,139,.2)' // 0% 处的颜色
// color:'red'
},{
offset: 0.2,
color: 'rgba(99,217,139,.4)' // 0% 处的颜色
// color:'yellow'
},{
offset: 1,
color: 'rgba(99,217,139,.4)' // 100% 处的颜色
// color:'yellow'
}],
globalCoord: false // 缺省为 false
}
},
itemStyle: {
color: '#63D98B '
},
smooth: true,
data: [
[0, 0],
[23, 50],
[24, 60],
[14, 70],
[35, 80],
[15, 90],
[12, 105],
[0, 120],
],
markPoint: {
symbol: 'circle',
symbolSize: 1,
label: {
show: true,
position: [0,0],
formatter: [
'{a|你在这里}'
].join('\n'),
rich: {
a: {
color: '#000',
fontSize: '14',
width: 110,
height: 32,
align: 'center',
}
}
},
data: [{
name: '你的坐标',
x:200,
y:200
}]
}
}]
}