Page Index Toggle Pages: 1 [2]  Send TopicPrint
Hot Topic (More than 10 Replies) Positioning labels optimally (Read 9974 times)
DavidZ
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 22
Joined: Jun 15th, 2013
Re: Positioning labels optimally
Reply #15 - Jul 2nd, 2013 at 3:51pm
Print Post  
I first create the boxes with a default value for bounds e.g. 50,2,50,30
There is also some default text: "Needs Update"
The font is created as :
box.Font = New Font("Arial", 2.6, GraphicsUnit.World)

I then set the text to "Category field (on a Constituent Attribute) is one of the following; Origin for at least one Constituent Attribute record?"

I set the box.TextPadding = new Thickness(3)
and then I do a box.ResizeToFitText.

At this point it is not connected with any links.

A bit later the links are added.

I then lay out the boxes
I then route them with the orthogonal router.
I then do Diagram.ResizeFitItems(5)
and then a Diagram.ArrangeLinkLabels

Thanks

David

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Positioning labels optimally
Reply #16 - Jul 3rd, 2013 at 7:10am
Print Post  
Hi,

I have tried the following with the sample file you attached earlier but cannot see any labels overlapping nodes:

Code
Select All
diagram.LoadFromXml("diagram_001.xml");
foreach (ShapeNode node in diagram.Nodes)
{
	node.Font = new Font("Arial", 2.6f, GraphicsUnit.World);
	node.Text =
		"Category field (on a Constituent Attribute) is one of the following; Origin for at least one Constituent Attribute record?";
	node.TextPadding = new Thickness(3);
	node.ResizeToFitText(FitSize.KeepRatio);
}
new OrthogonalRouter().Arrange(diagram);
diagram.ResizeToFitItems(5);
diagram.ArrangeLinkLabels(); 



Could you save and attach the diagram in which you see overlapping?

Stoyan
  
Back to top
 
IP Logged
 
DavidZ
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 22
Joined: Jun 15th, 2013
Re: Positioning labels optimally
Reply #17 - Jul 3rd, 2013 at 12:51pm
Print Post  
I am attaching the image and the xml file.

Thanks

David
  

flowchart.png (Attachment deleted)
flowchart.txt (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Positioning labels optimally
Reply #18 - Jul 4th, 2013 at 8:18am
Print Post  
Hi,

Try a new version from the PM page.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
DavidZ
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 22
Joined: Jun 15th, 2013
Re: Positioning labels optimally
Reply #19 - Jul 4th, 2013 at 11:06am
Print Post  
Yay!!

Thanks. Looks good.

David
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint