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

Adding tooltips to graphviz representation #7970

Closed
freyam opened this issue Jul 31, 2021 · 7 comments · Fixed by #7973
Closed

Adding tooltips to graphviz representation #7970

freyam opened this issue Jul 31, 2021 · 7 comments · Fixed by #7973

Comments

@freyam
Copy link
Contributor

freyam commented Jul 31, 2021

While working on #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

@freyam freyam mentioned this issue Aug 2, 2021
3 tasks
@freyam
Copy link
Contributor Author

freyam commented Aug 2, 2021

I have opened a Draft PR where I will be working along with this discussion.
#7973

@freyam
Copy link
Contributor Author

freyam commented Aug 3, 2021

NOTE
This would only work for SVG outputs.
PNGs and PDFs are not supported.

@GenevieveBuckley
Copy link
Contributor

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

If I remember correctly, the high level graph visualizations are saved by default as .pdf (and the low level graph visualizations are saved as .png, but we're not changing anything about the low level graphviz stuff). Perhaps we should change the high level graph default to .svg? It's worthwhile checking to see if most operating systems will be able to display svg files if double-clicked, without having to install other software.

@freyam
Copy link
Contributor Author

freyam commented 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.

@martindurant
Copy link
Member

If you open the SVG in a browser later, it would still possess the tooltips.

I would not be certain of this across OSs

@GenevieveBuckley
Copy link
Contributor

If you open the SVG in a browser later, it would still possess the tooltips.

I would not be certain of this across OSs

I have a linux machine and a mac we can use for testing if need be. I'm sure we can find someone with a Windows machine if need be, too.

@GenevieveBuckley
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants