visible

Gets or sets the visibility of the current element.

Parameters

visible Boolean

The new visibility state.

Returns

Boolean True if the element is visible, false otherwise.

Example

<div id="diagram"></div>
<script>
  $("#diagram").kendoDiagram({
    shapes: [{
      visual: function() {
        var group = new kendo.dataviz.diagram.Group();
        var polyline = new kendo.dataviz.diagram.Polyline({
          points: [{x: 0, y: 0}, {x: 50, y: 0}, {x: 100, y: 100}]
        });
        group.append(polyline);
        
        // Check current visibility
        var isVisible = polyline.visible();
        console.log("Polyline is visible:", isVisible);
        
        // Hide the polyline
        polyline.visible(false);
        
        return group;
      }
    }]
  });
</script>
In this article
visible
Not finding the help you need?
Contact Support