This is a migrated thread and some comments may be shown as answers.

Connection layout problems

5 Answers 143 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Jared
Top achievements
Rank 1
Jared asked on 28 Apr 2015, 04:27 AM

Hi

I am trialling your product with a view to purchasing soon, but am having some issues with the default rendering of connections. I am using Layout Type and Down SubType. I've attached two files. One is the vertical layout that I am trying to achieve, but as you can see the connections don't look great. The second is a horizontal layout which seems to render much better, but isn't what I want.

Is there anything I can do to correct this. I tried adding new connectors to the shape, but can't work out what should go in the Position property in MVC.

Thanks

Jared

5 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 29 Apr 2015, 04:25 PM
Hello Jared,

Which version are you using? We made some improvements in the connections routing in the 2015 Q1 serive pack release(2015.1.408) which should prevent the connections overlapping the shapes at least in most cases. If you using 2015.1.408 or later then could you provide the code for the diagram and a sample of the data so I can test the case?

Regards,
Daniel
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Jared
Top achievements
Rank 1
answered on 29 Apr 2015, 05:04 PM

Hi

We are using version 2015.1.408.545 of the Kendo.Mvc assembly and 2015.1.408 of the kendo.dataviz.diagram.min.js files.

I have attached the relevant code files as a zip. I can't send you the whole solution, so hopefully you can get what you need from there?

Thanks

Jared

 

 

 

 

0
Daniel
Telerik team
answered on 04 May 2015, 07:46 AM
Hello again Jared,

Thanks for the files. I reproduced the problems from the image. The problem with the connection from "Test Company 2" to "Test Trust 5" occurs because the of the order in which the shapes are layouted. You can avoid it by refreshing the connections after the diagram is bound:
function onDataBound(e) {
    var diagram = this;
    setTimeout(function () {
        for (var i = 0; i < diagram.connections.length; i++) {
            diagram.connections[i].refresh();
        }
    }, 0);
}
We will look into to the case with the other overlapping connection.

Regards,
Daniel
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Jared
Top achievements
Rank 1
answered on 05 May 2015, 09:21 PM
Thanks. Would you be able to put that in the context of my View code. I'm not sure how to hook that method up, the api documentation you referenced is a bit sparse.
0
Daniel
Telerik team
answered on 07 May 2015, 09:35 AM
Hi,

The event handler can be specified with the wrapper Events DataBound method:
Html.Kendo().Diagram<StructureChartEntityModel, StructureChartLinkModel>()
      .Name("diagram")
      .Events(events => events.DataBound("onDataBound"))


Regards,
Daniel
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Diagram
Asked by
Jared
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Jared
Top achievements
Rank 1
Share this question
or