user1467177
user1467177

Reputation: 19

export dojo chart to pdf or some other vector format

I need help with exporting dojo charts to pdf. How could i export dojo chart like this one to pdf or some other vector formats? i tried to use this but i can't make it work. Any vector format (ie. svg) works for me! also, i tried to use this example, but don't know what to do.

Can somebody help me!!!

Thanks!

Upvotes: 0

Views: 1342

Answers (2)

xmatzx
xmatzx

Reputation: 47

You have to set the property of the dojox chart htmlLabels to false and then you can get the svg with:

var def = dojox.gfx.utils.toSvg(chart.surface);

Upvotes: 1

Tech_Dummy
Tech_Dummy

Reputation: 51

I too was trying to export a dojo chart to pdf. I tried to use toSvg function of dojox gfx utils then sent the svg stream to server and used apache's Batik for generating the image or pdf.

This works great, except that i am not able export the chart labels. I tried to do this, with the chart you had shared (http://www.hiim.unizg.hr/mihovil/dojo/dojo.html) and it export had worked well exept the labels again.

Let me know, the exact problem you are seeing.

Thanks, Srilatha.

Upvotes: 1

Related Questions