You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the Flow.render_dag() method returns a PNG image, which doesn't support tooltips or any other kind of interaction. However, it would be fairly straightforward to return an SVG image instead, in which case we could include tooltips for each node in the DAG. These tooltips would be a good place to show the docstring of the corresponding entity (once docstring integration is complete).
The text was updated successfully, but these errors were encountered:
@jqmp I started looking into this and looks like as of today, Pillow does not support SVG. But it's straightforward to get a SVG from a pydot graph, so we can evaluate additional packages like Cairo and svglib to actually render the image.
Oh, good point. I'm cool with adding a dependency if necessary. That said, it seems to me that we want to support two main use cases:
# Saving to a file.
flow.render_dag(format='svg').save('my_dag.svg')
# Inside a Jupyter notebook, this should render the image.
flow.render_dag(format='svg')
I don't know offhand if those libraries provide a class that supports both of those. However, since Jupyter knows how to render SVGs already, it would probably be easy to define our own SvgImage class that implements save and _repr_svg_ methods. What do you think?
Currently the
Flow.render_dag()
method returns a PNG image, which doesn't support tooltips or any other kind of interaction. However, it would be fairly straightforward to return an SVG image instead, in which case we could include tooltips for each node in the DAG. These tooltips would be a good place to show the docstring of the corresponding entity (once docstring integration is complete).The text was updated successfully, but these errors were encountered: