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

Give Color to Nodes?

Thread ID:

Created:

Updated:

Platform:

Replies:

119671 Jul 21,2015 02:51 AM UTC Jul 21,2015 08:35 AM UTC JavaScript 1
loading
Tags: ejDiagram
Myungjin Cho
Asked On July 21, 2015 02:51 AM UTC

I am trying to make an algorithm for evaluating the viability of the diagram flow 
When I encounter a wrong node in the diagram
I want it to be colored as red. 
Is this possible?

Shyam G [Syncfusion]
Replied On July 21, 2015 08:35 AM UTC

Hi Maverick

Thanks for using Syncfusion products.

Please note that you can set the color for the node at runtime using updateNode API method to achieve your requirement. However we have created a sample in which we have set an color for the node in the click event. please refer the code snippet and sample below.

Code snippet:

$("#diagram").ejDiagram({                                      

                    //define click event

                    click:click,
     });

function click() {

            var diagram = $("#diagram").ejDiagram("instance");

            var node = diagram.selectionList[0];

            if (node) {

                diagram.updateNode(node.name, { fillColor: "red" });

            }
        }  

Sample:http://www.syncfusion.com/downloads/support/forum/119671/ze/simplesample-2079189896

Please let me know if any concerns.

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

;