ASE Home Page Products Download Purchase Support About ASE
ChartDirector General
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  SPC Control Charts using ChartDirectory
Posted by Juzer Mukadam on Sep-22-2009 23:01
Hi,
We are in the process of analyzing the feasibility of using ChartDirector to create SPC Control Charts (XBarR and I&MR/XMR), preferably through a web-based Java application. (We already use ChartDirector for creating simple pie/line charts, but using ASP)

On reading a few other threads on the forum, I understand that there are quite a few customers who already use ChartDirector for their SPC needs (plotting only, of course. I would be doing the computation externally)

Could someone help me out with a few pointers, as to how I can create an SPC chart with some sample data I have?

Thanks for your help.


Best Regards,
Juzer

  Re: SPC Control Charts using ChartDirectory
Posted by Peter Kwan on Sep-23-2009 09:45
Hi Juzer,

I have just responded to your enquriy in the other thread:

http://www.chartdir.com/forum/download_thread.php?site=chartdir&bn=chartdir_general&thread=1145452835#N1253667649

Basically, you would need to compute the SPC statistics with your data, then pass the statistics to ChartDirector to plot the chart.

Computing SPC statistics should not be difficult. The sample code in the other thread, written in PHP, uses 13 lines to compute X, R, xBar, mR, xUCL, xLCL, mRUCL, mRLCL.

The computation code, when translated to Java, should be like:

//compute X and R in group of 3
int noOfGroups = data.length / 3;
double[] X = new double[noOfGroups];
double[] R = new double[noOfGroups];
for (int i = 0; i < noOfGroups; ++i) {
    ArrayMath subgroup = new ArrayMath(new double[] {data[3 * i], data[3 * i + 1], data[3 * i + 2])});
    X[i] = subgroup.avg();
    R[i] = subgroup->max() - subgroup->min();
}

double mR = new ArrayMath(R).avg();
double mRUCL = 2.574 * mR;
double mRLCL = 0.00;
double XBar = new ArrayMath(X).avg();
double XUCL = XBar + 1.023 * mR;
double XLCL = XBar - 1.023 * mR;

Hope this can help.

Regards
Peter KWan