Save Rad diagram as image

2 posts, 0 answers
  1. Ron
    Ron avatar
    1 posts
    Member since:
    Sep 2014

    Posted 14 Dec 2014 Link to this post

    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.

  2. Vessy
    Vessy avatar
    1641 posts

    Posted 16 Dec 2014 Link to this post

    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:

    <telerik:RadDiagram ID="brackets" runat="server" Width="900" Height="500">
        <ClientEvents OnLoad="diagram_load" />
        function diagram_load(sender, args) {
            var diagram = sender.get_kendoWidget();
            draw_diagram(diagram, $telerik.$("#drawing"));
        function draw_diagram(diagram, element) {
            var surface = kendo.dataviz.drawing.Surface.create(element, { type: "canvas" });
    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.

Back to Top