tensorflow / tensorboard

TensorFlow's Visualization Toolkit
Apache License 2.0
6.7k stars 1.66k forks source link

Allow for users to download SVG snapshots of the graph explorer. #66

Open chihuahua opened 7 years ago

chihuahua commented 7 years ago

This issue is a continuation of tensorflow/tensorflow#6012, which has been migrated here.

The graph explorer could allow users to download SVGs of the graph.

chrissaher commented 6 years ago

Is there any new about this new feature?

nfelt commented 6 years ago

Nothing new, but contributions are welcome. I believe it would be relatively straightforward since the graph is rendered using an SVG element already.

chrissaher commented 6 years ago

I can handle it. As far as I understand, it should be handle as a plugin for tensorboard. Is it correct?

jart commented 6 years ago

Something like that, you could probably just contribute a button to the existing graph explorer.

nfelt commented 6 years ago

Yeah, I think this would just be an extra download option in the graph explorer, rather than a new plugin.

The existing download button HTML lives here: https://github.com/tensorflow/tensorboard/blob/1.8.0/tensorboard/plugins/graph/tf_graph_controls/tf-graph-controls.html

The actual PNG data is populated as part of the minimap logic: https://github.com/tensorflow/tensorboard/blob/1.8.0/tensorboard/plugins/graph/tf_graph_common/minimap.ts

I'm not sure at a glance whether it would make sense for the SVG download to hook into the minimap in the same way, I'm guessing probably not (the minimap already uses a small Canvas element so I'm guessing that's why the PNG download was also implemented there). I expect there would be a way to make the SVG download just directly grab the <svg> element holding the main graph display.

XFeiF commented 5 years ago

I've pulled a request to handle this. Can someone review it?

CognitiveClouds-Prasad commented 5 years ago

It is 2019 now and is this feature available?

bileschi commented 4 years ago

Sorry. @XFeiF , this has grown stale. Our bad for not reviewing sooner. If you would like to handle the merge conflicts, I'd be happy to review and merge. If not, Please let me know and I'll replay your changes on top of master in a new branch.