Problems visualization

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems visualization

Anne Etien
Hi,

With Olivier, we are analyzing a big database schema (around 65 tables and 350 relations between tables).
We try to reverse engineer the schema.
The visualization is not beautiful for several reasons :
1. the only way to position the tables in the visu is using the GridLayout. So there is a spaghetti meal representation what is not easy to understand (please have a look at DB_Schema_All_tables.png) 
2. the idea is to linked the columns of two tables. Using RTArrowedLine, it is not beautiful (see DB_Schema_with-arrows) since the attach points are only on South and North Border of the shape whereas we would like to have them also on left and right.
3. Usually, in DB schema, the links between tables are orthogonal multi lines. But in Roassal, the attach point are once again only on top or in bottom of the shape (see DB_Schema_with_Multines).
4. Normally in database representations, the multi lines have arrows but since, in Roassal, the direction of the arrow is computed from the start and end points of the line, it looks ugly in case of multi line edge (see multiline arrows).
5. When a column in a table references another column of the same table, the edge is in the middle of the table but we would like to have a recursive dependency represented as a loop. Is it possible to do that with Roassal (recursive_dependency figure)?


Is there someone working on a real graph representation such as in graphviz where lines do not cross or at minima and so the entities are grouped?
Can we easily add attached point? or define by default at least 4 attach points to box or ellipse?
Is it possible to get multi lines with arrows but where the head of the arrow is computed with the perpendicular of the last segment of the multi line edges?

Two more question that are not visible in these figures:
6. It seems that currently, it is not possible to play with the label font (size, italic, bold…). 
7. Is it possible to put a label near an extremity of an edge (such as a role in UML class diagram)? And is it possible to put a label also in the middle of an edge to indicate the name of an association?


Is it possible? If it is not the case, can you enhance Roassal to add these features?
Thanks in advance for your help.

Olivier and Anne




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems visualization

Peter Uhnak
Hi,

I'll answer what I can, since I'm involved in some of this stuff...

2. the idea is to linked the columns of two tables. Using RTArrowedLine, it is not beautiful (see DB_Schema_with-arrows) since the attach points are only on South and North Border of the shape whereas we would like to have them also on left and right.
3. Usually, in DB schema, the links between tables are orthogonal multi lines. But in Roassal, the attach point are once again only on top or in bottom of the shape (see DB_Schema_with_Multines).

Mondrian (and I think shapes also) by default use RTVerticalAttachPoint (so only top and bottom), however we have more. Look at RTAttachPoint subclasses. Most relevant to you are probably RTShorterDistance(WithOffset)AttachPoint which uses all four sides (right, bottom, left, top), and RTRectangleAttachPoint which will slide along the sides (so the distance is the shortest).

How are you creating the visualization? I'm interested in edge creation and layouting — because the attach point has to be specified there.
 
4. Normally in database representations, the multi lines have arrows but since, in Roassal, the direction of the arrow is computed from the start and end points of the line, it looks ugly in case of multi line edge (see multiline arrows).

This shouldn't be hard to fix for the Roassal's multiline, I'll look into it.
 

5. When a column in a table references another column of the same table, the edge is in the middle of the table but we would like to have a recursive dependency represented as a loop. Is it possible to do that with Roassal (recursive_dependency figure)?

Something like this:

or this?

That's not currently not easily possible. You could specify by hand the control points of a multiline to get something like the bottom one, but there is nothing available in Roassal to do it for you.

Is there someone working on a real graph representation such as in graphviz where lines do not cross or at minima and so the entities are grouped?

I am... but I need to move from research to actually writing the code (right now I am writing edge labels layouting, classes/elements layouting will come next).
But since you would benefit from something, I'll try to have a prototype soon.
 
Can we easily add attached point? or define by default at least 4 attach points to box or ellipse?

See my answer earlier. Creating attach points is rather easy.
 
Is it possible to get multi lines with arrows but where the head of the arrow is computed with the perpendicular of the last segment of the multi line edges?

See my answer earlier, I'll look into this.
 
Two more question that are not visible in these figures:
6. It seems that currently, it is not possible to play with the label font (size, italic, bold…). 

You specify font size with "RTLabel>>#height:"

As for italic/bold/... I've recently added "RTStyledLabel". Look at it's class comment or RTGeneralExample>>styledLabel


But I think it needs to be also introduced to Mondrian... Alex?
 
7. Is it possible to put a label near an extremity of an edge (such as a role in UML class diagram)? And is it possible to put a label also in the middle of an edge to indicate the name of an association?

Yes, but only for straight lines.
[[[
TRConstraint 
  stick: label
  between: edge from trachelShape 
  and: edge to trachelShape
  offset: offsetOnEdge. "Float between 0 and 1. 1 is the start, 0 the end, 0.5 the middle, etc."
]]]

As for multilines, Roassal itself doesn't support it.

Finally, I have my own multiline that would solve some of your problems, but in the current state it would not play nicely with Mondrian, so I will have to think about how can I move it to Roassal...

Peter

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems visualization

Anne Etien
Thanks Peter for your answers that sound great.

For the recursive dependency, it depends the type of edge we use, but we should be able to do both.

The idea is that I do not want to hack Roassal or have my own subclasses. I would like to do such visu very easily.

I am providing a real use cases that I think can be very interesting to get.
It is clear if you are working on UML class diagram, with around 50 classes (for example by reverse analyzing Pharo code), it should be possible soon to do the visu we imagine for database schema reverse engineering.

Cheers,
Anne

Le 9 nov. 2015 à 17:03, Peter Uhnák <[hidden email]> a écrit :

Hi,

I'll answer what I can, since I'm involved in some of this stuff...

2. the idea is to linked the columns of two tables. Using RTArrowedLine, it is not beautiful (see DB_Schema_with-arrows) since the attach points are only on South and North Border of the shape whereas we would like to have them also on left and right.
3. Usually, in DB schema, the links between tables are orthogonal multi lines. But in Roassal, the attach point are once again only on top or in bottom of the shape (see DB_Schema_with_Multines).

Mondrian (and I think shapes also) by default use RTVerticalAttachPoint (so only top and bottom), however we have more. Look at RTAttachPoint subclasses. Most relevant to you are probably RTShorterDistance(WithOffset)AttachPoint which uses all four sides (right, bottom, left, top), and RTRectangleAttachPoint which will slide along the sides (so the distance is the shortest).

How are you creating the visualization? I'm interested in edge creation and layouting — because the attach point has to be specified there.
 
4. Normally in database representations, the multi lines have arrows but since, in Roassal, the direction of the arrow is computed from the start and end points of the line, it looks ugly in case of multi line edge (see multiline arrows).

This shouldn't be hard to fix for the Roassal's multiline, I'll look into it.
 

5. When a column in a table references another column of the same table, the edge is in the middle of the table but we would like to have a recursive dependency represented as a loop. Is it possible to do that with Roassal (recursive_dependency figure)?

Something like this:
<self1.png>

or this?

<self2.png>
That's not currently not easily possible. You could specify by hand the control points of a multiline to get something like the bottom one, but there is nothing available in Roassal to do it for you.

Is there someone working on a real graph representation such as in graphviz where lines do not cross or at minima and so the entities are grouped?

I am... but I need to move from research to actually writing the code (right now I am writing edge labels layouting, classes/elements layouting will come next).
But since you would benefit from something, I'll try to have a prototype soon.
 
Can we easily add attached point? or define by default at least 4 attach points to box or ellipse?

See my answer earlier. Creating attach points is rather easy.
 
Is it possible to get multi lines with arrows but where the head of the arrow is computed with the perpendicular of the last segment of the multi line edges?

See my answer earlier, I'll look into this.
 
Two more question that are not visible in these figures:
6. It seems that currently, it is not possible to play with the label font (size, italic, bold…). 

You specify font size with "RTLabel>>#height:"

As for italic/bold/... I've recently added "RTStyledLabel". Look at it's class comment or RTGeneralExample>>styledLabel

<styles.png>
But I think it needs to be also introduced to Mondrian... Alex?
 
7. Is it possible to put a label near an extremity of an edge (such as a role in UML class diagram)? And is it possible to put a label also in the middle of an edge to indicate the name of an association?

Yes, but only for straight lines.
[[[
TRConstraint 
  stick: label
  between: edge from trachelShape 
  and: edge to trachelShape
  offset: offsetOnEdge. "Float between 0 and 1. 1 is the start, 0 the end, 0.5 the middle, etc."
]]]

As for multilines, Roassal itself doesn't support it.

Finally, I have my own multiline that would solve some of your problems, but in the current state it would not play nicely with Mondrian, so I will have to think about how can I move it to Roassal...

Peter
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems visualization

abergel
In reply to this post by Peter Uhnak
Yes, I can easily add the style I think.  I will try to add this within the next few days. Maybe tomorrow.

Alexandre

> On Nov 9, 2015, at 1:03 PM, Peter Uhnák <[hidden email]> wrote:
>
> As for italic/bold/... I've recently added "RTStyledLabel". Look at it's class comment or RTGeneralExample>>styledLabel
>
> <styles.png>
> But I think it needs to be also introduced to Mondrian... Alex?

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems visualization

Stephan Eggermont-3
In reply to this post by Anne Etien


On 09-11-15 16:10, Anne Etien wrote:
> Is there someone working on a real graph representation such as in graphviz
> where lines do not cross or at minima and so the entities are grouped?
> Can we easily add attached point? or define by default at least 4 attach points
> to box or ellipse?
> Is it possible to get multi lines with arrows but where the head of the arrow is
> computed with the perpendicular of the last segment of the multi line edges?

Don't you want to borrow some algorithms from PCB/IC design for this?
Tables should be placed based on their interconnects and size and then
connections made to minimize crosses?

