position

Get or sets the element position.

Example

<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
    shapes: [{
        type: "image",
        x: 100,
        y: 100,
        source: "https://demos.telerik.com/kendo-ui/content/dataviz/diagram/people/liam.png",
        height: 100,
        width: 100
    }]
});

var diagram = $("#diagram").getKendoDiagram();
var imageShape = diagram.shapes[0];

// Get current position
var currentPosition = imageShape.position();
console.log("Current position:", currentPosition);

// Set new position
imageShape.position({x: 200, y: 150});
</script>

Parameters

offset kendo.dataviz.diagram.Point

The origin of the element.

In this article
position
Not finding the help you need?
Contact Support