ccposton

What does SetHistogramData do?

Discussion created by ccposton on Nov 7, 2011
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 exmaine 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?

Outcomes