position: function (point, params, dom, rect, size) {
let x = 0;
let y = 0;
let pointX = point[0];
let pointY = point[1];
let boxWidth = size.contentSize[0];
let boxHeight = size.contentSize[1];
if (boxWidth > pointX) {
x = pointX + 10;
} else {
x = pointX - boxWidth + boxWidth/2;
}
if (boxHeight > pointY) {
y = 5;
} else {
y = pointY - boxHeight;
}
return [x, y];
},
【echarts】修改tooltip位置
最新推荐文章于 2024-05-29 14:11:59 发布