Page Index Toggle Pages: 1 ... 10 11 [12] 13 14 ... 21 Send TopicPrint
Locked Topic Link between two nodes (Read 157294 times)
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #165 - Jul 8th, 2014 at 6:35am
 
For arrowhead outline, set HeadPen:

Code
Select All
<HeadPen>
    <Color>#FFFF0000</Color>
    <DashOffset>0</DashOffset>
    <DashStyle>0</DashStyle>
    <LineJoint>0</LineJoint>
    <MiterLimit>10</MiterLimit>
    <Width>0</Width>
</HeadPen> 



For fill color it's the Brush property, in same format as nodes.
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #166 - Jul 8th, 2014 at 9:27am
 
Stoyo wrote on Jul 8th, 2014 at 5:27am:
Code
Select All
var point = new PointF(0, 0);
var link = diagram.Factory.CreateDiagramLink(point, point);
link.Pen = new Pen(Color.Red, 0);
diagram.SaveToXml("test.xml"); 



creates the following XML:

Code
Select All
<Link Class="std:DiagramLink" Id="0" Version="2">
  ...
  <Pen>
    <Color>#FFFF0000</Color>
    <DashOffset>0</DashOffset>
    <DashStyle>0</DashStyle>
    <LineJoint>0</LineJoint>
    <MiterLimit>10</MiterLimit>
    <Width>0</Width>
  </Pen> 



I hope that helps,
Stoyan


For Dash lines what will be the value of <DashStyle>0</DashStyle> ?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #167 - Jul 8th, 2014 at 9:31am
 
Try with 1.
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #168 - Jul 8th, 2014 at 9:40am
 
Stoyo wrote on Jul 8th, 2014 at 9:31am:
Try with 1.

Tried with 1 but its not coming.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #169 - Jul 8th, 2014 at 9:51am
 
Actually the HTML Canvas element does not support drawing dashed lines yet, so you won't see them in NetDiagram's Canvas mode. They should render fine in the other modes.
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #170 - Jul 8th, 2014 at 10:51am
 
Stoyo wrote on Jul 8th, 2014 at 9:51am:
Actually the HTML Canvas element does not support drawing dashed lines yet, so you won't see them in NetDiagram's Canvas mode. They should render fine in the other modes.


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


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #171 - Jul 9th, 2014 at 4:44am
 
I have attached XML with PDF, Is any ways to minimize crossings and improve layout.

I am using your given code with orthogonal layout.
  

XMLwithPDF_001.zip (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 #172 - Jul 9th, 2014 at 3:56pm
 
At first glance setting ol.MinimizeLinkBends = false seems to create less crossings, at the cost of larger layout area. We'll try to improve it when enabled for next release.
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #173 - Jul 10th, 2014 at 4:16am
 
when I am trying
var layout = new MindFusion.Graphs.LayeredLayout();

Its giving error assembly missing even added js file.

  

MindFusion_Diagramming_js_001.zip (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 #174 - Jul 10th, 2014 at 5:27am
 
Are you calling this from JavaScript on client side or C# on server?
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #175 - Jul 10th, 2014 at 5:46am
 
Stoyo wrote on Jul 10th, 2014 at 5:27am:
Are you calling this from JavaScript on client side or C# on server?


In C#
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #176 - Jul 10th, 2014 at 5:59am
 
It's in MindFusion.Diagramming.Layout namespace:

var layout = new MindFusion.Diagramming.Layout.LayeredLayout();
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #177 - Jul 10th, 2014 at 6:05am
 
Actually I got this code from your team but its not working i mean compiler time errors,
Adding this code to C#.


var diagram = $find("diagram");

var AnchorPattern = MindFusion.Diagramming.AnchorPattern;
var ioPattern = new AnchorPattern(
[
   new AnchorPoint(0, 50, true, true, MarkStyle.None),
   new AnchorPoint(100, 50, true, true, MarkStyle.None)
]);
for (var n = 0; n < diagram.nodes.length; n++)
{
   var node = diagram.nodes[n];
   node.setAnchorPattern(ioPattern);
}

var layeredLayout = MindFusion.Graphs.LayeredLayout;
layout = new layeredLayout();
layout.direction = MindFusion.Graphs.LayoutDirection.LeftToRight;
layout.nodeDistance = 8;
layout.layerDistance = 20;
layout.anchoring = MindFusion.Graphs.Anchoring.Reassign;
diagram.arrange(layout);

This should avoid crossings, but if you still want to bend the links, call
their route() method after arrange -

for (var l = 0; l < diagram.links.length; l++)
{
   var link = diagram.links[l];
   link.route();
}
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #178 - Jul 10th, 2014 at 6:09am
 
That's JavaScript code to call from client side scripts, it won't look exactly the same in C#.
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #179 - Jul 11th, 2014 at 4:14am
 
I have attached XML, VISIO and PDF.

There is problem in VISIO files again here smooth bends are not present and crossing of links.
  

XML_Visio_PDF.zip (Attachment deleted)
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 ... 10 11 [12] 13 14 ... 21
Send TopicPrint