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 path = new kendo.dataviz.diagram.Path({
          data: "M 80 0 C 100 0 100 0 100 20 L 100 80 C 100 100 100 100 80 100 L 20 100 C 0 100 0 100 0 80 L 0 20 C 0 0 0 0 20 0Z",
          fill: "red"
        });
        group.append(path);
        
        // Hide the path
        path.visible(false);
        
        // Show the path again
        setTimeout(function() {
          path.visible(true);
          console.log("Path is visible:", path.visible());
        }, 1000);
        
        return group;
      }
    }]
  });
</script>
In this article
visible
Not finding the help you need?
Contact Support