Render IMG to file?

1,149 views
Skip to first unread message

ursh

unread,
Jun 15, 2009, 5:18:47 AM6/15/09
to jqplot-users
Is it possible to render the plots directly to a image file.

I've got a lot of background reporting (in pdfs), where I use pre-
generated .png images for inclusion.

Currently im using jpGraph for all my plots but I'd like to switch to
jqplot as it think that this is the future!

Chris Leonello

unread,
Jun 15, 2009, 1:59:26 PM6/15/09
to jqplot...@googlegroups.com
I have thought about it and it is most likely possible. It would
probably involve some work to hook up, though.

There is a js package, Canvas2Image, which can convert a canvas tag to
image data. I do have on my todo list to offer a "plot2image" plugin
for jqPlot using this for imaging and printing. I have no timing yet.

I have never used Canvas2Image, so I don't know what it will take to
make it work. At the very least, non-canvas items have to be converted
to render their content on a canvas. This would be the legend, axes,
and title. I already have a canvas axes plugin. I will have to also
create canvas legend and title plugins.

Also, I think all of the canvases may have to be collapsed into one
canvas for imaging. I have not really looked at how Canvas2Image
works, but this is probably the case. I would then have to collect
all the canvases (the grid, series, axes, etc.) and draw them on one
"image" canvas.
--

----
Chris Leonello
Reply all
Reply to author
Forward
0 new messages