Stephan
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems visualization

Anne Etien

Le 10 nov. 2015 à 13:38, stephan <[hidden email]> a écrit :

>
>
> On 09-11-15 16:10, Anne Etien wrote:
>> Is there someone working on a real graph representation such as in graphviz
>> where lines do not cross or at minima and so the entities are grouped?
>> Can we easily add attached point? or define by default at least 4 attach points
>> to box or ellipse?
>> Is it possible to get multi lines with arrows but where the head of the arrow is
>> computed with the perpendicular of the last segment of the multi line edges?
>
> Don't you want to borrow some algorithms from PCB/IC design for this?
> Tables should be placed based on their interconnects and size and then
> connections made to minimize crosses?

I don’t know where to borrow some algorithms, but I would like a beautiful visu and not a spaghetti meal.
If you have ideas or even better developed something relevant, I am interested in.

Cheers,
Anne

>
> Stephan
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems visualization

Peter Uhnak
In reply to this post by Stephan Eggermont-3


On Tue, Nov 10, 2015 at 1:38 PM, stephan <[hidden email]> wrote:


On 09-11-15 16:10, Anne Etien wrote:
Is there someone working on a real graph representation such as in graphviz
where lines do not cross or at minima and so the entities are grouped?
Can we easily add attached point? or define by default at least 4 attach points
to box or ellipse?
Is it possible to get multi lines with arrows but where the head of the arrow is
computed with the perpendicular of the last segment of the multi line edges?

Don't you want to borrow some algorithms from PCB/IC design for this?
Tables should be placed based on their interconnects and size and then
connections made to minimize crosses?

PCB layouting has usually very different objectives, such as planarization (if you have single layer this is a must), minimization (or rather overall size constraint), flow distribution (you don't want to overload part of your circuit board), noise management, grounding, etc. Human readability of the final product is not really that important.

On the other hand diagrams/graphs are much closer to cartography, where readability is the foremost aspect. On top of that different diagram notations have additional customs and requirements that should be also taken into account when devising a layouting.

But as I said, I'm working on this; I just need to read less and code more. :)

Peter

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems visualization

Peter Uhnak

4. Normally in database representations, the multi lines have arrows but since, in Roassal, the direction of the arrow is computed from the start and end points of the line, it looks ugly in case of multi line edge (see multiline arrows).

This shouldn't be hard to fix for the Roassal's multiline, I'll look into it.
 

I looked at this, and the MultiLine has the arrows head positioned correctly according to the last segment.
So maybe it's being confused by something else? Do you have some minimal script I can use to reproduce this issue? Because I can't reproduce it.

Peter

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems visualization

abergel
In reply to this post by Peter Uhnak
hi!
But I think it needs to be also introduced to Mondrian... Alex?

Yes, you can try something like:

b := RTMondrian new.
b shape styledLabel 
height: 80;
bold.
b node: 'Hello'.
b shape styledLabel 
height: 80;
italic.
b node: 'World'.
b
This is just an initial step. It would be great to have italicIf: […] and boldIf: […]

Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems visualization

Peter Uhnak
This is just an initial step. It would be great to have italicIf: […] and boldIf: […]

What's italiclf? Whould would the block do?

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems visualization

Tudor Girba-2
It would set italic to the text if the condition of the block would be met :)

Doru


> On Nov 11, 2015, at 9:53 AM, Peter Uhnák <[hidden email]> wrote:
>
> This is just an initial step. It would be great to have italicIf: […] and boldIf: […]
>
> What's italiclf? Whould would the block do?
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
www.tudorgirba.com

"One cannot do more than one can do."



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems visualization

Peter Uhnak
ah, if... I was reading it as LF... make sense now. :)

Peter

On Wed, Nov 11, 2015 at 10:37 AM, Tudor Girba <[hidden email]> wrote:
It would set italic to the text if the condition of the block would be met :)

Doru


> On Nov 11, 2015, at 9:53 AM, Peter Uhnák <[hidden email]> wrote:
>
> This is just an initial step. It would be great to have italicIf: […] and boldIf: […]
>
> What's italiclf? Whould would the block do?
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
www.tudorgirba.com

"One cannot do more than one can do."



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems visualization

abergel
:-)

Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Nov 11, 2015, at 6:40 AM, Peter Uhnák <[hidden email]> wrote:

ah, if... I was reading it as LF... make sense now. :)

Peter

On Wed, Nov 11, 2015 at 10:37 AM, Tudor Girba <[hidden email]> wrote:
It would set italic to the text if the condition of the block would be met :)

Doru


> On Nov 11, 2015, at 9:53 AM, Peter Uhnák <[hidden email]> wrote:
>
> This is just an initial step. It would be great to have italicIf: […] and boldIf: […]
>
> What's italiclf? Whould would the block do?
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
www.tudorgirba.com

"One cannot do more than one can do."



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev