Adding Extra Text in Chart while export with svg, png and jpeg

70 views
Skip to first unread message

Dwarkesh Radadiya

unread,
Aug 11, 2020, 1:45:27 AM8/11/20
to d3-js
Hello,

I have used d3.js chart in my project. I want to provide export option for svg, png  and jpeg image with adding extra text which is out side of chart area. How to implement this feature using d3.js. 
I want to export chart like below with header text in d3.js



Can anyone help on this?

Jeremy Cothran

unread,
Aug 11, 2020, 9:58:59 AM8/11/20
to d3...@googlegroups.com
Hi Dwarkesh,

The solution I ended up using from bits on stackoverflow is in the following function for my github project with demo link in the project readme. It is only for exporting the svg area to png or print, not sure about the other export options or including area/text outside the svg area.


Jeremy


--
You received this message because you are subscribed to the Google Groups "d3-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to d3-js+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/d3-js/e9f2abea-07e8-46b0-bfab-46e2a9775df5o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages