New to Kendo UI for jQueryStart a free 30-day trial

Position

methods

Get or set method returning the current global position or sets the position specified.

Parameters:pointkendo.dataviz.diagram.Point

Either the location to set or if no parameter given returns the current location.

<div id="diagram"></div>
<script>
  var shapesDataSource = {
    data: [
      { id: 1, JobTitle: "Job 1", Color: "red" },
      { id: 2, JobTitle: "Job 2", Color: "blue" },
      { id: 3, JobTitle: "Job 3", Color: "green" }
    ]
  };

  var connectionsDataSource = {
    data: [
      { id: 1, from: 1, to: 2},
      { id: 2, from: 1, to: 3},
    ]
  };

  var diagram = $("#diagram").kendoDiagram({
    dataSource: shapesDataSource,
    connectionsDataSource: connectionsDataSource,
    layout: {
      type: "tree"
    },
    shapeDefaults: {
      content: {
        template: "#= dataItem.JobTitle #"
      }
    }
  }).getKendoDiagram();

  diagram.shapes[0].position(new kendo.dataviz.diagram.Point(20, 20));
</script>
Not finding the help you need?
Contact Support