Update graph

Sep 24, 2012 at 7:08 PM
Edited Sep 24, 2012 at 8:33 PM

Hi, I am using NodeXL in own application and I need to hide/show some vertex and edges on a drawn graph. What is the best way to do it?

Currently I am adding VisibilityKeyValue.Hidden or VisibilityKeyValue.Visible to required vertex and edges and then call nodeXLControl.DrawGraph() but all vertex move a bit after it redrew graph.


Simply I want to use dynamic graph and show changes for specific time interval.

Sep 25, 2012 at 4:15 AM

The overload of NodeXLControl.DrawGraph() that does not take an argument does not lay out the graph before drawing it.  Are you sure that's what you're calling?  There is another overload, DrawGraph(Boolean layOutGraphFirst), that does lay out the graph again if you set layOutGraphFirst to true.  Are you using that?

-- Tony

Sep 25, 2012 at 11:52 AM
Edited Sep 25, 2012 at 11:53 AM

Thank you for reply. I need to use DrawGraph without agrument to redraw. That what I need. 

Sep 25, 2012 at 5:14 PM

I understand what you need, but I was asking you to verify that you are calling this:


and not this:


The first method does not lay out the graph's vertices before drawing the graph, so I would not expect any vertices to move after calling the first method.

If you are indeed calling the first method, is there anything else you are doing to the graph before redrawing it that might affect the vertex locations?  Or are you simply setting some Visibility key values and then calling the method?

-- Tony