showTooltip

Shows the surface tooltip for the passed shape.

Example

<div id="container"></div>
<button onclick="showTooltipManually()">Show Tooltip</button>
<script>
    var draw = kendo.drawing;
    var geom = kendo.geometry;
    var surface = draw.Surface.create($("#container"), {
        width: "400px",
        height: "300px"
    });

    var circle = new draw.Circle(new geom.Circle([200, 150], 50), {
        tooltip: {
            content: "Manually triggered tooltip"
        }
    }).fill("cyan");

    surface.draw(circle);

    function showTooltipManually() {
        surface.showTooltip(circle, {
            content: "Custom tooltip content"
        });
/* The result can be observed in the DevTools(F12) console of the browser. */
        console.log("Tooltip shown manually");
    }
</script>

Parameters

element kendo.drawing.Element

The element for which the tooltip should be shown.

options Object optional

Options for the tooltip.

In this article
showTooltip
Not finding the help you need?
Contact Support