Put each group into a small square?

Mar 11, 2014 at 10:31 AM
Edited Mar 11, 2014 at 10:33 AM
Dear tony! How to achieve the effect of this picture by coding? In this picture, each group was put into a small square ---- not the entire screen is divided into several boxes.
Mar 12, 2014 at 3:15 AM
Hello, Dougeloul:

It's a new feature, so you have to be using NodeXL Class Libraries version or later to be able to take advantage of it. (And please note that version was built for .NET 4.0, so your project needs to be using .NET 4.0 or later to be able to use this version.)

I think you've used group-in-a-box before, which you turn on like this:
nodeXLControl.Layout.LayoutStyle = LayoutStyle.UseGroups;
The new feature is accessible via the new ILayout.BoxLayoutAlgorithm property, which you set like this to get the results in the picture you provided:
nodeXLControl.Layout.BoxLayoutAlgorithm = BoxLayoutAlgorithm.ForceDirected;
That's all there is to it.

-- Tony
Mar 13, 2014 at 10:13 AM
The version which I'm using is, the interface of ILayout does't have BoxLayoutAlgorithm inside.
Mar 13, 2014 at 3:50 PM
Edited Mar 13, 2014 at 3:51 PM
That's correct: It's a new feature, so you have to be using NodeXL Class Libraries version or later to be able to take advantage of it.

Does your project use .NET Framework 4.0 or 4.5, or can you change it to use .NET Framework 4.0 or 4.5? If so, then just download NodeXL Class Libraries, drop that into your project, and you will be able to use the new BoxLayoutAlgorithm property.

If, however, your project uses .NET Framework 3.5 and you cannot change it to use .NET Framework 4.0 or 4.5, then you will not be able to use NodeXL Class Libraries, or any future versions of the NodeXL Class Libraries, for that matter. That's because I've changed all NodeXL code to use .NET Framework 4.0, and you cannot use 4.0 assemblies in 3.5 projects.

-- Tony
Mar 14, 2014 at 9:52 AM
Edited Mar 14, 2014 at 9:52 AM
But I still can not find BoxLayoutAlgorithm in The same result I got by using Reflector to decompile.
Mar 14, 2014 at 3:57 PM
I read the source code check-in timeline incorrectly. This feature will be in the next release of the NodeXL Class Libraries, which will be out sometime next week. I'm sorry I gave you the wrong information.

-- Tony
Mar 15, 2014 at 4:09 AM
Oh...It's nothing. Dear tony, very thanks. I'm waiting for the next version. Nodexl will be more perfect if it can support the Tree Layout, I think.
Mar 18, 2014 at 4:47 AM
Hello, dougeloul:

You can find NodeXL Class Libraries version on the NodeXL Downloads tab. It has the Layout.BoxLayoutAlgorithm property you need.

-- Tony
Jul 14, 2014 at 5:22 PM
Hello, dear tcap479:
I'm so sorry to disturb you. Now my Library version
When I use "nodeXLControl.Layout.BoxLayoutAlgorithm = BoxLayoutAlgorithm.ForceDirected ", I find some graphs work well, but some graphs work abnormally.
The graphs which work abnormally only work properly in the mode of BoxLayoutAlgorithm.Treemap and BoxLayoutAlgorithm.Rectangle. When it works abnormally, the graph can't be updated by using "nodexl.DrawGraph(true)". Why?
Jul 15, 2014 at 3:48 PM
Hello, dougeloul:

I need clarification on what you mean by "abnormal" vs. "proper." I'm not sure if you're saying that something is actually broken, or if you just find the layout results unsatisfactory.

If you could narrow this down to a particular case, as in "I set nodeXLControl.Layout.BoxLayoutAlgorithm to BoxLayoutAlgorithm.ForceDirected, this is what I expected to happen, and this is what actually happened," that would be helpful.

-- Tony