Profile Picture

Map legend ranges - is the top of range inclusive or exclusive of the upper bound?

Posted By Kevin Harrison 11 Years Ago

Map legend ranges - is the top of range inclusive or exclusive of the...

Author
Message
Kevin Harrison
Posted 11 Years Ago
View Quick Profile
Supreme Being

Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 176, Visits: 1,865

We have previously been modifying the text displayed on map legends to be of the form <=1, <=2, >2. However, a client's issue suggests that this should be <1, <2 and >=2.

I note that one of the map examples uses "300,000 people and more" for the upper level, but another uses "more than 323 million dollars". Which is correct? I cannot see any settings in the code which allow me to choose between the two possibilities.

Thanks

Kevin



Nevron Support
Posted 11 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Kevin,

The data ranges are determined by the instance of the NDataGrouping class applied to the fill rule used to fill the map and more specifically its Classify method. As the documentation states, the method returns "an array of doubles representing the data ranges. For example an array {0, 12, 32.1} means that there are 3 data ranges: [0, 12), [12, 32.1) and [32.1, Infinity)". As you can see from the description, that means that in your terms <1, <2 and >=2 is the correct way to say this in the legend, so the correct form in the example should be "323 million dollars and more". We will correct this in the next release to avoid any misunderstanding. Thank you for pointing this out.

If you want to change the way the data grouping works, your can create your own class that inherits and implements the NDataGrouping abstract class and put your own grouping logic in there. Another possible solution is to override the GetLowerBoundIndex method of the map fill rule, which returns the index of the data range a given value should be placed in.



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic