-
Notifications
You must be signed in to change notification settings - Fork 7
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
Copy graph to clipboard #184
Comments
I've looked into this with my new WebGL/SVG-hybrid plot renderer, and initial outcomes look a little grim. You can save the graph portion, but not the axes. This might be possible by converting the SVG portion to Canvas, and then rendering the WebGL portion within the Canvas, but that would be a lot of work for this single feature. It also may completely tank the performance. Ctrl+Shift+4 on Mac, or Ctrl+Prnt Screen on Linux is easy enough that I'm not sure this is likely to be a high priority unless there is something I'm missing? |
I think this is a high priority. The old grapher didn't support export in any sensible way and one of the most frequent use cases was exporting plots into other docs and emails. Sure print screen works, but it makes the grapher seem un-polished and costs users lots of time in aggregate. |
I have investigated fairly thoroughly, and cannot see a solution that is both simple and performant. The only approach to allowing this feature while maintaining adequate performance seems to be rewriting all the SVG plot functionality into WebGL directly. The primary method that I explored was that you can turn SVG -> Blob -> Object URL -> Image -> Texture and then render a Plane with the texture of your SVG. The problems with this is many, but the biggest being that this translation process takes a considerable amount of processing time. It works well for a mostly static HUD, but when it needs to be updated every frame during a scroll/pan or as new data is added, it doesn't work out well. Recreating the plot in pure WebGL is definitely possible, it's mostly a matter of it probably being at least couple of weeks dedicated development, which I think could be better spent working on features such as #221 and #229, among others at this point in time. |
New idea... we render as both SVG and WebGL, but have a screenshot button that merges the two for a single frame into a canvas and then downloads that. That could work! |
Resolves issues #185, #208, #231. Makes use of WebGL to do the data plotting portion of each graph in order to greatly improve the performance of live data view as well as zoom/pan operations. d3.js was retained for the axes and and interface as SVG, while THREE.js library was introduced to handle the plotting of the data via WebGL. This dual library usage was used to get the most performance gain for the least development time, as implementing axes and other features in WebGL will be time consuming. It is a longer term goal to move all plotting towards WebGL in order to allow screenshotting (Issue #184). Performance was also improved by causing only the parts of the graph that need to be re-rendered under actions like zooming to be re-rendered. This also makes it possible to now retain the zoom level during live updates, the changing of plotting types, and the toggling of traces.
No more print screening would be lovely.
The text was updated successfully, but these errors were encountered: