Draw Dotted Line In Organizational Chart using Joint Js

869 views
Skip to first unread message

Dhirendra Saxena

unread,
Nov 12, 2014, 8:23:38 AM11/12/14
to joi...@googlegroups.com

I have Implemented Organizational Chart Using Joint Js and it’s working very smooth, But if I want to link the two boxes with Dotted Line rather then by Smooth Line. For this requirement where I have to make the changes.

David Durman

unread,
Nov 12, 2014, 9:01:53 AM11/12/14
to joi...@googlegroups.com
Dotted lines on links can be set by using the stroke-dasharray SVG attribute on the .connection SVG <path>:

var link = new joint.dia.Link({
   ...
   attrs: {
      '.connection': { 'stroke-dasharray': '2,5' }
   }
   ...
})

Here is more info on 'stroke-dasharray' attribute: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray and here is a tutorial on link styling: http://jointjs.com/tutorial#link-styling.

---

David Durman
client IO

On Wed, Nov 12, 2014 at 2:23 PM, Dhirendra Saxena <dhsax...@gmail.com> wrote:

I have Implemented Organizational Chart Using Joint Js and it’s working very smooth, But if I want to link the two boxes with Dotted Line rather then by Smooth Line. For this requirement where I have to make the changes.

--

---
You received this message because you are subscribed to the Google Groups "JointJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jointjs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages