Diagram Background Image Size

Hello, good afternoon

I'm working with ejDiagram, i'm trying to setup the backgroundImage to the diagram, what i saw is whatever image i set, is scaled to my browser window size, in this way i lose the image original size, is there any way to set backgroundImage avoiding image scaling and preserving the same image size?

Thank you

1 Reply

SG Shyam G Syncfusion Team August 17, 2015 02:07 PM UTC

Hi Luis

Thanks for using Syncfusion products.

We have created a simple sample to achieve your requirement and it is available in the below link for download. Please refer the code snippet below.

Code snippet:

$("#diagram").ejDiagram({

 

            backgroundImage: "themes/images/dashboard_img/Airline_reservation.png",
        });

$(window).load(function () {            

            var svg = document.getElementById("diagram_canvas_backgroundLayer").firstChild;

            svg.removeAttribute("preserveAspectRatio");
        });

Sample:http://www.syncfusion.com/downloads/support/forum/119929/ze/backgroundimage-1697125651

Please let us know if any concerns.

Regards,
Shyam G


Loader.
Up arrow icon