我不想tooltip跟着鼠标走, 我想位置在那个坐标的点上, 如何弄啊?
还有, 如果我只想要线, 不要坐标的点, 应该怎么设置
谢谢
配置项如下
var option = {
grid: {
left: 14,
right: 34,
top: 14,
bottom: 21,
containLabel: true,
},
tooltip: {
trigger:"axis",
formatter: function(params) {
return `<p class="pic-p"><span>${params[0].axisValue} </span><br><span>${params[0].data}分</span></p>`
},
backgroundColor: '#77bffc',
textStyle: {
color: '#fff'
},
padding: [0,15,3,15],
axisPointer: {
lineStyle: {
color: 'transparent',
}
},
position:["10%","10%"],
alwaysShowContent:true,
show:true
},
xAxis: [{
type: 'category',
boundaryGap: false,
data: ['11月15日', '11月30日', '12月15日'],
axisTick: {
show: false
},
axisLabel: {
color: '#c4c4c4',
},
axisLine: {
show: false,
},
}],
yAxis: [{
type: 'value',
boundaryGap: true,
axisTick: {
show: false
},
axisLine: {
show: false,
},
axisLabel: {
color: '#c4c4c4',
},
splitLine: {
lineStyle: {
color: '#F4F6F9',
},
},
}],
series: [{
type: 'line',
symbolSize:0,
smooth: true,
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: '#c9e9ff' // 0% 处的颜色
}, {
offset: 1,
color: '#fff' // 100% 处的颜色
}],
globalCoord: false // 缺省为 false
}
},
itemStyle: {
color: '#a2d4ff'
},
data: [45, 89, 200]
}]
};