visible
Gets or sets the visibility of the current element.
Example
<div id="diagram"></div>
<script>
var diagram = $("#diagram").kendoDiagram({
shapes: [{
type: "rectangle",
x: 100,
y: 100,
width: 200,
height: 100,
fill: {
color: "#ff6358"
}
}]
}).getKendoDiagram();
var rectangle = diagram.shapes[0];
// Hide the rectangle
rectangle.visible(false);
console.log("Visibility:", rectangle.visible());
// Show the rectangle again
rectangle.visible(true);
console.log("Visibility:", rectangle.visible());
</script>
Parameters
visible Boolean
The new visibility state.
Returns
Boolean True if the element is visible, false otherwise.
In this article