2

I run the following code:

IClassify classify = new NaturalBreaksClass();
ITableHistogram tableHistogram = new BasicTableHistogramClass();
IBasicHistogram basicHistogram = tableHistogram as IBasicHistogram;
tableHistogram.Table = table;
tableHistogram.Field = fieldName;
if ( !string.IsNullOrEmpty( normName ) ) tableHistogram.NormField = normName;
object dataFrequency;
object dataValues;
basicHistogram.GetHistogram( out dataValues, out dataFrequency );
double[] data = dataValues as double[];
int[] freq = dataFrequency as int[];
classify.SetHistogramData( data, freq );

but when I examine the classify object SetHistogramData() appears to have done nothing despite the fact that I can clearly see over 2000 items in both the data and freq arrays.

I can read the values from the array directly and set them in the ClassBreaksRenderer using set_Break() but if that is the correct way then why should I call SetHistogramData() at all? What does SetHistogramData do?

closed as off-topic by Evil Genius, Mapperz Sep 26 '16 at 16:08

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – Evil Genius, Mapperz
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Not sure if this has anything to do with your problem, but in general if you are working with an interface named ISomeInterface and see another interface named ISomeInterfaceGEN, then you should use the GEN interface with .NET. In this case IClassifyGEN. – Kirk Kuykendall Nov 7 '11 at 19:44
  • I totally get that after spending the whole day reading everything I could about classification. If I had not read this in the help for the NaturalBreaksClass Class I would have come to that conclusion sooner: This classification only uses the IClassify interface, so there is nothing to set up other than calling IClassify::SetHistogramData. The ESRI documentation presumes you can tell six things apart that have the same name and that you were arm and arm with Noah when he stepped from the Ark. Without this site I'd be in Davy Jones locker. – Chaz Nov 7 '11 at 22:23