Best way to "animate" a graph?

Jun 29, 2009 at 2:09 PM

I'm making use of the NodeXLControl in a Windows Forms application and would like to "animate" the graph.  I have a data point that changes over time and I'd like to show the change of the said data point by manipulating the color/size of the vertexes that are drawn on the Graph.  I'm currently modifying the PerColor metadata key of the vertex, however, am having issues with the graph re-drawing so the "animation" can be seen.  I've started to dig into the NodeXL code but figured I'd drop a note here to see if someone could provide a recommendation to do what I'm looking to do given the current code base.


Jun 30, 2009 at 5:07 PM

There are a couple of ways this could be done.  The first is to call NodeXLControl.DrawGraph(false) after modifying the metadata.  This isn't particularly efficient, because it redraws everything.  A second way would be to call NodeXLControl.GraphDrawer.RedrawVertex().  Be forewarned that the GraphDrawer property isn't meant for public use (it's marked as "do not use this property") and could go away in future versions.

I do not know how well such animation would perform.  I've never tested it, and NodeXL isn't really optimized for this sort of thing.

-- Tony

Jul 1, 2009 at 6:36 PM

Thanks Tony.  I've tried both approaches and they see to work OK for the graphs I'm dealing with.  Hopefully, as the graphs I'm dealing with increase in size they'll continue to perform.