Search code examples
javajavascriptserver-sideflotr

Flotr & Server Side Processing


Is there any way to send object / image content type created by Flotr (http://code.google.com/p/flotr/) to server side scripting.

For comparison, with protovis () we can send SVG generated to server side servlet to have PNG / JPG result with Apache Batik.

Appreciate for any clue.

Regards,

Dino


Solution

  • As far as I can tell, Flotr generates a <canvas> HTML element image, which you can convert to base64 encoding with the canvas.toDataURL() method.

    Then, it should not be painful to send it to web server with an AJAX HTTP POST call.

    Cheers,