TreeMap sorts by absolute value not actual value, how to fix?

  • The size/placement of the elements in the TreeMap object do not take the signage into account but use the absolute value.
    so for example if I have this data
    UK 100
    FR 70
    DE 50
    NL -90

    Then the treemap will show this order (largest/left)
    UK 100
    NL -90
    FR 70
    DE 50

    I cannot see how to get TreeMap to use the actual value and not the absolute value
    thanks in advance

  • I don't think a negative size makes sense in a TreeMap.  How would that be represented when it expresses a number as a size?

  • Yes that is the problem.
    It treats it as an absolute value so interferes with the 'common sense' objective of the tree map.
    As the smallest values all exist in ultra small boxes in the bottom right, having negative values should be treated as zero or ignored.

    Or to be precise, MS should give options in the object of how should negative values be represented  in a TreeMap.
    1. Absolute (current release)
    2. Treat as Zero.
    3. Ignored

    Thanks

  • "having negative values should be treated as zero or ignored" - you would have to either deal with that in your stored procedure or create a calculated field to do that manipulation in your dataset. There is no way that I know of of doing this directly.

  • Yes, unfortunately it looks like I will have to create specific code for the limitation of the Treemap object. I wanted to make sure I was not missing some piece of information about the new Treemap object.
    It is not difficult to do, just a shame that the object was designed in such a that we have to change our data/logic to match it rather than the other way around.

    Alternatively, if your result does quite correctly return negative values, then Treemap is not an option.
    I would have assumed it would have just added all the negative values into the same size/area bottom left as a 0 or very low figure. 

    Maybe they will fix it in the next SP.

    thanks
    .

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply