Example: CuSumStatus Chart
A process is monitored using the CuSumStatus control chart. The solid red bars indicate the process is out-of-control. The hollow green bars indicate that the process is in control. The data is from NIST Engineering Statistics Handbook: CuSumStatus Control Charts
.
using Imsl.Chart2D;
using Imsl.Chart2D.QC;
using System;
public class CuSumStatusEx1 : FrameChart
{
static private readonly double[] data = {
52.0, 47.0, 53.0, 49.3, 50.1, 47.0,
51.0, 50.1, 51.2, 50.5, 49.6, 47.6,
49.9, 51.3, 47.8, 51.2, 52.6, 52.4,
53.6, 52.1
};
public CuSumStatusEx1()
{
AxisXY axis = new AxisXY(this.Chart);
double mean = Imsl.Stat.Summary.GetMean(data);
double slackValue = 0.5;
CuSumStatus cusum = new CuSumStatus(axis, data, mean, slackValue);
cusum.BarPlus.GetBarSet(0,0).FillType = ChartNode.FILL_TYPE_NONE;
cusum.BarMinus.GetBarSet(0,0).FillType = ChartNode.FILL_TYPE_NONE;
cusum.BarPlus.GetBarSet(0,0).FillOutlineColor = System.Drawing.Color.Green;
cusum.BarMinus.GetBarSet(0,0).FillOutlineColor = System.Drawing.Color.Green;
}
public static void Main(string[] argv)
{
System.Windows.Forms.Application.Run(new CuSumStatusEx1());
}
}
Output
Link to C# source.