Histogram (Data Distribution) using Chart control

  • Thread starter Thread starter PicoCarlosPico
  • Start date Start date
P

PicoCarlosPico

Guest
Hi , I have no much experience using chart control.

I have test data that I am using for a CPK estimation. For the CPK, 50 data measurements, I have the average, Standard Deviation, LSL and USL (Limits of my Data)

I have made several tries with the SereisChartType.Column and Bar but I cant manage to set it up as data distribution or histogram chart

My objective is:

I want to use the chart control to show my data distribution i.e. histogram/bar chart which the height of the bars is proportional to the frequencies(normal distribution). I want to show my data distribution in a range maybe showing USL,LSL and Average with some vertical lines.

1.I am not sure which type of series type I should use:


chart.Series[SeriesHistogram].ChartType =System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Column; or Bar


2. How to set up the chart with my data so I can get a bar plot with:

-In the x axis : the range of the values of my data ( the measurements)

-In the y axis( the height of the bars): the height of the bars will represent the frequency of my data ( higher with the values are repeated more).

3.For a line plot i used:






For (inti = 0; i < NumberOfDataValues; i++)


{

chart.Series[SeriesName].Points.AddXY(i,DataArray);

}

but how should I set the data to plot the bars in data distribution way??


thanks and regards


Continue reading...
 
Back
Top