Hello,
I am working on a diagram generator which I would like to make every connection path very obvious using AStarRouter. But the problem I have is connections lines overlaps in some scenarios and I have no control preventing them. See the attached CurrentResult.jpg. I would like to prevent them overlapping as the ExpectedResult.jpg
Thanks in advanced!
4 Answers, 1 is accepted
Thank you for contacting us.
Currently, RadDiagram doesn't support such feature. There is logged feature request in our feedback portal where you can vote for it and track its progress. As a workaround, you can implement the connection routing logic manually. Also, you can check RoutingGridSize and RouterInflationValue properties of the DiagramConstants class which can be in hand for your scenario.
- RoutingGridSize -The routing algorithm can be parametrized using this property. The default value is 40 units. This value indicates the size of the cells of the underlying grid used by the algorithm.
public Example()
{
DiagramConstants.RoutingGridSize = 100d;
InitializeComponent();
}
- RouterInflationValue - This property indicates the size of the restricted area around the shapes. By default, its value is 20.
public MainWindow()
{
DiagramConstants.RouterInflationValue = 10;
InitializeComponent();
}
You can read more about these properties in our Routing help article.
Hope this information is helpful. Let us know if you need further assistance.Regards,
Dinko
Telerik
Hi Dinko,
Thanks for the reply.
I did vote for this feature but this is a must have in our case so I should find a way to do that.
Would you please help me more on how I can implement the connection routing logic manually? My question is more about the algorithm itself to prevent overlapping. I know about how creating custom router class.
Thanks
Implementing the desired connection routing logic from scratch is a quite complex task which will require a lot of development time. This is why currently I cannot provide you with a suitable solution for your case. However, if you follow the feature request in the feedback portal, you will get a notification when the status of the item is changed.
Regards,
Dinko
Telerik