-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proposal: support shape of mind map #768
Comments
related: #261 if someone wants to do this as a layout plugin (which we have good support for), I will help review and merge. But there's too many higher priority things to do for this to get a slot in a release cycle in the near or even medium-term future (unless some enterprise customer wants us to do it). |
lol damn that's not bad |
proposal: shape:mindmapshape:mindmap start #+ step1
|
nah i don't think we need anything more than a |
i didn't spend much time on making... -- mindmap.txt ----------------------------------------- conv_mindmap.pl (perl_script)
-- mindmap.d2 ------------------------------------- |
playground |
@bo-ku-ra D2 0.2.0 has a new keyword, which changes the encoding, which makes the previously encoded playground URLs not work anymore. That is unfortunate, but I'm okay with the loss of backwards compatibility of these links until 1.0. The same script still works: |
mermaid is easy to write. mindmap
root((mindmap))
foo
foo
bar
foo
bar
foo
bar
foobar
foofoo
barbar
foobar
foofoobarbar
bar
foobar
foobarfoobar mindmap
root((mindmap))
foo
foo
bar
foo
bar
foo
bar
foobar
foofoo
barbar
foobar
foofoobarbar
bar
foobar
foobarfoobar
d2 sample (my perl script generated this.) vars:"mindmap.pl" {
d2-config: {theme-id: 0; dark-theme-id: 0; pad: 0; center: false; sketch: false; layout-engine: dagre}
}
# ----------------------------------------------------------------------
# COLORS
# ----------------------------------------------------------------------
classes: {
PINK: {style.font-color: hotpink; style.stroke: hotpink; style.fill: lavenderblush; style.border-radius: 8;}
BLUE: {style.font-color: blue; style.stroke: blue; style.fill: lightsteelblue; style.border-radius: 8;}
PURPLE: {style.font-color: purple; style.stroke: purple; style.fill: lavender; style.border-radius: 8;}
_RED: {style.font-color: red; style.stroke: red}
_PINK: {style.font-color: hotpink; style.stroke: hotpink;}
_BLUE: {style.font-color: blue; style.stroke: blue}
_PURPLE: {style.font-color: purple; style.stroke: purple}
~RED: {style.font-color: mistyrose; style.stroke: mistyrose; style.fill: red; style.border-radius: 8;}
~PINK: {style.font-color: lavenderblush; style.stroke: lavenderblush; style.fill: hotpink; style.border-radius: 8;}
~BLUE: {style.font-color: lightsteelblue; style.stroke: lightsteelblue; style.fill: blue; style.border-radius: 8;}
~PURPLE: {style.font-color: lavender; style.stroke: lavender; style.fill: purple; style.border-radius: 8;}
~GRAY: {style.font-color: gainsboro; style.stroke: gainsboro; style.fill: dimgray; style.border-radius: 8;}
}
# ----------------------------------------------------------------------
style: {fill-pattern: lines;}
# ----------------------------------------------------------------------
direction:right
00000:""{ style.opacity:0 }
00001:""{ style.opacity:0 }
00002:""{ style.opacity:0 }
00003:""{ style.opacity:0 }
00004:""{ style.opacity:0 }
00000->00001->00002->00003->00004{ style.opacity:0 }
00000."start"{ shape:oval; style.bold: true; style.font-size: 16; style.stroke-width: 5; class:~GRAY }
00001."foo"{ height:1; style.bold: true; class:~BLUE }
00000."start" -- 00001."foo" {class:_BLUE}
00002."foo"{ height:1; class:BLUE }
00001."foo" -- 00002."foo" {class:_BLUE}
00002."bar"{ height:1; class:BLUE }
00001."foo" -- 00002."bar" {class:_BLUE}
00003."foo"{ height:1; class:BLUE }
00002."bar" -- 00003."foo" {class:_BLUE}
00003."bar"{ height:1; class:BLUE }
00002."bar" -- 00003."bar" {class:_BLUE}
00004."foo"{ height:1; class:BLUE }
00003."bar" -- 00004."foo" {class:_BLUE}
00004."bar"{ height:1; class:BLUE }
00003."bar" -- 00004."bar" {class:_BLUE}
00002."foobar"{ height:1; class:BLUE }
00001."foo" -- 00002."foobar" {class:_BLUE}
00002."foofoo"{ height:1; class:BLUE }
00001."foo" -- 00002."foofoo" {class:_BLUE}
00002."barbar"{ height:1; class:BLUE }
00001."foo" -- 00002."barbar" {class:_BLUE}
00003."foobar"{ height:1; class:BLUE }
00002."barbar" -- 00003."foobar" {class:_BLUE}
00002."foofoobarbar"{ height:1; class:BLUE }
00001."foo" -- 00002."foofoobarbar" {class:_BLUE}
00001."bar"{ height:1; style.bold: true; class:~PINK }
00000."start" -- 00001."bar" {class:_PINK}
00001."foobar"{ height:1; style.bold: true; class:~PURPLE }
00000."start" -- 00001."foobar" {class:_PURPLE}
00002."foobarfoobar"{ height:1; class:PURPLE }
00001."foobar" -- 00002."foobarfoobar" {class:_PURPLE} |
wow very nice. i don't like mermaid's personally. tab-delimited syntax constrains how large and readable it is past a small example. won't handle multi-line nodes easily. makes no sense to me |
if it will be a huge mindmap, then it is a bad root theme. |
We already have curly braces syntax for defining containers, it can be reused for mindmaps:
All sub-containers of a mindmap should inherit mindmap shape by default unless we specify otherwise |
do you plan to add support for mindmap? |
@JosefJezek Not at the moment, demand is not high enough. Currently there are other types of diagrams more prioritized: #1578 |
I think it's a important feature
The text was updated successfully, but these errors were encountered: