How to hide the tooltip in dimplejs?

113 views Asked by At

I used dimple._showPointTooltip to show my tooltip. In mouseout or mouseleave I want hidden it. 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);
}); 
2

There are 2 answers

0
Marcio Ozório de Jesus On BEST ANSWER

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();     
        });     
0
Luis Lopez On

You can remove the circles that have attached the event that shows up the tooltip with this way:

yourSvg.selectAll('circle').remove()