rotate

Rotates the element with the specified parameters.

Parameters

angle NumberThe 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.PointThe center of rotation.

Example - rotating the Circle element

<div id="diagram"></div>
<script>
  var diagram = kendo.dataviz.diagram;
  function getVisual(data) {
    var g = new diagram.Group({
      autoSize: true
    });
    var r = new diagram.Circle({
      center: {x: 40, y: 40},
      radius: 40,
      fill: {
        gradient: {
          type: "linear",
          stops: [{
            color: "green",
            offset: 0,
            opacity: 0.5
          }, {
            color: "yellow",
            offset: 1,
            opacity: 1
          }]
        }
      }
    });

    r.rotate(45, new kendo.dataviz.diagram.Point(40, 40));
    g.append(r);

    return g;
  };

  $("#diagram").kendoDiagram({
    layout: "tree",
    shapes: [{
      id: "1",
      content: {
        text: "Monday"
      },
      visual: getVisual
    }]
  });
</script>
In this article