visible
Gets or sets the visibility of the current element.
Parameters
visible Boolean
The new visibility state.
ReturnsBoolean
True if the element is visible, false otherwise.
Example - hiding the text block
<div id="diagram"></div>
<script>
var diagram = kendo.dataviz.diagram;
function getVisual(data) {
var g = new diagram.Group();
g.append(new diagram.Circle({
width: 60,
height: 60,
fill: { color: "#add8e6" }
}));
var text = new diagram.TextBlock({
text: "123",
x: 18,
y: 20
});
g.append(text);
text.visible(false);
return g;
};
$("#diagram").kendoDiagram({
layout: "tree",
shapes: [{
id: 123,
visual: getVisual
}]
});
</script>