Page Index Toggle Pages: 1 [2] 3 4 ... 21 Send TopicPrint
Locked Topic Link between two nodes (Read 129577 times)
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #15 - May 23rd, 2014 at 8:56am
 
How to apply back color to link text.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #16 - May 23rd, 2014 at 9:48am
 
There is no support for filled text background at this time. You might be able to custom-draw it, depending on what ClientSideMode you are using.
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #17 - May 23rd, 2014 at 11:29am
 
Okay and another one thing because of large number of nodes and connectors I am not able to trace flow properly and also the text on lines is not present at appropriate position as desired. I have verified all layouts but still same issue, can u tell me solution on that ?.

I have attached one diagram for reference.
  

rmqych5v21m2yckyeh3bolk1.pdf (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #18 - May 23rd, 2014 at 12:11pm
 
Please attach a diagram XML file (created by SaveToXml method).
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #19 - May 23rd, 2014 at 1:00pm
 
I don't have XML format, Is it possible to add text parallel to connector ?
PFA to see text with connector.
  

FC_TEMP_.jpg (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #20 - May 26th, 2014 at 7:05am
 
If using ImageMap or JavaApplet modes, set link.TextStyle = Rotate or Follow to make the text follow link direction. That's not supported yet in Canvas mode.

By looking at the PDF file, I think OrthogonalLayout should work fine, since there are no more than four links per node. Alternatively, try calling OrtogonalRouter.Arrange after applying other layout classes to distribute links more evenly.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #21 - May 26th, 2014 at 8:51am
 
In previous reply you said need XML file, can u tell me how I can generate XML file.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #22 - May 26th, 2014 at 9:29am
 
Call the Diagram.SaveToXml method.
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #23 - May 26th, 2014 at 11:52am
 
I have attached PDF and its XML file, here i have applied flowchart layout but some connectors are intersecting as well as nod distance is not consistent following is code for that

MindFusion.Diagramming.Layout.FlowchartLayout ll = new MindFusion.Diagramming.Layout.FlowchartLayout();
ll.NodeDistance = 20;
ll.BranchPadding = 10;
ll.LinkPadding = 10;
ll.Orientation = MindFusion.Diagramming.Layout.Orientation.Vertical;
ll.Arrange(diagram);
diagram.ResizeToFitItems(10);

Text file is XML file and another one is PDF file.
  

FlowchartLayout.txt (Attachment deleted)
FlowchartLayout__2_.pdf (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #24 - May 26th, 2014 at 7:21pm
 
FlowchartLayout expects control flow nodes corresponding to branches or loops in source code to have corresponding paired nodes such as end-if or end-loop. It seems you are showing source code in this flowchart? so you might check the JavaScript sample project from Windows Forms version of the control (https://www.mindfusion.eu/FCNetDemo.zip), which demonstrates how to build flowcharts from parsed JavaScript.

If you don't want to add 'end' nodes, try OrthogonalLayout. With default settings it creates the layout shown in attached PDF. However it does not support repeating links (with same origin and destination) and ignores them at this time. You will have to either remove them from the diagram before arranging, or keep them but copy their ControlPoints coordinates from the arranged link between same nodes.

You can also find attached the result of a 'DecisionLayout' algorithm our developers are currently working on. They estimate to complete it in a couple of weeks, but we can send you a pre-release build if you want to try it.

I hope that helps,
Stoyan
  

orthogonal.pdf (Attachment deleted)
decision.pdf (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #25 - May 26th, 2014 at 7:29pm
 
Regarding legibility of labels, I think you will get best results if you add a LinkLabel object to each link instead of setting Text, where the label is associated with first control point and has its AutoArrange property enabled. This will show the labels near the point where links connect to their origins, and you will see the text immediately without having to follow the link, and should keep it away from crossing points with other links. You could get similar results with link.Text if you set LinkStyle = Follow; that style starts rendering text from the beginning of the link, but it will also rotate the text if the first segment is not horizontal which might make it harder to read.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #26 - May 27th, 2014 at 6:40am
 
decision layout is good but Its not possible to use decision layout i want flowchart layout and OrthogonalRouter layout I have attached XML and PDF of  OrthogonalRouter layout plz tell me proper solution on that.(connectors are not linked to node properly)
  

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #27 - May 27th, 2014 at 10:53am
 
The doubled links cause problems in FlowchartLayout too. However it can ignore them and avoid the shown nodes' overlap if you set this property:

Code
Select All
FlowchartLayout layout = new FlowchartLayout();
layout.IgnoreRepeatingLinks = true;
layout.Arrange(diagram);

OrthogonalRouter router = new OrthogonalRouter();
router.Arrange(diagram); 



For OrthogonalLayout you can find the link doubles as shown below, and either remove them before applying the layout, or set their coordinates to the ones of the arranged original links, possibly with some offset:

Code
Select All
// find doubles
var doubles = new Dictionary<DiagramLink, DiagramLink>();
foreach (var node in diagram.Nodes)
{
	for (int i = 0; i < node.OutgoingLinks.Count; i++)
	{
		var li = node.OutgoingLinks[i];
		for (int j = i + 1; j < node.OutgoingLinks.Count; j++)
		{
			var lj = node.OutgoingLinks[j];
			if (li.Destination == lj.Destination &&
				!doubles.ContainsKey(lj))
			{
				doubles[lj] = li;
				lj.IgnoreLayout = true;
			}
		}
	}
}

OrthogonalLayout ol = new OrthogonalLayout();
ol.Arrange(diagram);

foreach (var link in doubles.Keys)
{
	var l = doubles[link];
	link.ControlPoints.Clear();
	link.ControlPoints.AddRange(l.ControlPoints);
	link.UpdateFromPoints();
} 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #28 - May 27th, 2014 at 11:06am
 
Our layout developer made some more improvements in DecisionLayout based on your sample flowchart, now it looks as in attached image. We'll try to port it to ASP.NET and upload a preview version in next few days.

  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #29 - May 27th, 2014 at 12:03pm
 
Thanks i solved the problem of duplication's of connector, but length of connector is not consistent.
I am giving node distance also still some connectors are small and some are large.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 3 4 ... 21
Send TopicPrint