rotate

Rotates the element with the specified parameters.

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];

// Rotate the image by 45 degrees around its center
var center = {x: 150, y: 140}; // Center of the image
imageShape.rotate(45, center);
</script>

Parameters

angle Number

The angle of rotation in decimal degrees. Measured in clockwise direction with 0 pointing "right". Negative values or values greater than 360 will be normalized.

center kendo.dataviz.diagram.Point

The center of rotation.

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