SfDiagram just breaks down when data source

Hi,
I'm trying to use this control using a ViewModel but when I place the DataSource of the element it just breaks down (it doesn't throw any exception) but the app gets "frozen" and then it closes.

I attach the code I use.

Regards.

Attachment: TEstructura_e8602db6.zip

1 Reply

AP Arun Prasad Matheshwaran Syncfusion Team June 11, 2018 12:20 PM UTC

Hi Marbella, 

Thanks for using Syncfusion products, 

We have analyzed the provided screenshot and tried to reproduce the mentioned scenario. The issue has been raised due to the incorrect Root property of the DataSourceSettings. 
Please assign the property value of the ParentID in the root instead of assigning its property key. Refer to the below code snippet. 

Code Snippet: 
                        DataModel datamodel = new DataModel(); 
                         DataSourceSettings settings = new DataSourceSettings(); 
            datamodel.Data(); 
            settings.ParentId = "ReportingPerson"; 
            settings.Id = "Name"; 
            settings.Root = "Roland Mendel"; 
            settings.DataSource = datamodel.employee; 
            diagram.DataSourceSettings = settings; 
 
We have attached the sample for your reference. 

Sample Link: 

Please let us know if you need any further assistance. 

Thanks, 
Arun 



Loader.
Up arrow icon