Hi,
I am trying to plot a Treemap with Node Binder.
<ig:NodeBinder TargetTypeName="TreeMapEntity" ValuePath="val" TextPath="name" NodeStyle="{StaticResource TreeNodeStyle}" />
The binding value (val) is a double and can have positive and negative values.
When I plot the treemap with positive values it is plotting fine.
When the val has negative double values. It is throwing an error
"There are not any valid treemap nodes".
Questions
=========
1. So, can Treemap plot negative values for the Size?
2. If so, am I missing something in my NodeBinder?
Please let me know, how I can resolve this.
Thanks.
Hello,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
If the above suggestion helped you solve your issue please verify the thread as answered so other users may take better advantage of it.
I would like to suggest another approach – use some other positive value for the size of the nodes, and use a custom mapper to bind to the negative and positive values. The mapper will distribute a color depending on "val" property. For example the nodes close to -10 can be red, the nodes around 0 can be black, and the nodes close to 10 – green.
Would this work for you?
I have been reading through your description however such functionality will most like not be available since the ratio between a positive and negative values cannot be calculated to provide an usable plotting value. E.g. the ratio between 10 and -10 is -1. I assume you were thinking something along the line of -10 be represented by a surface of that is 20 time smaller than the surface reserved for 10, however this is not applicable to all scenarios and value ranges. What I can suggest is you make a copy of your data that would add to each value of the collection the absolute value of the smallest value in the collection. E.g. in your case a foreach loop for add -10 to all your values, should allow the look you are looking for.
I have also logged a Feature Request on your behalf with number FR13257. I have sent your feature request directly to our product management team. Our product team chooses new feature requests for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products so as trends appear in requested features, we can plan accordingly.
Please let me know if you require any further assistance on the matter.
Hi
Thanks for the response.
I don't understand what you mean by " allow modular representation". Do you mean Absoulute values?
Say, I have values in my datasource ranging from -10 to 10. What I expect to see is 10 having a larger sized box and -10 having the smallest size. Is this possible by doing a modular representation.
Thank You!
I have been looking into your enquiry, however since the XamTreeMap displays relatively sized surface, areas it seems to have been decided that negative values are inappropriate for special comparison. What I can do for you is create a Feature Request for adding a property that would allow modular representation of all values in the data source, so that such functionality might appear in one of our future releases.
Please let me know if you require any further clarification on the matter.