color String

The text color of the text block.

Example - setting a color to the text

<div id="diagram"></div>
<script>
  var diagram = kendo.dataviz.diagram;
  function getVisual(data) {
    var g = new diagram.Group();

    g.append(new diagram.Circle({
      width: 60,
      height: 60,
      fill: { color: "#336699" }
    }));

    g.append(new diagram.TextBlock({
      text: data.id,
      x: 25,
      y: 20,
      color: "#fff"
    }));

    return g;
  };

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