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] Include BOM table in graphical output #227

Open
formatc1702 opened this issue Mar 23, 2021 · 1 comment
Open

[feature] Include BOM table in graphical output #227

formatc1702 opened this issue Mar 23, 2021 · 1 comment
Milestone

Comments

@formatc1702
Copy link
Collaborator

formatc1702 commented Mar 23, 2021

GraphViz allows HTML tables in a graph's label:

graph {
	graph [bgcolor=white fontname=arial label=<<table border="0" cellspacing="0" cellpadding="3" cellborder="1"><tr><td>A</td><td>B</td></tr><tr><td>C</td><td>D</td></tr></table>>]

// etc.
}

image

This could be used to optionally include the complete BOM table inside the graphical output (PNG/SVG) if desired, and would especially be useful when wanting the graphics to include all information about the harness (including additional BOM items otherwise not visible), as well as when , as proposed in #224, using show_part_numbers set to False to keep the connector and cable nodes compact, and using BOM item numbers to cross-reference with the BOM table that does show all part number info.

An additional use could be a simplified title block, showing basic metadata such as a title and description.
This could appear as part of the BOM table, or -by using a blank row with no border- made to look like a separate table.

@kvid
Copy link
Collaborator

kvid commented Mar 24, 2021

Such a new graph element is easy to test with my PR #215 together with e.g. this input:

connectors:
  X1:
    pincount: 4
  X2:
    pincount: 4
cables:
  W1:
    wirecount: 4
    color_code: DIN
connections:
  - - X1: [1-4]
    - W1: [1-4]
    - X2: [1-4]
tweak:
  append: |-
    graph [bgcolor=white fontname=arial label=<<table border="0" cellspacing="0" cellpadding="3" cellborder="1"><tr><td>AAAAAAAAAAAAAAAAAAAAAAAA</td><td>BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB</td></tr><tr><td>CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC</td><td>DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD</td></tr></table>>]

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

No branches or pull requests

2 participants