Tow questions about NodeXl?

Jan 31, 2013 at 12:56 PM
Dear tcap479, I have two questions:
1. How can I draw the vertices with shadow? (by API) 
    In NodeXl it seems to be no such sentence--"nodexl.VertexEffect = VertexEffect.DropShadow;"
2. NodeXl's layout has a function which can lay out each of the graph's groups in its own box. Now I have 4 graphs, I want to divide the NodeXl's visual area into 4 boxes(4 parts), so I can draw each graph into one box. How should I do? (by API)
Jan 31, 2013 at 3:43 PM
Edited Jan 31, 2013 at 3:45 PM
Question 1: To draw drop shadows, use this:
nodexlControl.GraphDrawer.VertexDrawer.Effect = VertexEffect.DropShadow;
You can find out more about vertex effects in the "VertexDrawer.Effect Property" topic in the NodeXLApi.chm help file.

Question 2: I assume you mean that you have one graph with four groups, and you want to lay out each group in its own box. To do that, use this:
nodeXLControl.Layout.LayoutStyle = LayoutStyle.UseGroups;
A code sample that uses this layout style can be found in the "LayoutBase.LayoutStyle Property" topic in the NodeXLApi.chm help file.

-- Tony
Feb 1, 2013 at 2:05 PM
Question 2: I know the usage of this sentence --"nodeXLControl.Layout.LayoutStyle = LayoutStyle.UseGroups;" This is the NodeXl's automatic layout function. I want to draw graph's groups manually. For example, I have three groups, I want to divide NodeXl into three areas. I can define the size of each area just like there are three NodeXlControl in a Windows Form and each group uses the same layout.
PS: If a graph's connected component > 1, one subgraph in which only two vertices are connected to each other and the other is consisted of many vertices. I use nodexl's closeness centrality algorithm and I find the smaller subgraph has the largest value of closeness( = 1). But In graph theory its value should be smallest.
Feb 2, 2013 at 6:51 AM
Edited Feb 2, 2013 at 7:07 PM
When you tell NodeXL to lay out the groups in boxes, it uses a treemap algorithm to calculate the boxes. It does not give you an option to calculate the boxes yourself.

To do that, you would have to modify and rebuild the source code. The class that calculates the group boxes is called GroupRectangleCalculator, and as of today it can be found at .

If all of your boxes have the same height or the same width, have you considered showing multiple NodeXLControls side-by-side?

-- Tony
Feb 2, 2013 at 6:56 AM
The closeness centrality of a vertex is the inverse of the sum of the shortest distances between the vertex and all other vertices reachable from it.

-- Tony
Feb 2, 2013 at 1:14 PM
Thanks a lot! Dear tcap479, :P