New to Kendo UI for jQueryStart a free 30-day trial

Fill

configuration

Defines the fill options of the polyline.

fill

String|Object
<div id="diagram"></div>
<script>
  $("#diagram").kendoDiagram({
    shapes: [{
      visual: function() {
        var group = new kendo.dataviz.diagram.Group();
        group.append(new kendo.dataviz.diagram.Polyline({
          points: [{x: 0, y: 0}, {x: 50, y: 0}, {x: 100, y: 100}],
          fill: "lightblue"
        }));
        return group;
      }
    }]
  });
</script>

Defines the fill color of the polyline.

<div id="diagram"></div>
<script>
  $("#diagram").kendoDiagram({
    shapes: [{
      visual: function() {
        var group = new kendo.dataviz.diagram.Group();
        group.append(new kendo.dataviz.diagram.Polyline({
          points: [{x: 0, y: 0}, {x: 50, y: 0}, {x: 100, y: 100}],
          fill: {
            color: "yellow"
          }
        }));
        return group;
      }
    }]
  });
</script>

Defines the gradient fill of the polyline.

<div id="diagram"></div>
<script>
  $("#diagram").kendoDiagram({
    shapes: [{
      visual: function() {
        var group = new kendo.dataviz.diagram.Group();
        group.append(new kendo.dataviz.diagram.Polyline({
          points: [{x: 0, y: 0}, {x: 50, y: 0}, {x: 100, y: 100}],
          fill: {
            gradient: {
              type: "linear",
              start: [0, 0],
              end: [1, 1],
              stops: [
                { offset: 0, color: "red" },
                { offset: 1, color: "blue" }
              ]
            }
          }
        }));
        return group;
      }
    }]
  });
</script>

Defines the fill opacity of the polyline.

Default: 1

<div id="diagram"></div>
<script>
  $("#diagram").kendoDiagram({
    shapes: [{
      visual: function() {
        var group = new kendo.dataviz.diagram.Group();
        group.append(new kendo.dataviz.diagram.Polyline({
          points: [{x: 0, y: 0}, {x: 50, y: 0}, {x: 100, y: 100}],
          fill: {
            color: "red",
            opacity: 0.3
          }
        }));
        return group;
      }
    }]
  });
</script>