Dashed lines for Links and Group outlines

Hi All,

How can I draw links as a dashed or dotted lines? Also how could I do a dashed or dotted line around a shape for use by a group or a node?

I have been over the stroke, colour and brush settings, but so far have had no luck in finding any way of doing this?

Any suggestions would be great thanks.


HTML Canvas does not support dashed (or dotted) lines. We have thought about simulating this, but this is non-trivial for the general cases, so we postponed implementing such a feature.

If you want a dashed rectangle or straight line, we might be able to provide the code for that.

Hi Walter,

Thanks for the info, that is super. I was not aware of that limitation on the HTML canvas. If you have any suggestions or sample code, that would be great, but we will most likely just not support it.



Hi walter is there any way to make dotted link in gojs

Well, that is a quite obsolete topic – we added support for dashed strokes in version 1.1. Shape | GoJS API You can find several examples by searching the sample sources. One example is Euler Diagram.

We even implemented dashed lines in our own software on those platforms that did not natively support drawing dashes or dots, such as IE 9, although of course our JavaScript implementation is much slower than any native implementation.

Even further, in 1.6 we documented Shape | GoJS API, to allow for even fancier Shape strokes: Custom Relationships

is there any way to make dotted node in gojs

Just define the node template the way that you want, and then specify Shape.strokeDashArray on the Shape(s) that you want to be drawn with a dotted line.

(This assumes that Shape.strokeWidth is not set to zero, of course – otherwise there wouldn’t be any line to be drawn dotted or not.)

A post was split to a new topic: Making a node inside a node

A post was split to a new topic: How to add checkbox to DataInspector?