Download d3 chart as pdf






















The svg has attributes of circle,text,line,images in. I am able to download the D3Js chart as a. I have kind of hit the ceiling here ,i would really appreciate some help,code sample would be great Thank You. So ,After trying to solve this issue for few weeks ,came up with the solution 1. If there are cross domain or external source in this case i had my images coming from AmazonS3. Convert the whole svg to String ,i used xmlSerialize to convert the svg to string svg is a xml data 1.

Make api call to the backEnd 1. I have tried using canvg ,which is great but it converts the svg to a canvas and taints the canvas ,because of the external resource present in it , please let e know ,if there is any way change it ,i couldn't find it though.

I tried to work this out completely on the FrontEnd ,the best i could achieve was to print the svg on a canvas element on the page ,i could rightClick and save the image as image ,but couldn't directly download the svg to. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 4 years, 10 months ago. Active 4 years, 10 months ago. Also, im using a lineChart from DC.

Working good for me except that d3. Pavel Nikolov Pavel Nikolov 8, 5 5 gold badges 42 42 silver badges 54 54 bronze badges. Psilocybic Psilocybic 31 2 2 bronze badges. You are my hero. Now it works. But I had also to append the "[0]" in line 91 and 92 at the self. Unfortunately, I only get a black rectangle.

Nothing is shown in it. Could you give an example please? Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Who owns this outage? Building intelligent escalation chains for modern SRE. Podcast Who is building clouds for the independent developer? Featured on Meta. Starting v3. The subsequent articles in this section cover the features of each export mode and the exportMode attribute in detail.

To process the export data on your own server, you can configure one of the export handlers by following the Setup Private Export Server guide. Choose an item. You must have an active internet connection for this feature to work.



0コメント

  • 1000 / 1000