position

Get or sets the element position.

Parameters

offset kendo.dataviz.diagram.PointThe origin of the element.

Example - setting the text block position dynamically

<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
    });

    g.append(text);

    text.position(new kendo.dataviz.diagram.Point(18, 20));

    return g;
  };

  $("#diagram").kendoDiagram({
    layout: "tree",
    shapes: [{
      id: 123,
      visual: getVisual
    }]
  });
</script>
In this article