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. Image for the cookie policy date

Changing node color and speed issues

I''m using Syncfusion Diagram to show a lot of data. I''ve figured out a lot of the steps to programmatically add nodes and links so far. Also, my diagram is read-only but users can still use the zoom and pan tools. The forums and kb articles have been very effective in helping me get this far. Since I have so much data and so many nodes linked together, I thought I could make things easier for the user by allowing them to click on a particular node and that would in turn highlight that node and all the nodes connected to it. It would also highlight the links between them. Some nodes will change color, and some won''t. The links also change color. The problem is that when I''ve already changed color on a node using FillStyle.Color, any subsequent changes have no effect. The code is simple: Symbol symTbl = mainDiagram.Model.GetChildByName(unq) as Symbol; symTbl.FillStyle.Color = Color.Violet; On nodes that I''ve colored before, this doesn''t work. On the others, it does. I''m wondering if there''s any other way to do this. I would like to somehow be able to highlight a node very clearly and highlight all of its links and then be able to un-highlight all of that when the user clicks somewhere else. My other issue is with speed. I''m loading my diagram with tons of symbols and it''s way too slow to be useful. Perhaps I can help speed things up by reducing the symbols. Would hiding the custom ports on a node help, and how would I do that? My links also have arrow heads on them and they are not necessary, would removing those help? If all else fails, I suppose I could generate the diagram and save it as a bitmap. Then just show the bitmap. But that would hurt my ability to highlight particular areas of the diagram. I would appreciate any suggestions. Dustin

1 Reply

AD Administrator Syncfusion Team April 4, 2005 03:13 PM UTC

Hi Dustin, The trouble that you are having with switching the Symbol FillColor is very likely an issue that is specific to your application. I tested this scenario by cycling the Symbol FillColor, both programmatically and using the PropertyEditor, and it appears to work fine. Can you send me a small sample that shows the implementation that you have used? As for performance, it is true that Essential Diagram performance takes a hit when the symbol count becomes very high. We have a high priority QA report on this issue, and are looking into optimization techniques. We will definitely address this issue at the earliest possible. Reducing the number of symbols will definitely improve performance. To hide the ports on a Symbol, iterate through the Model''s collection of Nodes, test whether a particular Node is a Symbol, and if true, access the Symbol''s Ports collection and set the Port.Visible property depending on whether you want the port to be visible. As to whether hiding Ports and Link end point decorators will enhance performance, I am afraid this is not something that we have tested here, but reducing the Port count or even hiding a few ports is bound to increase performance as this reduces the amount of drawing that each Symbol is required to perform when it renders itself. I would very much appreciate it if you could post your findings on this issue. Thanks, Prakash Surendra Syncfusion Inc.,

Live Chat Icon For mobile
Up arrow icon