ArcGISDynamicMapServiceLayer - Shaging Polygons in JavaScript Based on Ranges

Discussion created by matthew.brunsdon on Sep 4, 2011
Latest reply on Sep 4, 2011 by stevel
Hey Guys,

I'm new to the API, I have successfully added a ArcGISDynamicMapServiceLayer of postcode boundaries to my map.

I was wondering if there is a way of changing the color of these polygons in the JavaScript based on a range of data that is stored in the service? For example: all polygons with a feature attribute "income" and a  value of "1" are shaded red.

I know this is probably possible at the service level, however I would prefer not to have to create a new service for each range of values that I need to shade the polygons for.

Is that possible at all?

Thanks for your help!