Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Why doesn't this code change the numeric format of the labels generated when I build this renderer? When I execute the set_Break() this nnumeric format is correctly set in the renderer but I still get numbers that look like "110.400000" in the generated label.

INumericFormat numericFormat = new NumericFormatClass();
numericFormat.AlignmentOption = esriNumericAlignmentEnum.esriAlignLeft;
numericFormat.AlignmentWidth = 0;
numericFormat.RoundingOption = esriRoundingOptionEnum.esriRoundNumberOfDecimals;
numericFormat.RoundingValue = 2;
numericFormat.ShowPlusSign = true;
numericFormat.UseSeparator = true;
numericFormat.ZeroPad = false;
IClassBreaksUIProperties classBreaksUIProperties =
classBreaksRenderer as IClassBreaksUIProperties;
classBreaksUIProperties.NumberFormat = numericFormat as INumberFormat;
classBreaksRenderer = classBreaksUIProperties as IClassBreaksRenderer;
share|improve this question
BTW - the point is that the code does nothing - I have tried many setting combinations but the format is just not happening at all. – Chaz Dec 2 '11 at 21:00
I realize now that the IClassBreaksUIProperties class has nothing to do with creating the legend labels generated when a Renderer is created. You can however use the lastBreak and currentBreak values to create a replacement legend item using your own code. Another place it would be nice if the ArcGIS API threw us a bone. – Chaz Dec 16 '11 at 20:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.