position

Get or sets the element position.

Parameters

offset kendo.dataviz.diagram.Point

The origin of the element.

Example

<div id="diagram"></div>
<script>
 var shape1 = new kendo.dataviz.diagram.Rectangle({
    x: 50,
    y: 50,
    width: 100,
    height: 50,
    fill: {
        color: "#6EB5FF"
    }
});

var group = new kendo.dataviz.diagram.Group();
group.append(shape1);

var drawingElement = group.drawingElement;
console.log("Drawing element type:", drawingElement.nodeType);

 var currentPosition = group.position();
console.log("Current position:", currentPosition);

var newPosition = new kendo.dataviz.diagram.Point(300, 250);
group.position(newPosition);
console.log("New position:", group.position());
</script>
In this article
position
Not finding the help you need?
Contact Support