MOTHBALLED-graphviz icon indicating copy to clipboard operation
MOTHBALLED-graphviz copied to clipboard

HTML-like labels: vertical alignment of nested tables

Open gghh opened this issue 10 years ago • 6 comments

Hello,

the following dot code

strict graph  {
    node [label="\N",shape=none];
    pack [label=<

<table color="red">
  <tr>
    <td>
      <table color="blue"
                 valign="bottom"
                 fixedsize="true" height="50" width="150">
        <tr><td></td></tr>
      </table>
    </td>
    <td>
      <table color="blue" 
                 valign="bottom" 
                 fixedsize="true" height="250" width="150">
        <tr><td></td></tr>
      </table>
    </td>
  </tr>
</table>

        >];
}

compiled with dot -Tpng g.dot -o g.png produces this output, as expected:

g 5

but if I try to have the two nested tables top aligned, i.e. with

strict graph  {
    node [label="\N",shape=none];
    pack [label=<

<table color="red">
  <tr>
    <td>
      <table color="blue"
                 valign="top"
                 fixedsize="true" height="50" width="150">
        <tr><td></td></tr>
      </table>
    </td>
    <td>
      <table color="blue"
                 valign="top"
                 fixedsize="true" height="250" width="150">
        <tr><td></td></tr>
      </table>
    </td>
  </tr>
</table>

        >];
}

I get this unexpected result (the table on the left somehow gets off the outermost table, the small squared cell disappears):

g 6

what I am trying to do: the innermost tables represent some records I have. They can be of an arbitrary number of rows, so I want to pack them into the outer table to keep them somehow together. I want them all to be part of the same node, and all top aligned. I produce this programmatically, so fitting tables into tables is simpler than managing the layout of a single, top-level table.

gghh avatar Jul 06 '14 09:07 gghh

At first glance, it appears to be a bug. The left cell is somehow being positioned too high. (The small squared cell is just being clipped off by the bounding box.) Unfortunately, I probably won't be able to check into this for a while. If possible, please submit this as a bug report at http://www.graphviz.org/content/graphviz-issue-tracker so we can have a record of it. Thanks.

emdenrg avatar Jul 07 '14 23:07 emdenrg

retested - this issue still exists

ellson avatar Jul 10 '16 10:07 ellson

The bug is still there. Has anyone reported this? The workaround is quite ugly and weird.

daveyostcom avatar Jul 27 '18 08:07 daveyostcom

David,

Just to update you.

The graphviz git repo was moved to gitlab:

 https://gitlab.com/graphviz/graphviz

and this issue is recorded now at:

 https://gitlab.com/graphviz/graphviz/issues/25

Unfortunately the author of this code is very sick, and may not get to work on it.

I may get to it eventually, but I am in the middle of retiring from AT&T and moving house, so it could be months.

Any chance you could dig into the code yourself? I'd be happy to receive patches.

John

On July 27, 2018 at 4:41 AM Dave Yost [email protected] wrote:

The bug is still there. Has anyone reported this?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/ellson/MOTHBALLED-graphviz/issues/25#issuecomment-408353127 , or mute the thread https://github.com/notifications/unsubscribe-auth/ABcTPerMHIaWE10v_sEt-c5V5GcP4bxrks5uKtIrgaJpZM4CKheN .

ellson avatar Jul 28 '18 10:07 ellson

Sorry, no bandwidth.

Kickstarter? Kickrestarter?

Sorry to hear about the illness.

Best

Dave

On Jul 28, 2018, at 3:27 AM, John Ellson [email protected] wrote:

David,

Just to update you.

The graphviz git repo was moved to gitlab:

https://gitlab.com/graphviz/graphviz

and this issue is recorded now at:

https://gitlab.com/graphviz/graphviz/issues/25

Unfortunately the author of this code is very sick, and may not get to work on it.

I may get to it eventually, but I am in the middle of retiring from AT&T and moving house, so it could be months.

Any chance you could dig into the code yourself? I'd be happy to receive patches.

John

On July 27, 2018 at 4:41 AM Dave Yost [email protected] wrote:

The bug is still there. Has anyone reported this?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ellson/MOTHBALLED-graphviz/issues/25#issuecomment-408353127 , or mute the thread https://github.com/notifications/unsubscribe-auth/ABcTPerMHIaWE10v_sEt-c5V5GcP4bxrks5uKtIrgaJpZM4CKheN .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

daveyostcom avatar Jul 28 '18 12:07 daveyostcom

I think I fixed issue#25. gitlab CI is building now.

https://gitlab.com/graphviz/graphviz/pipelines

I don't have the CI deployment set up yet, but you can find rpms for centos6, 7 and fedora 27, 28 29 in the artifacts (button to the right of the pipeline.)

I think the windows build is also automatic, but I don't know much about it.

Does that give you what you need?

John

On July 28, 2018 at 8:35 AM Dave Yost [email protected] wrote:

Sorry, no bandwidth.

Kickstarter? Kickrestarter?

Sorry to hear about the illness.

Best

Dave

> On Jul 28, 2018, at 3:27 AM, John Ellson <[email protected]> wrote:
>
> David,
>
>
> Just to update you.
>
>
> The graphviz git repo was moved to gitlab:
>
>
> https://gitlab.com/graphviz/graphviz
>
>
>
> and this issue is recorded now at:
>
>
> https://gitlab.com/graphviz/graphviz/issues/25
>
>
>
> Unfortunately the author of this code is very sick, and may not get to work on it.
>
> I may get to it eventually, but I am in the middle of retiring from AT&T and moving house, so it could be months.
>
>
> Any chance you could dig into the code yourself? I'd be happy to receive patches.
>
>
> John
>
>
>
>
> > On July 27, 2018 at 4:41 AM Dave Yost <[email protected]> wrote:
> >
> >
> > The bug is still there. Has anyone reported this?
> >
> > —
> > You are receiving this because you commented.
> > Reply to this email directly, view it on GitHub https://github.com/ellson/MOTHBALLED-graphviz/issues/25#issuecomment-408353127 , or mute the thread https://github.com/notifications/unsubscribe-auth/ABcTPerMHIaWE10v_sEt-c5V5GcP4bxrks5uKtIrgaJpZM4CKheN .
> >
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub, or mute the thread.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/ellson/MOTHBALLED-graphviz/issues/25#issuecomment-408605190 , or mute the thread https://github.com/notifications/unsubscribe-auth/ABcTPYIGN-NQxMMKxoqFNKrnqTTC_jlNks5uLFqHgaJpZM4CKheN .

ellson avatar Jul 28 '18 19:07 ellson