[英]echarts.js pie chart tooltip on hover not working
I have pie chart using echarts.min.js . 我有使用echarts.min.js的饼图。 Problem is on hovering, tooltip is not showing.
问题在悬停时,工具提示未显示。 My code is
我的代码是
var echartPie = echarts.init(document.getElementById('mediaUserChart'));
echartPie.setOption({
tooltip: {
trigger: 'item',
formatter: "{a} - {b} : {c} ({d}%)"
},
hover:true,
legend: {
x: 'center',
y: 'bottom',
data:
['others', 'just dial', 'trade india', 'india mart']
},
toolbox: {
show: true,
feature: {
magicType: {
show: true,
type: ['pie', 'funnel'],
option: {
funnel: {
x: '25%',
width: '50%',
funnelAlign: 'left',
max: 1548
}
}
},
restore: {
show: false,
title: "Restore"
},
saveAsImage: {
show: false,
title: "Save Image"
}
}
},
calculable: true,
series: [{
name: 'Media Users',
type: 'pie',
radius: '55%',
center: ['50%', '48%'],
data:
[{
value: 335,
name: 'others'
}, {
value: 234,
name: 'just dial'
}, {
value: 135,
name: 'trade india'
}, {
value: 1548,
name: 'india mart'
}]
}]
});
I used tooltip option here. 我在这里使用了工具提示选项。 still its not showing tooltip.
仍然没有显示工具提示。 Can anybody knows the solution for this problem ?
有人知道这个问题的解决方案吗?
https://jsfiddle.net/n8rvq66r/ https://jsfiddle.net/n8rvq66r/
我将<canvas id="mediaUserChart" ></canvas>
更改为<div id="mediaUserChart" style="height:350px;"></div>
它对我<div id="mediaUserChart" style="height:350px;"></div>
...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.