Telerik Forums RSShttp://www.telerik.com/urn:uuid:fbfb9b4d-13cc-49d0-a43f-9f8b26d6bc15http://www.telerik.com/forums/permalink/TZv7-8wT0EmkP5-LJta8FQPlacing multiple graphs in same diagramHello Shalvin,<br />
<br />
We understand your requirements. One is to control the order of the independent graph components in the Diagram. Currently this is not supported, the diagram arranges the components based on their width decreasingly - that is why the wider component in your scenario is on the left of the smaller one. You can <a href="http://feedback.telerik.com/Project/143/Feedback/Details/113795-diagrams-extend-the-layout-mechanism-to-allow-control-over-the-layouted-elements" target="_blank">vote for this related feature request</a> for customizing the layout of the diagram. This way you will increase its development priority.&nbsp;<br />
The other layout with misplaced shapes is produced because the tree layout in the diagram does not support cycles (level1 - level2_1 - level2_2 - level3_1_1 is a cycle). You can subscribe for <strong>DiagramLayoutComplete </strong>event and manually position the shapes by setting their Position property. Once a layout is ok for you, you can consider saving it and then loading it in future application runs. You can also consider writing your own Layout algorithm from scratch.<br />
<br />
Regards,<br />
Petar Mladenov <br />
Telerik
<div class="forumBaloonTop">&nbsp;</div>
<div class="forumBaloon">
<p>Check out the <a href="http://www.telerik.com/platform" title="Telerik Platform"><strong>Telerik Platform</strong></a> - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.</p>
</div>
<div class="forumBaloonBottom">&nbsp;</div>urn:uuid:66187d8b-4720-4349-bc50-e9d0a46c693ahttp://www.telerik.com/forums/permalink/i30YZiBHSUO8UOnQpGxpOgPlacing multiple graphs in same diagramHi Peter,<br />
<br />
It has been observed that I was also using similar code behind (no rout though). The issue is still there when I add more entries, it become distorted and the label went below main tree graph.<br />
<br />
Also, basically I will be having multi -&gt; Single mapping as well in future (completely dynamic) and I am planning to use the&nbsp;MindmapVertical for the purpose.<br />
<br />
Attached are the two samples I have created. The issue is that&nbsp;<br />
1. If the width of main map is getting increased, the label map will move below to main map (There can be any number of entries in one level<br />
2. I am not able to place the label map in left side of code though changed order of adding them to map and adding roots to settings<br />
<br />
Also noticed that in many cases, the graph become distorted. As the data will be dynamically generated and displayed to client, it is very important to be neat (Image Rad02 is an arranged version of Rad03).<br />
<br />
Any advice is much appreciated.<br />
<br />
Thanks,<br />
Shalvin<br />
<br />
<br />urn:uuid:d6790e4f-7d21-4ba5-b1bf-7a0334ef3d59http://www.telerik.com/forums/permalink/Tw551iF9pUuxv3oDNO89WQPlacing multiple graphs in same diagramDear Peter,<br />
<br />
Thank you so much for the reply. This is exactly what we wanted. Though I need to arrange them keeping label left, but apart from that, all is well. I had tried this before as well, but what happen was the second&nbsp;graph was displayed at the bottom of first graph always. I am yet to understand the mistake I have made, but thank you very much for the awesome support. I will keep you posted in case if any further queries.<br />
<br />
Thanks,<br />
Shalvin.<br />urn:uuid:05fe8b6f-352a-4cdc-b7e3-76008c0fdedahttp://www.telerik.com/forums/permalink/b4v-BSo13Ey343YAjA_e2gPlacing multiple graphs in same diagramHello Shalvin,<br />
<br />
The RadDiagram supports <a href="http://www.telerik.com/help/wpf/raddiagram-features-diagram-layout.html" target="_blank">layout</a> of multiple independent graph components. The key moment is that you need to set the roots of the separate graphs in the tree layout settings:<br />
<div class="tFormatCodeBlock supportThreadCodeBlock" style="border: 1px solid #7f9db9; overflow-y: auto;" id="highlighter_61475">
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">settings.Roots.Add(</code><code style="color: #006699; font-weight: bold;">this</code><code style="color: #000000;">.diagram.Shapes[0]);</code></span></div>
<div style="background-color: #f8f8f8;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 32px !important;"><code style="color: #000000;">settings.Roots.Add(</code><code style="color: #006699; font-weight: bold;">this</code><code style="color: #000000;">.diagram.Shapes[1]);</code></span></span></div>
</div>
<div class="tFormatCodeBlock supportThreadCodeBlock" style="border: 1px solid #7f9db9; overflow-y: auto;" id="highlighter_27378">
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">this</code><code style="color: #000000;">.diagram.Layout(LayoutType.Tree, settings);</code></span></div>
</div>
The attached project demonstrates this functionality. We hope this is exactly what you need.<br />
<br />
Regards,<br />
Petar Mladenov <br />
Telerik
<div class="forumBaloonTop">&nbsp;</div>
<div class="forumBaloon">
<p>Check out the <a href="http://www.telerik.com/platform" title="Telerik Platform"><strong>Telerik Platform</strong></a> - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.</p>
</div>
<div class="forumBaloonBottom">&nbsp;</div>urn:uuid:f86eb30b-06b9-4863-9b9a-6fd04fc24746http://www.telerik.com/forums/permalink/C7Nu-LkGY0ibmm_QT8JHRgPlacing multiple graphs in same diagramHi,<br />
<br />
We need to display a dynamic tree with multiple levels as showed in attached image. Levels needs to be left aligned and will be separate from main. Both the trees will be generated dynamically, and should display with the tree layout.<br />
<br />
I am able to generate both the graphs with no issues, but not able to place both in same graph as it supports only one. I tried to place both the graphs in two separate graphs in a grid with two columns and tried to synchronize the zoom, but that is getting distorted and overlapped.<br />
<br />
Any way to place both the graphs in same diagram, but one with fixed value for x (as shown in the diagram) ?<br />
<br />
Any advice/support is much appreciated.<br />
<br />
Thanks,<br />
Shalvin.