visible

Gets or sets the visibility of the current element.

Example

<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
    shapes: [{
        type: "image",
        x: 100,
        y: 100,
        source: "https://demos.telerik.com/kendo-ui/content/dataviz/diagram/people/liam.png",
        height: 100,
        width: 100
    }]
});

var diagram = $("#diagram").getKendoDiagram();
var imageShape = diagram.shapes[0];

// Get current visibility
var isVisible = imageShape.visible();
console.log("Is visible:", isVisible);

// Hide the image
imageShape.visible(false);

// Show the image again
setTimeout(() => {
    imageShape.visible(true);
}, 2000);
</script>

Parameters

visible Boolean

The new visibility state.

Returns

Boolean True if the element is visible, false otherwise.

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