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

Random Node Population using RadDiagam

2 Answers 76 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Vinod
Top achievements
Rank 1
Vinod asked on 09 Jan 2015, 11:02 AM
Hi team,

I would like to populate nodes as like the attached image which i found on below documentation link (image at bottom of the page)

http://docs.telerik.com/devtools/wpf/controls/raddiagram/features/diagram-layout.html

It came to know there are algorithms which helps to avoid overlapping if more than 500+ nodes are populated in raddiagram with necessary TreeLayout settings. It would be helpful if you provide an example in MVVM way so that i can quickly make use of it in near future.

Thanks a lot

Vinod

2 Answers, 1 is accepted

Sort by
0
Vinod
Top achievements
Rank 1
answered on 12 Jan 2015, 05:32 AM
Okay I got it. No need of any examples. I saw your good examples from your github.
https://github.com/telerik/xaml-sdk

But I have one question, how to get a symmetrical tree by using your StartRadialAngle and EndRadialAngle properties of RadialTree type ?

I will create nodes dynamically and I can tell the parent node only at runtime. Any Suggestions for how to use the layout settings in this scenario ?
0
Pavel R. Pavlov
Telerik team
answered on 13 Jan 2015, 09:28 AM
Hello Vinod,

When working with the Layout feature of the RadDiagram you need to keep in mind that the layout considers the way your shapes are connected. This means if you create a graph that is not symmetrical, the Layout algorithm will not create a symmetrical tree as well. This is why the most important step that you need to make is to create a symmetrical tree with your shapes before using the Layout algorithm.

I cannot see any obstacle in using the Layout at runtime with dynamically added shapes. At the time of performing the Layout you can traverse all the available shapes and find the roots of your structure. After that you will be able to create the necessary settings for the needed layout and use them right after.

Regards,
Pavel R. Pavlov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Diagram
Asked by
Vinod
Top achievements
Rank 1
Answers by
Vinod
Top achievements
Rank 1
Pavel R. Pavlov
Telerik team
Share this question
or