当前位置:网站首页>Set the position of the prompt box to move with the mouse, and solve the problem of incomplete display of the prompt box
Set the position of the prompt box to move with the mouse, and solve the problem of incomplete display of the prompt box
2022-07-27 15:36:00 【polite】
https://www.cnblogs.com/zhilu/p/14047105.html
tooltip: {
trigger: 'axis',
// position: ['50%', '50%'],
position: function(point, params, dom, rect, size) {
var x = 0;
var y = 0;
var pointX = point[0];
var pointY = point[1];
var boxWidth = size.contentSize[0];
var boxHeight = size.contentSize[1];
if (boxWidth > pointX) {
x = 5;
} else {
x = pointX - boxWidth;
}
if (boxHeight > pointY) {
y = 5;
} else {
y = pointY - boxHeight;
}
return [x, y];
},
axisPointer: {
type: 'shadow'
},
textStyle: {
color: '#fff'
},
formatter: function(datas) {
let res = datas[0].name + '<br/>';
let val;
const length = datas.length;
for (let i = 0; i < length; i++) {
val = datas[i].value.toFixed(num).replace(/\d(?=(\d{
3})+\.)/g, '$&,');
// console.log(val);
res +=
'<span style="display:inline-block;margin-right:0.05rem;border-radius:0.05rem;width:0.1rem;height:0.1rem;background-color:' +
datas[i].color +
';"></span>' +
datas[i].seriesName +
':' +
val +
'<br/>';
}
return res;
}
},
边栏推荐
- MySQL interview 40 consecutive questions, interviewer, if you continue to ask, I will turn my face
- EMC design scheme of RS485 interface
- Tools - common methods of markdown editor
- DIY ultra detailed tutorial on making oscilloscope: (1) I'm not trying to make an oscilloscope
- Network equipment hard core technology insider router Chapter 5 tompkinson roaming the network world (Part 1)
- C language: factorial recursive implementation of numbers
- 扩展Log4j支持日志文件根据时间分割文件和过期文件自动删除功能
- IJCAI 2022 outstanding papers were published, and 298 Chinese mainland authors won the first place in two items
- Record record record
- Leetcode 240. search two-dimensional matrix II medium
猜你喜欢

【剑指offer】面试题45:把数组排成最小的数

QT (five) meta object properties
![[0 basic operations research] [super detail] column generation](/img/cd/f2521824c9ef6a50ec2be307c584ca.png)
[0 basic operations research] [super detail] column generation

实现自定义Spark优化规则

Adaptation verification new occupation is coming! Huayun data participated in the preparation of the national vocational skill standard for information system adaptation verifiers

西瓜书《机器学习》阅读笔记之第一章绪论
Principle of MOS tube to prevent reverse connection of power supply

Leetcode 240. search two-dimensional matrix II medium

DIY ultra detailed tutorial on making oscilloscope: (1) I'm not trying to make an oscilloscope

Spark 3.0 Adaptive Execution 代码实现及数据倾斜优化
随机推荐
Network equipment hard core technology insider router Chapter 4 Jia Baoyu sleepwalking in Taixu Fantasy (Part 2)
Database: use the where statement to retrieve (header song)
STM32F10x_ Hardware I2C read / write EEPROM (standard peripheral library version)
Spark Filter算子在Parquet文件上的下推
Network equipment hard core technology insider router Chapter 7 tompkinson roaming the network world (Part 2)
Leetcode 1143. dynamic programming of the longest common subsequence /medium
实现自定义Spark优化规则
Leetcode 341. flattened nested list iterator DFS, stack / medium
Singles cup, web:web check in
Lua study notes
Pytorch replaces some components in numpy. / / please indicate the source of the reprint
Dan bin Investment Summit: on the importance of asset management!
The design method of integral operation circuit is introduced in detail
How to take satisfactory photos / videos from hololens
Leetcode 244 week competition - post competition supplementary question solution [broccoli players]
Spark3中Catalog组件设计和自定义扩展Catalog实现
MySQL interview 40 consecutive questions, interviewer, if you continue to ask, I will turn my face
Unity performance optimization ----- drawcall
Leetcode-1737- minimum number of characters to change if one of the three conditions is met
Digital storage oscilloscope based on FIFO idt7202-12