We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Diagram background image

Thread ID:

Created:

Updated:

Platform:

Replies:

124292 May 30,2016 08:13 AM Feb 3,2017 02:25 AM JavaScript 3
loading
Tags: ejDiagram
David
Asked On May 30, 2016 08:13 AM

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?

Shyam G [Syncfusion]
Replied On May 31, 2016 07:13 AM

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 


Carlos Lopez
Replied On February 2, 2017 04:49 PM

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.

Shyam G [Syncfusion]
Replied On February 3, 2017 02:25 AM

Hi Carlos, 

We have created a JSPlayground link to achieve your requirement.  


Regards, 
Shyam G 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;