Skip to content

Commit

Permalink
Add example for including only some connectors
Browse files Browse the repository at this point in the history
  • Loading branch information
tsvetomir committed Jan 19, 2016
1 parent 8af974e commit e192308
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions docs/api/javascript/dataviz/ui/diagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -1678,12 +1678,25 @@ Defines the connectors the shape owns.
* "left" - left connector.
* "auto" - auto connector.

You can easily define your own custom connectors or mix-match with the above defined custom connectors.
You can define your own custom connectors or use the predefined types.

#### Example - Include only some connectors

<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
dataSource: [{name: "item1"}],
shapeDefaults: {
connectors: [{ name: "top" }, { name: "left" }]
}
});
</script>

Example - custom shape with custom connectors

The following defines a custom shape with connectors adapted to the shape's outline. Note in particular the various helpful methods (right(), left(), top()) to define positions relative to the shape.

#### Example - Custom shape with custom connectors

<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
Expand Down

0 comments on commit e192308

Please sign in to comment.