RangeValueRenderer

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:esri="http://www.esri.com/2008/ags"
               pageTitle="Example - RangeValue Renderer">
    <!--
    Description:
    This sample demonstrates how to create a ClassBreaksRenderer using client-side methods,
    which has been available in the API since version 1.2.
    The difference here is that we're not applying this to client-side graphics, but
    sending the renderer information to the server which is generating the map on the fly at runtime.

    Note:
    This is part of the dynamic server capabilities of ArcGIS 10.1, when your service supports dynamic layers.

    Documentation:
    For more information, see the API documentation.
    https://developers.arcgis.com/en/flex/api-reference/com/esri/ags/layers/ArcGISDynamicMapServiceLayer.html#layerDrawingOptions
    https://developers.arcgis.com/en/flex/api-reference/com/esri/ags/layers/supportClasses/LayerDrawingOptions.html
    https://developers.arcgis.com/en/flex/api-reference/com/esri/ags/renderers/ClassBreaksRenderer.html
    https://developers.arcgis.com/en/flex/api-reference/com/esri/ags/renderers/supportClasses/ClassBreakInfo.html

    ArcGIS REST API documentation:
    http://resources.arcgis.com/en/help/rest/apiref/dynamicLayer.html

    ArcGIS for Server documentation:
    About dynamic layers
    http://resources.arcgis.com/en/help/main/10.1/0154/0154000004zv000000.htm
    -->

    <fx:Declarations>
        <!-- Initial extent -->
        <esri:Extent id="startExtent"
                     xmin="-16971000" ymin="615000" xmax="-4448000" ymax="8110000">
            <esri:SpatialReference wkid="102100"/>
        </esri:Extent>
        <!-- "The Bizzniss" colors courtesy of http://kuler.adobe.com -->
        <esri:SimpleFillSymbol id="sfs0"
                               alpha="0.7"
                               color="0x74C0CF"
                               outline="{sfsOutline}"
                               style="solid"/>
        <esri:SimpleFillSymbol id="sfs1"
                               alpha="0.7"
                               color="0x4FA9B8"
                               outline="{sfsOutline}"
                               style="solid"/>
        <esri:SimpleFillSymbol id="sfs2"
                               alpha="0.7"
                               color="0xF1F7E2"
                               outline="{sfsOutline}"
                               style="solid"/>
        <esri:SimpleFillSymbol id="sfs3"
                               alpha="0.7"
                               color="0x202B30"
                               outline="{sfsOutline}"
                               style="solid"/>
        <esri:SimpleFillSymbol id="sfs4"
                               alpha="0.7"
                               color="0x4E7178"
                               outline="{sfsOutline}"
                               style="solid"/>
        <esri:SimpleLineSymbol id="sfsOutline"
                               alpha="0.1"
                               color="0x1C272C"/>
    </fx:Declarations>

    <s:controlBarContent>
        <s:RichText width="100%">
            This sample demonstrates how to create a ClassBreaksRenderer using client-side methods,
            which has been available in the API since version 1.2.
            The difference here is that we're not applying this to client-side graphics, but
            sending the renderer information to the server which is generating the map on the fly at runtime.
            This is part of the dynamic server capabilities of ArcGIS 10.1, when your service supports dynamic layers.
        </s:RichText>
    </s:controlBarContent>

    <esri:Map id="map" extent="{startExtent}">
        <esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer"/>
        <esri:ArcGISDynamicMapServiceLayer id="demographicsLayer" name="Renter Occupancy by County"
                                           url="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer">
            <esri:visibleLayers>
                <s:ArrayList>
                    <!-- Only show the counties layer -->
                    <fx:Number>2</fx:Number>
                </s:ArrayList>
            </esri:visibleLayers>
            <esri:layerDrawingOptions>
                <esri:LayerDrawingOptions layerId="2">
                    <esri:ClassBreaksRenderer field="RENTER_OCC">
                        <esri:ClassBreakInfo label="0 to 500"
                                             maxValue="500"
                                             minValue="0"
                                             symbol="{sfs0}"/>
                        <esri:ClassBreakInfo label="501 to 10,000"
                                             maxValue="10000"
                                             minValue="501"
                                             symbol="{sfs1}"/>
                        <esri:ClassBreakInfo label="10,001 to 30,000"
                                             maxValue="30000"
                                             minValue="10001"
                                             symbol="{sfs2}"/>
                        <esri:ClassBreakInfo label="30,001 to 90,000"
                                             maxValue="90000"
                                             minValue="30001"
                                             symbol="{sfs3}"/>
                        <esri:ClassBreakInfo label="90,001 to 10,000,000"
                                             maxValue="10000000"
                                             minValue="90001"
                                             symbol="{sfs4}"/>
                    </esri:ClassBreaksRenderer>
                </esri:LayerDrawingOptions>
            </esri:layerDrawingOptions>
        </esri:ArcGISDynamicMapServiceLayer>
    </esri:Map>
    <s:Group left="5" bottom="60">
        <s:RectangularDropShadow left="0" right="0" top="0" bottom="0"
                                 alpha="1"
                                 angle="90"
                                 blRadius="5"
                                 blurX="6"
                                 blurY="6"
                                 brRadius="5"
                                 color="#000000"
                                 distance="1"
                                 tlRadius="5"
                                 trRadius="5"/>
        <s:Rect left="0" right="0" top="0" bottom="0"
                radiusX="5"
                radiusY="5">
            <s:fill>
                <s:SolidColor alpha="0.7" color="0xC5C5C9"/>
            </s:fill>
        </s:Rect>
        <esri:Legend left="5" right="5" top="5" bottom="5"
                     layers="{[]}"
                     map="{map}"/>
    </s:Group>
</s:Application>