[英]How to hide the tooltip in dimplejs?
I used dimple._showPointTooltip to show my tooltip. 我使用了dimple._showPointTooltip来显示我的工具提示。 In mouseout or mouseleave I want hidden it.
在mouseout或mouseleave中,我想将其隐藏。 Which command do I use to do this?
我该使用哪个命令?
There are many components in this display. 此显示中有很多组件。
Command used to display tooltip: 用于显示工具提示的命令:
myChart.draw();
mySeries.shapes.on("click", function (e) {
dimple._showPointTooltip(e, this, myChart, mySeries);
});
Since I could not find a more suitable solution, I identified each object and removed them: 由于找不到更合适的解决方案,因此我确定了每个对象并将其删除:
series.shapes.on("mouseleave", function (e) {
svg.select(".dimple-tooltip").remove();
svg.select(".dimple-custom-tooltip-box").remove();
svg.select(".dimple-custom-tooltip-label").remove();
svg.select(".dimple-line-marker-circle").remove();
svg.select(".dimple-custom-line-marker-circle").remove();
svg.select(".dimple-tooltip-dropline").remove();
svg.select(".dimple-custom-tooltip-dropline").remove();
});
您可以通过以下方式删除附加了显示工具提示的事件的圈子:
yourSvg.selectAll('circle').remove()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.