rotate
Rotates the element with the specified parameters.
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.
Example
<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
shapes: [{
id: "rect1",
type: "rectangle",
x: 50,
y: 50,
height: 100,
width: 150
}]
});
var diagram = $("#diagram").getKendoDiagram();
var shape = diagram.getShapeById("rect1");
var rect = diagram.shapes[0];
// Create rotation center point
var center = new kendo.dataviz.diagram.Point(125, 100);
// Rotate the rectangle 45 degrees clockwise
rect.rotate(45, center);
console.log("Rectangle rotated 45 degrees around center point");
// Rotate with negative angle (counter-clockwise)
rect.rotate(-30, center);
console.log("Rectangle rotated -30 degrees around center point");
</script>