I am currently using the SPC Control Chart set to PERCENT_DEFECTIVE_PARTS_CHART_VSS. When my chart is complete it seems to be taking the first Sample Sub Group Size and using it to determine Defective %.
1. I load the chart type by calling: Chart.SPCChartType = SPCControlChartData.PERCENT_DEFECTIVE_PARTS_CHART_VSS;
2. I then go through my categories and build an array of defective count for each category. At the last element I add my total defective count.
3. After setting Table header info and control limits.
4. I call Chart.ChartData.SampleSubgroupSize_VSS = sampleSubGroup.TotalSampleCount; to set the number of samples per sample sub group.
5. I call chart.ChartData.AddNewSampleRecord(index, samplesArrayFromAbove, UniqueStringOfSampleSubGroupAsNote);
6. to set the scale I call chart.AutoScalePrimaryChartYRange();
7. Then to use current data I call chart.RebuildChartUsingCurrentData();
I am not sure what I am doing wrong. If you have any advice please let me know. Also if you need additional information please let me know.
Using your data, we reproduced the results you say are correct. Can you send us a zip file of a complete program which reproduces the results you say you are getting.
So I did a lot of testing on this. I think I figured out what is causing my problem. So to test I used your C# sample called VariableSampleSizeControlCharts. In the SimulateData() function of the PercentDefectivePartsControlChart.cs I was able to change the call slightly and reproduce the error.
The value in this.ChartData.SampleSubgroupSize_VSS = numsamplespersubgroup - (int)(25 * ChartSupport.GetRandomDouble()); seems to be ignored. Can you help me determine if this is as designed?