Skip to content
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

Feature request: Onion diagrams #2193

Open
kyranjamie opened this issue Nov 5, 2024 · 1 comment
Open

Feature request: Onion diagrams #2193

kyranjamie opened this issue Nov 5, 2024 · 1 comment

Comments

@kyranjamie
Copy link

A common way of displaying software concepts is with onion diagrams, e.g below.

Especially given d2s focus on software diagrams, I believe this'd be a very useful viz to include

image
@cyborg-ts cyborg-ts added this to D2 Nov 5, 2024
@bo-ku-ra
Copy link
Contributor

bo-ku-ra commented Nov 5, 2024

Hopefully more beautiful.

https://play.d2lang.com/?script=fNLBjoIwEMbxe59iwh3iethN-jaFDrVx7LjToiGGd9-4bF2B6sXEfg35_wgXI1FDZfdw2TWfzVcFN7uvOw69dxpuZEYeUo3B-YAakI7TpJTRUPXMrZEKbgogHswZNXReOkIFQKZFagIa0ZD4XHcYEooCcOJtLXyNGj7y345pOIXnE2fOGnb356aRsOk5pPstFg0tDfgYYhI-4uqw90QayLtDigmR_sZ2Tp57t8VvmjfVpe51eandGjk6QQxPeyaUtlly4ICjxevv0GmoHm-97HgrKVjKmq2nJGIxwaGgXdzIpvI6q1ofv4ccbFef02vaEjfDlr6i8JWxpCw5_w1r43aZfScf0ygcc_ik8u-kJvUTAAD__w%3D%3D&

vars: "d2 v0.6.7" {d2-config: {layout-engine: elk}}

a: "foobar" {
  shape: circle
  label.near: top-center
  grid-rows: 1
  grid-columns: 1
  grid-gap: 0
  style.font-color: blue
  style.stroke: blue
  style.fill: lightsteelblue
  b: "foo" {
    shape: circle
    label.near: top-center
    grid-rows: 1
    grid-columns: 1
    grid-gap: 0
    style.font-color: darkgreen
    style.stroke: darkgreen
    style.fill: honeydew
    c: "bar" {
      shape: circle
      label.near: top-center
      grid-rows: 1
      grid-columns: 1
      grid-gap: 0
      style.font-color: orangered
      style.stroke: orangered
      style.fill: bisque
      d: "foobar" {
        shape: circle
        label.near: center-center
        grid-rows: 1
        grid-columns: 1
        grid-gap: 0
        style.font-color: red
        style.stroke: red
        style.fill: mistyrose
      }
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants