C# Class System.Windows.Forms.DataVisualization.Charting.Utilities.HistogramChartHelper

Helper class that creates a histogram chart. Histogram is a data distribution chart which shows how many values, from the data series, are inside each segment interval. You can define how many intervals you want to have using the SegmentIntervalNumber field or the exact length of the interval using the SegmentIntervalWidth field. Actual segment interval number can be slightly different due to the automatic interval rounding.
Show file Open project: blgalvan/SIM Class Usage Examples

Public Properties

Property Type Description
SegmentIntervalNumber int
SegmentIntervalWidth double
ShowPercentOnSecondaryYAxis bool

Public Methods

Method Description
CreateHistogram ( System.Windows.Forms.DataVisualization.Charting.Chart chartControl, string dataSeriesName, string histogramSeriesName ) : void

Creates a histogram chart.

Private Methods

Method Description
RoundInterval ( double interval ) : double

Helper method which rounds specified axsi interval.

Method Details

CreateHistogram() public method

Creates a histogram chart.
public CreateHistogram ( System.Windows.Forms.DataVisualization.Charting.Chart chartControl, string dataSeriesName, string histogramSeriesName ) : void
chartControl System.Windows.Forms.DataVisualization.Charting.Chart Chart control reference.
dataSeriesName string Name of the series which stores the original data.
histogramSeriesName string Name of the histogram series.
return void

Property Details

SegmentIntervalNumber public property

Number of class intervals the data range is devided in. This property only has affect when "SegmentIntervalWidth" is set to double.NaN.
public int SegmentIntervalNumber
return int

SegmentIntervalWidth public property

Histogram class interval width. Setting this value to "double.NaN" will result in automatic width calculation based on the data range and number of required interval specified in "SegmentIntervalNumber".
public double SegmentIntervalWidth
return double

ShowPercentOnSecondaryYAxis public property

Indicates that percent frequency should be shown on the right axis
public bool ShowPercentOnSecondaryYAxis
return bool