Generate "print" quality diagrams
Opened this issue · 2 comments
drpowell commented
The difficulty is the parallel coordinates and MA-plot that both use a combination of SVG and canvas.
Look into:
http://svgopen.org/2010/papers/62-From_SVG_to_Canvas_and_Back
http://www.nihilogic.dk/labs/canvas2image/ https://github.com/Causata/svgenie
drpowell commented
Tried a couple of stalled attempts:
- Modify the parallel coordinates module to merge the multiple canvas items and SVG (for axes) into a single canvas at high resolution for printing. Unable to get this working properly. Main problem was the rendering of the SVG as a data uri does not use any css styling
- Use css "print" media settings to only show the parallel coordinates plot. This works, but really need to redraw the plot at higher resolution on "print". This can be triggered in firefox using onbeforeprint, and on chrome with matchMedia. But fiddly and awkward.
- Create a temporary "div" over the whole body just showing a plot at high resolution. This seems most promising and have a working prototype. Need to add options to control line width and text size though.
drpowell commented
Added support for SVG only plots. Need support for canvas based ones, parcoords & ma-plot. Needs more work as these have multiple overlayed canvas