Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Group shapes by criteria (Read 1302 times)
Alex.kg
YaBB Newbies
*
Offline



Posts: 7
Joined: May 21st, 2009
Group shapes by criteria
Dec 22nd, 2009 at 12:34pm
Print Post  
Hi Stoyan,

Could you help to resolve question with layouts:

The idea is visually group shapes in different areas of diagram based on criteria assigned to each shape. Similarly to SpringLayout with enabled clusters.

I've tried the following approach:

- Collect shapes into list of DiagramItemCollection based on criteria

For each DiagramItemCollection did the following:

a. Define area(set SpringLayout.LayoutArea) where group of shapes(DiagramItemCollection) should be located
b. Invoke SpringLayout.Arrange (Diagram, DiagramItemCollection)


But finally I've got shapes arranged into a horizontal line.

Ideally, I'm looking for an approach to group shapes like in the picture:



Alex
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Group shapes by criteria
Reply #1 - Dec 22nd, 2009 at 12:59pm
Print Post  
Hi Alex,

If there aren't any links between the group nodes, SpringLayout considers them separate graphs and applies MultipleGraphsPlacement, whose value is Horizontal by default. Try setting SplitGraph to false; then the layout method should treat the nodes as a single graph. You might also try SplitGraph = true with MultipleGraphsPlacement = MinimalArea.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint