We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Unable to generate radial diagram

I try to build a radial diagram and receive the error below.  If I switch to Hierarchical, I have no issues.

diagram.LayoutManager = new LayoutManager()
                {
                    Layout = new RadialTreeLayout()
                    {
                        HorizontalSpacing = 50,
                        VerticalSpacing = 100
                    }
                };

//code to populate, and create root node here

(diagram.LayoutManager.Layout as RadialTreeLayout).LayoutRoot = node;
(diagram.LayoutManager.Layout as RadialTreeLayout).UpdateLayout();


--Error

"System.InvalidOperationException: Sequence contains no matching element\r   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)\r   at Syncfusion.UI.Xaml.Diagram.Layout.RadialTreeLayout.PrepareActivity()\r   at Syncfusion.UI.Xaml.Diagram.Layout.RadialTreeLayout.UpdateLayout()\r   at Syncfusion.UI.Xaml.Diagram.SfDiagram.DiagramLoadedEvent(Object sender, RoutedEventArgs e)"

3 Replies

RT Ramya Thirugnanam Syncfusion Team October 1, 2013 11:10 AM UTC

Hi Scott,

 

Sorry about the inconvenience caused.

 

The reported issue “RadialTreeLayout throws InvalidOperationException when Layout having Single Node (Root Node) without Connectors and Child Nodes" is confirmed as a defect and we have logged an issue report to fix this. This fix will be available in any of our future releases.

 

Please let us know if you need any further assistance.
Regards,
Ramya



SF Scott Farriss October 1, 2013 06:47 PM UTC

Hi Rayma,

This was actually when the root node did have connectors to other nodes.

Thanks
Scott



RT Ramya Thirugnanam Syncfusion Team October 3, 2013 12:01 PM UTC

Hi Scott,

 

Problem:


Radial TreeLayout throws InvalidOperationException

 

RootNode: A node that does not have any parent is a RootNode, if there are more than one such node, the first occurrence of such node is taken as root node in Nodes collection.

 

Cause of the issue:

The LayoutRoot property does not have any effect in the Layout because it is overridden by identifying RootNode of the Layout internally. This is known issue in Layout. We will provide the support to LayoutRoot for Automatic Layout in our future releases.

 

We can reproduce the reported issue “Radial TreeLayout throws InvalidOperationException” only when the RootNode (Explained above) does not have child Nodes.


If our scenario (“RootNode does not have child Nodes”) does not math with yours, please give us more details such as Screenshot, simple sample to reproduce the reported issue. So that, we would be able to investigate further on this and update you with appropriate solution.


Please let us know if you need any further assistance.
Regards,
Ramya


Loader.
Live Chat Icon For mobile
Up arrow icon