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


Map legend ranges - is the top of range inclusive or exclusive of the...
Author
Message
Kevin Harrison 1
Kevin Harrison 1
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
Posts: 176, Visits: 1.9K

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
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

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


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search