I am using Raddaigram to generate a network diagram. But I am not able to save that as image. I need to save that as image such as png or jpg, as I need to include that in a pdf report.
1 Answer, 1 is accepted
0
Vessy
Telerik team
answered on 16 Dec 2014, 02:52 PM
Hi Ron,
I have already answered you ticket on the subject, for convenience I will paste my answer here as well:
I afraid that I will need to disappoint you, but currently the desired expor-to-png functionality cannot be achieved out-of-the-box with RadDiagram.
A possible approach you can use could be to convert the Diagram SVG element to canvas, so you can use its base64 string after that and created the needed image. You can use a similar logic to achieve it:
var surface = kendo.dataviz.drawing.Surface.create(element, { type: "canvas" });
surface.draw(diagram.canvas.drawingElement);
}
</script>
Please note, that the RadDiagram API will be changed a lot in our up-coming Q1 release as a part of the control's improvement, so you will need to update the above provided logic when/if you upgrade to it.