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.
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.
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.
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.)