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

Complex Data Binding in a Tree Map

Am I correct that sftreemap doesn't support complex data binding for the WeightValuePath and ColorValuePath properties?  SFChart allows me to bind the X and Y axis to a complex data model like like YBindingPath="Entry[0].Value"  and that works just fine.   Using the same format for the treemap value paths returns a blank treemap.  If that is working as designed it's a severe limitation which makes it so I have to have two completely different viewmodels just to see the same data in a different visual presentation.  If it can support it, does it use a different format?  Do I need a custom data template?


3 Replies

MV Mohana V Syncfusion Team May 6, 2015 12:37 PM UTC

Hi Jeff,

Query: "SfTreemap doesn't support complex data binding for the WeightValuePath and ColorValuePath properties?"

We have analyzed your query and SfTreeMap supports complex data binding for "WeightValuePath" and "ColorValuePath" properties.

We have created a simple treemap sample which showcase achieving the complex data binding for "WeightValuePath" property. In sample weightvaluepath has been binded with "PathCollection[0].Weight".

Please find the below attached treemap sample:


Please get back us if you face any difficulties with the provided sample.

Please let us know in case of any queries.

Mohana V

JD Jeff Dalby May 7, 2015 06:09 PM UTC

I sincerely apologize for my lack of clarity in what I meant by a complex data binding.  I was using the term as defined in the SFChart help section on Data Binding.  In your example you've bound the weight and color paths to a separate ObservableCollection object, whereas I need that Observable collection to be a member of the ItemsSource object.  I've modified the example solution to demonstrate what I need.  You will find additional comments in the main page XAML file to show what I mean about the binding method used for SFChart does not work for SFTreeMaps.  I've tried other alternatives that I am aware of (one of which is in the example) and have been unsuccessful.

Again I thank you for your assistance.

Attachment: FlatCollectionWRT_8b40f65.zip

MV Mohana V Syncfusion Team May 8, 2015 11:51 AM UTC

Hi Jeff,

Currently SfTreemap doesn't have the support for "Complex data binding support for treemap properties" and we have already added this requirement to our feature request list and we will implement this feature in any of our upcoming essential studio volume releases.

Please let us know if you have any questions about this.

Mohana V

Live Chat Icon For mobile
Up arrow icon