How to convert/save d3.js graph to pdf/jpeg

前端 未结 4 1284
执笔经年
执笔经年 2020-11-27 15:13

I\'m working on a client-side/javascript function to save or convert an existing D3-SVG graph into a file. I\'ve searched a lot and found some recommendations, mainly using

4条回答
  •  悲&欢浪女
    2020-11-27 16:04

    Just a heads up that I turned this concept into a small JavaScript library: https://github.com/krunkosaurus/simg

    It simply converts any SVG to an image to swap out or trigger a download. Idea taken from here: http://techslides.com/save-svg-as-an-image/

提交回复
热议问题