ComponentOne Chart for .NET (2.0) Search HelpCentral 

C1Chart.GenerateHistogramData Method (Double[], Double[], Double, ByRef Double[], ByRef Double[], ByRef Double[])

Generates histogram data from an array of raw data and the specified interval boundaries. Count normalization is permformed by specifying an appropriate NormalizationWidth.

Although the chart has a Histogram chart type, it is sometimes preferable to generate charts similar to histograms, but with slightly different characteristics. This method is provided as a convenience for these occasions.

[Visual Basic]

Overloads Public Shared Function GenerateHistogramData( _

ByVal RawData As Double(), _

ByVal Boundaries As Double(), _

ByVal NormalizationWidth As Double, _

ByRef IntervalBounds As Double, _

ByRef IntervalCounts As Double, _

ByRef BoundaryIntervals As Double _

) As Boolean

[C#]

public static bool GenerateHistogramData(

double[] RawData,

double[] Boundaries,

double NormalizationWidth,

ref double IntervalBounds,

ref double IntervalCounts,

ref double BoundaryIntervals

);

[Delphi]

public class function GenerateHistogramData(

RawData: Double();

Boundaries: Double();

NormalizationWidth: Double;

var IntervalBounds: Double;

var IntervalCounts: Double;

var BoundaryIntervals: Double

): Boolean; overload;

Parameters

RawData

Specifies a double array containing data values.

Boundaries

Specifies the interval boundaries. The boundaries array is sorted internally, and duplication boundaries are eliminated.

NormalizationWidth

Specifies the interval width to be used for normalization. If less than or equal to zero, normalization is not performed.

IntervalBounds

A reference to a double array which will receive the actual ordered and trimmed boundaries of the intervals making up the histogram. This array is generated internally from the input Boundaries array.

IntervalCounts

A reference to a double array which will receive the count of data points that fall into the interval specified by the IntervalBounds array. The IntervalCounts array will necessarily have one less element than the IntervalBounds array.

BoundaryIntervals

A reference to a two element double array which will receive the count of data points that fall outside the specified Boundaries array. Element zero (0) of the array receives the count of data points with values less than the lowest value in the Boundaries array. Element one (1) of the array receives the count of data points with values greater than the highest value in the Boundaries array.

Return Value

A boolean indicating success or failure.

Exceptions

Exception Type

Condition

System.ArgumentNullException

Thrown when RawData or Boundaries are null.

System.ArgumentException

Thrown when RawData or Boundaries arrays are too short.

Remarks

Each pair of consecutive interval boundary values is used to specify an interval. This results in one less interval than the number of boundary points. For example, boundaries of 1,3,4,5,6 would result in 4 intervals of 1-3, 3-4, 4-5, and 5-6. Note that each interval need not be the same width. When varying widths are specified in the IntervalBounds array, the numeric counts are should be normalized by their area. This means that an interval with twice the width of another interval, but with the same number of data points falling within it, will report half the returned count.

See Also

C1Chart Class | C1Chart Members | C1.Win.C1Chart Namespace | C1Chart.GenerateHistogramData Overload List


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.