Select to view content in your preferred language

classbreakinfo min max value question

894
2
Jump to solution
01-25-2012 12:03 PM
TracySchloss
Frequent Contributor
I'm trying to dynamically calculate a quintile map, leaving the field mapped as a variable.  I've captured the values dynamically from the specified field and figured out where my breaks should be within my data.  My problem is in the logic of how classbreakinfos work.  In the examples, it looks like the max value for the first interval is repeated again as the min value of the next interval

[HTML] <esri:GraphicsLayer id="graphicsLayer">
            <esri:renderer>
                <esri:ClassBreaksRenderer attribute="ranking">
                    <esri:ClassBreakInfo maxValue="0.33" symbol="{smallSym}"/>
                    <esri:ClassBreakInfo maxValue="0.67"
                                         minValue="0.33"
                                         symbol="{mediumSym}"/>
                    <esri:ClassBreakInfo minValue="0.67" symbol="{largeSym}"/>
                </esri:ClassBreaksRenderer>
            </esri:renderer>
        </esri:GraphicsLayer>[/HTML]


It seems to me like the min value of each next interval would be something like "maxValue + 0.1", not just a repeat of the max value again.  This doesn't seem logical to me.  If I was using ArcGIS, the starting interval is always an increase for the ending value of the previous break. 

Example in ArcGIS: 
interval 1 = 0-58.56
interval 2 = 58.57 - 88.42
interval 3 = 88.43 - 126.57
interval 4 = 126.58 - 184.03
interval 5 = 184.94 - 559.21

If I use this same logic programmatically, then the polygons with the values 58.56, 88.42, 126, 57, 184.03 and 559.21 don't draw at all (even though I do have a default symbol!).  If I modify my min max values to "overlap" the value of the previous interval -

interval 1 = 0-58.56
interval 2 = 58.56 - 88.42
interval 3 = 88.42 - 126.57
interval 4 = 126.57 - 184.03
interval 5 = 184.04 - 559.21

Then the symbols draw, but those same polygons have the symbol from the next "highest" symbology, not the one I'd expect.  It seems like I read something about being careful where you put your breaks, but now that I'm having this problem, I can't find the reference anywhere!
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
TracySchloss
Frequent Contributor
That's good to know so I can make the adjustments once version 3 comes out.  For the moment, even though I know I shouldn't have gaps, I'm thinking I"m going to need to do a little math like adding or subtracting 0.001 to my values to get the results I'm expecting.  My data is to 2 decimal places, so I think it will work out OK.

In the meantime, I found the reference I was looking for, not under the API reference, but under the Concepts:  http://help.arcgis.com/en/webapi/flex/help/index.html#/Symbolizing_graphics_with_renderers/017p00000... 

"Any value that is greater than or equal to the minimum will be included in the break. Any value that is less than the maximum will be included in the break. Consequently, if you have two breaks, 0???10 and 10???20, the value 10 would fall in the second break (10???20). "

View solution in original post

0 Kudos
2 Replies
DasaPaddock
Esri Regular Contributor
Up until API 3, the max value was exclusive. Starting with API 3 it's inclusive by default to match ArcGIS server behavior.

See:
http://resourcesbeta.arcgis.com/en/webapis/flex-api/apiref/com/esri/ags/renderers/ClassBreaksRendere...

Also, the first match wins.
0 Kudos
TracySchloss
Frequent Contributor
That's good to know so I can make the adjustments once version 3 comes out.  For the moment, even though I know I shouldn't have gaps, I'm thinking I"m going to need to do a little math like adding or subtracting 0.001 to my values to get the results I'm expecting.  My data is to 2 decimal places, so I think it will work out OK.

In the meantime, I found the reference I was looking for, not under the API reference, but under the Concepts:  http://help.arcgis.com/en/webapi/flex/help/index.html#/Symbolizing_graphics_with_renderers/017p00000... 

"Any value that is greater than or equal to the minimum will be included in the break. Any value that is less than the maximum will be included in the break. Consequently, if you have two breaks, 0???10 and 10???20, the value 10 would fall in the second break (10???20). "
0 Kudos