visible

Gets or sets the visibility of the current element.

Parameters

visible BooleanThe new visibility state.

ReturnsBoolean True if the element is visible, false otherwise.

Example - hiding a Circle element

<div id="diagram"></div>
<script>
  var diagram = kendo.dataviz.diagram;
  function getVisual(data) {
    var g = new diagram.Group({
      autoSize: true
    });
    var r1 = new diagram.Circle({
      center: {x: 40, y: 40},
      radius: 40,
      fill: {
        color: "green"
      }
    });

    var r2 = new diagram.Circle({
      center: {x: 40, y: 40},
      radius: 40,
      fill: {
        color: "red"
      }
    });

    r2.visible(false);

    g.append(r1);
    g.append(r2);
    return g;
  };

  $("#diagram").kendoDiagram({
    layout: "tree",
    shapes: [{
      id: "1",
      content: {
        text: "Monday"
      },
      visual: getVisual
    }]
  });
</script>
In this article
Not finding the help you need? Improve this article