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

v3.5 table @ label not work #21

Open
sebbloc opened this issue Jul 17, 2021 · 5 comments
Open

v3.5 table @ label not work #21

sebbloc opened this issue Jul 17, 2021 · 5 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@sebbloc
Copy link

sebbloc commented Jul 17, 2021

[only on v3.5]
graph g { "Node" [label=<<TABLE><TR><TD>test</TD></TR></TABLE>>] }
only draw "node" (original name), not the label

@aduh95
Copy link
Owner

aduh95 commented Jul 19, 2021

I'm able to reproduce when compiling Graphviz 2.48.0. I'm not able to reproduce on the command line, it looks this is an issue related to this implementation (maybe a missing library?). If someone has info regarding this, please chime in.

$ echo 'graph g { "Node" [label=<<TABLE><TR><TD>test</TD></TR></TABLE>>] }' | dot -Tsvg
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
 -->
<!-- Title: g Pages: 1 -->
<svg width="76pt" height="57pt"
 viewBox="0.00 0.00 75.88 57.50" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 53.5)">
<title>g</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-53.5 71.88,-53.5 71.88,4 -4,4"/>
<!-- Node -->
<g id="node1" class="node">
<title>Node</title>
<ellipse fill="none" stroke="black" cx="33.94" cy="-24.75" rx="33.88" ry="25"/>
<polygon fill="none" stroke="black" points="20.94,-13.75 20.94,-34.75 46.94,-34.75 46.94,-13.75 20.94,-13.75"/>
<text text-anchor="start" x="23.94" y="-20.55" font-family="Times,serif" font-size="14.00">test</text>
<polygon fill="none" stroke="black" points="17.94,-11.25 17.94,-38.25 49.94,-38.25 49.94,-11.25 17.94,-11.25"/>
</g>
</g>
</svg>
$ node -p 'require(`@aduh95/viz.js/sync`)(`graph g { "Node" [label=<<TABLE><TR><TD>test</TD></TR></TABLE>>] }`)'                                     
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
 -->
<!-- Title: g Pages: 1 -->
<svg width="72pt" height="44pt"
 viewBox="0.00 0.00 71.90 44.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 40)">
<title>g</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-40 67.9,-40 67.9,4 -4,4"/>
<!-- Node -->
<g id="node1" class="node">
<title>Node</title>
<ellipse fill="none" stroke="black" cx="31.95" cy="-18" rx="31.9" ry="18"/>
<text text-anchor="middle" x="31.95" y="-13.8" font-family="Times,serif" font-size="14.00">Node</text>
</g>
</g>
</svg>

@aduh95 aduh95 added bug Something isn't working help wanted Extra attention is needed labels Jul 19, 2021
@sebbloc
Copy link
Author

sebbloc commented Jul 20, 2021

// maybe a missing library?

it's possible because new wasm is very small comparing older
v3.4: 984Kb
v3.5: 868Kb

@barnardb
Copy link

Still present in v3.6.0.

Staying on v3.4.0 avoids the issue.

barnardb added a commit to softwaretechnik-berlin/dbml-renderer that referenced this issue May 29, 2022
Fixes #10.

It seems that starting with @aduh95/viz.js 3.5.0, tables as node
labels don't work. The issue is still present in the lates release,
3.6.0: aduh95/viz.js#21

This commit also starts testing SVG output, and updates the accepted
SVG files to match the output produced by this version of viz.js.
@croissantspectacular
Copy link

does anyone know of any workarounds so far?

Neriderc added a commit to Neriderc/GVExport that referenced this issue Jan 10, 2024
Tested using https://github.com/aduh95/viz.js as renderer

Unfortunately tables don't work: aduh95/viz.js#21

Unlikely to be updated because original repo has been un-archived and has active releases. https://github.com/mdaines/viz-js
@barnardb
Copy link

barnardb commented Apr 1, 2024

Still present in v3.7.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants