There a gap in the unique values legend for a raster when created programatically

Last Published: April 25, 2020


After defining a customized unique value renderer, then removing a class from this renderer and applying it to a raster layer, a gap appears in the legend.


The RasterRenderer’s Update method does not refresh after removing a class from the renderer.

Solution or Workaround

When creating the renderer, add only the classes you are using. If you add all classes to the renderer, and then remove the unused ones, you will get a gap in the legend.

Article ID:000003850

  • ArcMap 8 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options