admin管理员组文章数量:1321062
I am using Echart.js library.
var echartLine = echarts.init(document.getElementById('myChart'), theme);
In echart option I add :
tooltip: {
show: true,
showContent: true,
alwaysShowContent: true,
triggerOn: 'mousemove',
trigger: 'axis',
axisPointer:
{
label: {
show: true,
}
}
},
Tooltip don't appear. Image is bellow.
I am using Echart.js library.
var echartLine = echarts.init(document.getElementById('myChart'), theme);
In echart option I add :
tooltip: {
show: true,
showContent: true,
alwaysShowContent: true,
triggerOn: 'mousemove',
trigger: 'axis',
axisPointer:
{
label: {
show: true,
}
}
},
Tooltip don't appear. Image is bellow.
Share Improve this question edited Mar 8, 2018 at 11:52 Shashwat 2,3501 gold badge17 silver badges35 bronze badges asked Mar 8, 2018 at 11:22 aleks.rualeks.ru 532 silver badges5 bronze badges 1- Its because its in canvas element. I try to add in div but its doesn't render chart. Can anyone now why? – aleks.ru Commented Mar 8, 2018 at 12:57
5 Answers
Reset to default 2Change the option trigger: 'axis' to trigger: 'item' and it should work like a charm.
for visitors: do not use canvas
as container, init
your echarts with div
instead, tooltips should show then.
My mistake was that I put the "tooltip" object into the "series" object. Don't be like me. Put these objects near.
In my case work when i add the option axisPointer.axis to 'x', leaving like this:
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
axis: "x"
}
}
My tool tip in Eachart was not showing. The mistake was using allow copy extension of Google Chrome, so please check that is active or not, please disable the extension the total tip will shows in charts.
本文标签: javascriptEchartjs charts isn39t showing tooltipStack Overflow
版权声明:本文标题:javascript - Echart.js charts isn't showing tooltip - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742090611a2420244.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论