I maintain a list of browser based text to diagram tools (which I have shared a number of times here). I recently realised that the online version of D2 does NOT work solely in browser, diagram's are generated by backend servers. Can D2 work in browser by itself? Does the extension mentioned in the post work offline? (lots of tools do)
It does now! (As of a week ago) Check out the network tab in the d2 playground. It's powered by d2.js, a wrapper around a wasm port of d2, which we've recently been working on. Not super officially ready yet but soon to be, and will be a separate announcement.
D2 (text to diagram tool) now supports ASCII renders
71–74 of 74 posts
Re: D2 (text to diagram tool) now supports ASCII renders
#721. how does this add value over mermaid? I like how it looks and works, but is there any real reason to switch over. 2. in my opinion, what all these tools are missing is the ability to add a manual „corrective“ layer, meaning to be able to adjust the automatically created output by moving and resizing boxes by a certain x/y amount.
As a longtime Mermaid user that just started trying out D2 recently:
* D2's syntax is much less cumbersome to write and, from the features provided, I would expect maintain because of better abstractions.
* While D2 supports fewer canned diagram types out-of-the-box (a big advantage for Mermaid), D2 has better composition support (via layers and scenarios, particularly) than Mermaid, which is a killer feature for lots of use cases. If I need a Sankey diagram, obviously, Mermaid wins; if I want to do a leveled DFD, while I could in theory use either, D2 is much better.
* D2 has more freedom for mixing elements, because instead of being oriented around diagram types, it uses some special shapes within what amounts to a single universal diagram type ("sequence diagrams" work a bit like a diagram type, but the diagram itself is a shape that can be used like other shapes, and tables [as used in ERDs] and classes [as used in UML class diagrams] are also just shapes, not a construct available in particular diagram types.)
> in my opinion, what all these tools are missing is the ability to add a manual „corrective“ layer, meaning to be able to adjust the automatically created output by moving and resizing boxes by a certain x/y amount.
Technically, I think you can do that in Mermaid (by attaching CSS classes to the nodes that do the actual nudging) if you really want to.
Re: D2 (text to diagram tool) now supports ASCII renders
#73Earlier quoted context omitted.
Clearly things have changed a bit recently but since a long time I use D2 exclusively locally. The binary has a watch mode that starts a web server and pushes changes on save so you can interactively develop your diagrams and e.g. share the web browser over a video conference or such. I don't know about that Mermaid thing others are talking about in the thread so I can't compare but D2 is very easy to learn the basic…
Yes, but why have all that effort in spinning a web server when I can just give a link to a place where I have embedded the chart? Or even embed it in whatever chat you have that presentation on? Don't need the binary anywhere, that's the strength of Mermaid Until that D2 wasm port is officially released, I don't think it's even fair to call D2 competition to Mermaid, it's on a complete other level of useability. I'm…
Re: D2 (text to diagram tool) now supports ASCII renders
#74Earlier quoted context omitted.
Good luck, it would be fantastic if you can get it accepted as a mermaid alternative; it's much, much niceer than mermaid, both the visual result, and the language. I've used D2 heavily for a couple of years or so now. It's really fantastic. I hope you're paid product is healthy. Sequence diagrams are my most common diagram type by some way I think. And I seem to always use the sketch rendering over the last year. Wh…
The linking you can do already if I understand the request correctly: https://play.d2lang.com/?script=Ks5ILEi1UihOLSxNzUtOjU_JTEwv... Okay, we'll put those sequence diagram improvements in our sprint for next release.
> The linking you can do already if I understand the request correctly:
Perfect. Sorry I remembered there was an open ticket for it in the past but didn't check its status.