Mark Rhodes
Mark Rhodes

Reputation: 10217

How do you safely convert an Ext JS 4 Chart to an image?

Just wondering if anyone knows how you would obtain an image from an Ext JS Chart in a secure manner?

I noticed that the Ext JS 4.1 preview has a "save" method that allows you to get a .png image from a chart but looking at the source code it seems to just sends the definition of the svg/vml from your chart to a Sencha server which is not secure enough for what I need.

Upvotes: 0

Views: 3158

Answers (1)

egerardus
egerardus

Reputation: 11486

I had to do this before 4.1 so I never used the Sencha server conversion. ImageMagick didn't have a conversion for html to image but wkhtmltoimage worked great on my own server side.

The charts have to be in their own distinct page and wkhtmltoimage will convert it to whatever format you need.

Upvotes: 1

Related Questions