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

Would a 'stack diagram' be of interest? #3307

Open
cmorganBE opened this issue Aug 9, 2022 · 15 comments
Open

Would a 'stack diagram' be of interest? #3307

cmorganBE opened this issue Aug 9, 2022 · 15 comments

Comments

@cmorganBE
Copy link

I often have a need to create stack diagrams, example below.

Would there be any interest in accepting a pull request that creates these kinds of diagrams? I think it wouldn't be too bad to capture the technique I use to create them and implement it in code, but wanted to confirm interest before starting on the effort.

image

@cmorganBE cmorganBE added the Type: Other Not an enhancement or a bug label Aug 9, 2022
@github-actions github-actions bot added the Status: Triage Needs to be verified, categorized, etc label Aug 9, 2022
@knsv
Copy link
Collaborator

knsv commented Aug 14, 2022

Yes it would! 👍

@ileixe
Copy link

ileixe commented Nov 11, 2022

Definitely 👍

@cmorganBE
Copy link
Author

I'll have some time off around the holidays and will dig in then, so if someone has the work planned before then please reach out (chmorgan@gmail.com), or give me until end of year :-)

@brian-methodical
Copy link

I would find this useful.

@eliaskanelis
Copy link

Is this implemented and merged? It is very useful for my needs.

@cmorganBE
Copy link
Author

@eliaskanelis wow, august 2022, time flies... I'd like to take a crack at this during the next break I have, likely during a holiday but I'd also gladly use it if someone else puts it together earlier :-)

@eliaskanelis
Copy link

My expertise is C and C++ as I am an embedded engineer. I know some JavaScript, but at a hobby level. I have some spare time to help, but I am limited to my lack of expertise on web development. Could I help somehow?

@sidharthv96
Copy link
Member

The first step would be to decide on a syntax that we can use.
@knsv is this similar to the block diagram that you are working on?

@eliaskanelis
Copy link

eliaskanelis commented Sep 21, 2023

I have done some brainstorming with a few people from work, and we came to this draft:

stack:
  style: {fill: black,4pt,...}
  layer:
    block:
      style: {fill: black,4pt,...} # Inherited if not assigned from parent
      [App1]->[RTOS]
    block:
      [App2]->[RTOS]
    block:
      ["Bare metal app"]->[RTOS, Microcontroller]
  layer:
    block:
      [RTOS]->[HAL]
  layer:
    block:
      [HAL]->[SPI, I2C, UART, Microcontroller]
  layer:
    block:
      [SPI]->[Microcontroller]
    block:
      [I2C]->[Microcontroller]
    block:
      [UART]->[Microcontroller]
  layer:
    block:
      [Microcontroller]

The mermaid syntax draft tries to describe the following.

stack drawio

I hope this helps. I might not know JS to aid in coding, but I can help in other areas.

As a first draft, I see layers and blocks. After that, we could introduce stackable stacks... Or it might become too complicated? I have no experience with the mermaid code.

@sidharthv96
Copy link
Member

@cmorganBE the shared sample looks very similar to the packet-diagram that I've been building here
image


@eliaskanelis, your example looks interesting. Are the vertical stacks taken from some reference images?
Can you share some sources to get some more examples?

@eliaskanelis
Copy link

eliaskanelis commented Sep 21, 2023

@sidharthv96 yes sure! It is called layered architecture. I found some more pictures from the web.

In the automotive domain, there is something called AutoSar.

image
image
It would be cool if mermaid could be used to draw these diagrams.

Other random photos

Photo 1
Photo 2
Photo 3

@pandres95
Copy link

Strong 👍

I seriously need this kind of diagrams.

@PHHENS
Copy link

PHHENS commented Jan 27, 2024

Seems interesting ... any news ?

@rhysb27
Copy link

rhysb27 commented Jul 7, 2024

@pandres95 @PHHENS does Mermaid's Block diagram meet your requirements?

@PHHENS
Copy link

PHHENS commented Jul 9, 2024 via email

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

No branches or pull requests

10 participants