What does SetHistogramData do?

1624
0
11-07-2011 06:10 AM
GeorgeFaraj
Occasional Contributor III
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?
0 Kudos
0 Replies