Page Index Toggle Pages: 1 ... 14 15 [16] 17 18 ... 21 Send TopicPrint
Locked Topic Link between two nodes (Read 129069 times)
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #225 - Jul 28th, 2014 at 3:08pm
 
Have you set the JsLibraryLocation property to point to the .js file in subfolder? It should be set to a URL, either absolute one or relative to the page, and not a local path on the server.

I hope that helps,
Stoyan
« Last Edit: Jul 28th, 2014 at 4:19pm by Stoyo »  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #226 - Jul 29th, 2014 at 6:19am
 
I am going to load XML file using diagram but size of XML is large near about 3 MB,
Its throwing an exception

An unhandled exception of type 'System.StackOverflowException' occurred in MindFusion.Graphs.DLL

Can you tell me solution on that?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #227 - Jul 29th, 2014 at 7:36am
 
What code are you running last before the exception, and what method i shown at top of the call-stack?
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #228 - Jul 29th, 2014 at 8:00am
 
            sFileName = Request.QueryString[0];
            DiagramView1.Diagram = new Diagram();
            DiagramView1.LoadFromXml(Server.MapPath(sFileName));
            MindFusion.Diagramming.Layout.OrthogonalLayout dl = new         MindFusion.Diagramming.Layout.OrthogonalLayout();
            dl.Padding = 10;
            DiagramView1.Diagram.BackBrush = new MindFusion.Drawing.SolidBrush(Color.White);
            DiagramView1.Diagram.RoundedLinks = true;
            DiagramView1.Diagram.RoundedLinksRadius = 10;
            DiagramView1.Diagram.LinkCrossings = LinkCrossings.Arcs;
            DiagramView1.Diagram.CrossingRadius = 2;
            dl.RepeatingLinksPadding = 4;
            dl.Padding = 20;
            dl.MultipleGraphsPlacement = MindFusion.Diagramming.Layout.MultipleGraphsPlacement.MinimalArea;
            dl.Arrange(DiagramView1.Diagram);
            foreach (var li in DiagramView1.Diagram.Links)
            {
                if (li.Origin == li.Destination)
                {
                    var p = li.Origin.Bounds.Location;
                    li.ControlPoints.Clear();
                    li.ControlPoints.Add(new System.Drawing.PointF(p.X, p.Y + 2));
                    li.ControlPoints.Add(new System.Drawing.PointF(p.X - 5, p.Y + 2));
                    li.ControlPoints.Add(new System.Drawing.PointF(p.X - 5, p.Y - 5));
                    li.ControlPoints.Add(new System.Drawing.PointF(p.X + 5, p.Y - 5));
                    li.ControlPoints.Add(new System.Drawing.PointF(p.X + 5, p.Y));
                    li.UpdateFromPoints(false, true);
                }
            }
            DiagramView1.CanvasVirtualScroll = true;
            dl.Arrange(DiagramView1.Diagram);
            DiagramView1.Diagram.ResizeToFitItems(10);

Exception occurred at  dl.Arrange(DiagramView1.Diagram);
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #229 - Jul 29th, 2014 at 11:12am
 
Ok, and what method is shown there at top of the exception's callstack trace? Please attach the xml file.
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #230 - Jul 29th, 2014 at 11:46am
 
Now Exception is changed I have attached XML file with screen shot of exception details.

Please check.
  

Exception_Details.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 #231 - Jul 29th, 2014 at 1:38pm
 
Apparently the default ASP.NET call-stack size is not large enough when running with this graph for some recursive functions called by the layout class. We'll try to change them to use a Stack collection in the heap instead of recursion for next release. For time being try the thread suggestion from this post:
http://stackoverflow.com/questions/2319711/increase-stack-size-iis-asp-net-3-5

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 #232 - Jul 30th, 2014 at 5:36am
 
Thread t = new Thread(Run, 4194304); // 4M of stack size
  t.Start();
  t.Join();
  if (loadException != null) throw loadException;

  void Run()
        {
            try
            {
              // Operation causing stack overflow
            }
            catch (Exception e)
            {
              ...
            }
        }

Here what is mean by loadException , Is it like stackOverflowexception or any thing else?

Can u tell me how to increase size of stack from IIS ? or command prompt ?
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #233 - Jul 30th, 2014 at 11:05am
 
I have one question when I am loading XML in diagram and then calling arrange() method that time why Its taking long time , near about 30 to 40 secs can you tell me reason as well as any solution on that?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #234 - Jul 30th, 2014 at 11:54am
 
Disregard the loadException, it is specific to that example. Just replace the Arrange call with a thread calling it instead.

Code
Select All
var dl = new OrthogonalLayout();
dl.EnableParallelism = false;
dl.MinimizeLinkBends = false;
dl.Refine = false;

Thread t = new Thread(() => dl.Arrange(diagram), 8000000);
t.Start();
t.Join(); 



Quote:
I have one question when I am loading XML in diagram and then calling arrange() method that time why Its taking long time , near about 30 to 40 secs can you tell me reason as well as any solution on that?


Reason is graph layout algorithms have polynomial complexity, so if you have thousands items in the diagram as in last file, it will take some billions algorithm steps to process them. For OrthogonalLayout disable MinimizeLinkBends and Refine properties as above to make it run faster, at cost of quality. If the data you are generating diagrams from does not change often, you could save the arranged diagrams as files in some cache folder and send them from there instead of arranging at each page load.

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 #235 - Jul 31st, 2014 at 4:47am
 
I have attached VISIO files please check. Its displaying in well format in VISIO but not in Viewer.
  

VISIO.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 #236 - Jul 31st, 2014 at 5:16am
 
We do not support Viewer at this time, only full Visio.
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #237 - Aug 1st, 2014 at 5:21am
 
HI,

Nodes from diagram are in editable format, can you tell me property which dose not allows users to edit diagram from web page.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #238 - Aug 1st, 2014 at 5:58am
 
Hi,

Set DiagramView.Behavior = DoNothing.

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 #239 - Aug 1st, 2014 at 8:53am
 
Can you tell me list of different shapes, I want to add It using XML

like <Shape Id="Rectangle" />

I want shape for ellipse,hexagon,trapezoid,parallelogram,diamond,etc
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 ... 14 15 [16] 17 18 ... 21
Send TopicPrint