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

Selectable.stroke

configuration

Defines the selection line configuration.

<div id="diagram"></div>
<script>
  $("#diagram").kendoDiagram({
    layout: {
      type: "tree",
      subtype: "right"
    },
    selectable: {
      stroke: {
        dashType: "longDashDot",
        color: "blue",
        width: 2
      }
    },
    shapes: [{
      id: "1",
      content: {
        text: "Monday"
      }
    }, {
      id: "2",
      content: {
        text: "Tuesday"
      }
    }, {
      id: "3",
      content: {
        text: "Wednesday"
      }
    }],
    connections: [{
      from: "1",
      to: "2"
    },{
      from: "2",
      to: "3"
    }],
    connectionDefaults: {
      endCap: "ArrowEnd"
    }
  });
</script>

Defines the selection stroke color. Accepts valid CSS colors.

<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
    shapes: [
        { id: "1", x: 100, y: 100, content: { text: "Shape 1" } }
    ],
    selectable: {
        stroke: {
            color: "red"
        }
    }
});
</script>

Defines the selection dash type. The following dash types are supported:

  • "dash" - a line consisting of dashes
  • "dashDot" - a line consisting of a repeating pattern of dash-dot
  • "dot" - a line consisting of dots
  • "longDash" - a line consisting of long dashes
  • "longDashDot" - a line consisting of a repeating pattern of long dash-dot
  • "longDashDotDot" - a line consisting of a repeating pattern of long dash-dot-dot
  • "solid" - a solid line
<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
    shapes: [
        { id: "1", x: 100, y: 100, content: { text: "Shape 1" } }
    ],
    selectable: {
        stroke: {
            color: "blue",
            dashType: "dash"
        }
    }
});
</script>

Defines the selection stroke width.

<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
    shapes: [
        { id: "1", x: 100, y: 100, content: { text: "Shape 1" } }
    ],
    selectable: {
        stroke: {
            color: "green",
            width: 3
        }
    }
});
</script>