Diagram background image

Hi,
i have a problema when i try put backgroud image in diagram.
Version 14:
http://jsplayground.syncfusion.com/dk0kgxmd
$("#diagram").ejDiagram({
width: "100%",
height: "600px",
nodes: nodes,
//backgroundColor: "whitesmoke",
backgroundImage: "http://2.bp.blogspot.com/-6Unz0GdPIPE/Ti_XYAe8okI/AAAAAAAABd0/FY4zKhSy6g4/s1600/Opera-Background-Blue-Bubbles.png",
enableContextMenu: false
});

and try same in documentation:
var bk = {
source: "http://2.bp.blogspot.com/-6Unz0GdPIPE/Ti_XYAe8okI/AAAAAAAABd0/FY4zKhSy6g4/s1600/Opera-Background-Blue-Bubbles.png",
alignment: "xmidymid",
scale: "meet"
};
$("#diagram").ejDiagram({
width: "100%",
height: "600px",
nodes: nodes,
//backgroundColor: "whitesmoke",
backgroundImage: bk,
enableContextMenu: false
});

Don't work... but when i try with version 13 work fine!:
http://jsplayground.syncfusion.com/iszx4xzd
$("#diagram").ejDiagram({
width: "100%",
height: "600px",
nodes: nodes,
// backgroundColor: "whitesmoke",
backgroundImage: "http://2.bp.blogspot.com/-6Unz0GdPIPE/Ti_XYAe8okI/AAAAAAAABd0/FY4zKhSy6g4/s1600/Opera-Background-Blue-Bubbles.png",
enableContextMenu: false
});

Any ideas?

3 Replies

SG Shyam G Syncfusion Team May 31, 2016 11:13 AM UTC

Hi David, 

In the previous version, background image is set to the diagram viewport. Currently, the background image is set to diagram content(Page settings/nodes size). However please set pageBackgroundColor as transparent to achieve your requirement. we have modified the JSPlayground link and provided below. 


Regards, 
Shyam G 



CL Carlos Lopez February 2, 2017 09:49 PM UTC

Is it possible to achieve this [setting a background image] same functionality using angular 1 diagram directive ? I am trying to set the diagram property via a vm property using controller as syntax.


SG Shyam G Syncfusion Team February 3, 2017 07:25 AM UTC

Hi Carlos, 

We have created a JSPlayground link to achieve your requirement.  


Regards, 
Shyam G 


Loader.
Up arrow icon