I am trying to implement an automatic report generation tool for my clients . I need to create reports in pdf format and i am very much comfortable in creating graphs using
Flot draws its graph on HTML5 element. So the possible scenario might be as follows:
toDataURL
as described in this answer.addImage
as in first example to embed the image into it.BUT2 the legend is also not drawn on canvas, it is also a properly positioned Resume: many people around Flot are concerned with this issue, but sadly there is no stable, out-of-box way to do it yet — only the hope that 0.9 will finally come out sometimes with this issue addressed.BUT note, in this scenario you will not see any axis labels in image, because they are not drawn on canvas, they are simple position:relative
. I found this post where the author offers a Flot plugin which forces Flot to draw text on canvas, but I have no idea whether it works. UPD: Drawing labels on canvas is included in oncoming 0.8 release (see comments).