question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding tooltips to graphviz representation

See original GitHub issue

While working on https://github.com/dask/dask/issues/7919, I was looking for ways to represent the layer_type attribute in the graphviz representation. I stumbled upon the tooltip - Tooltip (mouse hover text) attached to the node, edge, cluster, or graph.

This opens up many doors to add more information 🚀

Demo

(image shows the layer_type as the tooltip) image

So, on hover, we can display any kind of information we want per Layer. We can use this discussion thread to discuss what information would benefit users when they see a Task Graph.

Idea

We can show the attributes stored in collecton_annotations in the tooltip.

  • This could be shape, dtype, chunksize, type, chunk_type (layer_type too) for Dask Arrays.
  • This could be npartitions, columns, type, dataframe_type, series_dtypes (layer_type too) for Dask DataFrames.
  • Anything else.

/cc @GenevieveBuckley @martindurant

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
freyamcommented, Aug 4, 2021

So if we save out an .svg file, it retains the hover tooltip information?

Yes, true. The tooltips are stored in the .SVG image. If you open the SVG in a browser later, it would still possess the tooltips.

0reactions
GenevieveBuckleycommented, Aug 5, 2021

My personal preference would be .svg if it’s easy to open on all operating systems. If it isn’t easy, then I’d prefer .png to match the default format used to save the low level graph visualizations. It’s also worth double checking that default filenames used to save the high & low level graphs are not the same, and adequately describe which is which.

Read more comments on GitHub >

github_iconTop Results From Across the Web

tooltip - Graphviz
Tooltip (mouse hover text) attached to the node, edge, cluster, or graph.
Read more >
Attributes - Graphviz
The tools accept standard C representations for int and double types. ... Tooltip annotation attached to the non-label part of an edge.
Read more >
FAQ - Graphviz
Run neato -n . This will add the necessary edge information. I already have all the coordinates for the nodes and edges of...
Read more >
Node Shapes - Graphviz
Visually, a record is a box, with fields represented by alternating ... Adding HTML labels to record-based shapes (record and Mrecord) is ...
Read more >
DOT Language - Graphviz
First, a subgraph can be used to represent graph structure, indicating that certain nodes and edges should be grouped together.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found