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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Give Color to Nodes?

Thread ID:





119671 Jul 21,2015 02:51 AM UTC Jul 21,2015 08:35 AM UTC JavaScript 1
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:


                    //define click event


function click() {

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

            var node = diagram.selectionList[0];

            if (node) {

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



Please let me know if any concerns.

Shyam G


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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