microsoft / automatic-graph-layout

A set of tools for graph layout and viewing
Other
1.34k stars 301 forks source link

How to create: Title, Subtitle on nodes and Tooltip on edge #348

Closed powergleb closed 11 months ago

powergleb commented 1 year ago

Hi! I'm trying to build a graph that will represent DB relations so I would like each node to have a title with the table name and sub title which will represent the different keys of the table and on the edge a string with the relation such as:"each table1 may have many table2".

is it possible and if so how?

Thanks!

Required functionality

Show table names, with a background color different than the background of the key names Show key names Lines describing relations and their direction between tables. Tooltip with textual description of relations

https://github.com/powergleb/link-visualizer unnamed

levnach commented 1 year ago

It is possible. If you use GraphViewerGDI then you need to override DNode.DrawNodeDelegate, as in NodesWithImages example. Otherwise, you might just use the geometry engine. In any case, your code is responsible for the rendering.

powergleb commented 11 months ago

Thank you! I got it all!