Tooltip not showing after updating from v3.4.0
See original GitHub issueTooltip does not show anymore on graphs when data in NULL.
One-line summary [问题简述]
When I was using ecahrts 3.4.0 and I had a graph that was filled with null or undefined. it would show me a tooltip and I used the formatter to make it say N/A
when the value is null or undefined.
Today I updated to the latest version (3.7.1) and realized that tooltips dont show anymore so I downgraded to 3.4.0, it was working again. I went up 1 version (3.5.0) and it was broke so its from that version that this happened.
I looked at the documentation again now to see if something is changed but I couldn’t find anything.
Version & Environment [版本及环境]
- ECharts version [ECharts 版本]: 3.5.0
- Browser version [浏览器类型和版本]: Chrome 60
- OS Version [操作系统类型和版本]: Window 10
Expected behaviour [期望结果]
ECharts option [ECharts配置项]
option = {
title: {
text: '',
subtext: ''
},
tooltip: {
show: true,
trigger: 'axis',
axisPointer: {
show: true,
type: 'cross',
label: {
show: true
}
},
formatter: function (params) {
console.log('value is ' + params); //THIS LINE DOES NOT RUN..
let value = '';
if(params[0].data === undefined || params[0].data === null) {
value = 'N/A';
} else {
value = (params[0].data).toFixed(2);
}
let text = "<span style=\"color:" + params[0].color + "\">\u25CF</span> " + params[0].seriesName + ": " + value;
return params[0].name + "<br />" + text;
}
},
axisPointer: {
show: true,
type: 'line'
},
legend: {
show: false
},
toolbox: {
show: true,
feature: {
magicType: {
show: true,
title: {
line: 'Line',
bar: 'Bar'
},
type: ['line', 'bar']
},
restore: {
show: true,
title: "Restore"
},
saveAsImage: {
show: true,
title: "Save Image"
}
}
},
calculable: true,
xAxis: [{
type: 'category',
boundaryGap: false,
data: []
}],
yAxis: [{
type: 'value',
min: 0,
max: 20
}],
series: [{
name: 'TPS',
type: 'line',
smooth: true,
itemStyle: {
normal: {
areaStyle: {
type: 'default'
}
}
},
data: []
}]
}
Other comments [其他信息]
What the graph tooltip should look like:
What it looks like now:
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Tooltip not showing after updating from v3.4.0 #6710 - GitHub
Today I updated to the latest version (3.7.1) and realized that tooltips dont show anymore so I downgraded to 3.4.0, it was working...
Read more >Updating the tooltip content doesnt update because its ...
1 Answer 1 · Make sure title attribute and data-toggle attributes are present on the input element. Bind tooltip to input element itself....
Read more >Tooltips - Bootstrap
The tooltip plugin generates content and markup on demand, and by default places tooltips after their trigger element. Trigger the tooltip via JavaScript:...
Read more >The venue isn't displayd in tooltip after upgrading The Events ...
Hi,. After we upgraded The Events Calendar plugin to version 6 the venue has disappeared from the tooltip. It was working perfectly in...
Read more >TinyTooltip - Addons - World of Warcraft - CurseForge
Hi, the anchor is not really working when it's static, the tooltip doesn't show on the anchor, but on the bottom right, anyone...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same issue with the tooltip not showing up using echarts within a Vue project. After a while I realized that I have to import different components I make use of in the chart. Amongst these is the tooltip component. The following resolved the issue for me:
This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!