Hi Guys,
I am coming across the same problem. In fact, it is not a bug with the legend widget, it has to do with how the rest service is defined from your layer symbology setup in ArcMap. I am building my own custom TOC and this had me stumped for a while. It happens in two instances that I am aware of:
- using "Unique values" in ArcMap, selecting a few categories and grouping them manually
- using "Unique values, many fields" in ArcMap (example in the attached esri_001.jpg)
When you check the rest service information, you will see some 17 entries under "Unique Value Infos: ". Which is essentially re-splitting your groups and undoing all your hard work! (abbreviated screenshot at esri_002.jpg)
So, you can workaround by creating a new column, and manually creating unique categories, but since our data is held in someone else's database, this is not an option for us.
Is there some other approach to this? And/or will ESRI be looking at why this happens in Rest and if it can be fixed?
Thanks,
Richard.