Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Microsoft .Net
 SPC Control Chart Tools for .Net
 SPCApplicationControl sample data get rounded

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
Alice Posted - 20 Feb 2008 : 13:49:56
All my sample data is like 4.64,4.53,4.66....basically between 4.5 to 4.8. But on the chart, they all get rounded to integer 5 with correct MEAN like 4.61.

I can not figuer out where the rounding happened. Thanks.
14   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 23 Nov 2015 : 14:35:26
I think you will see them at the very top and bottom of the chart, probably right on the edge of the scale. If you can't, see if you can reproduce the issue using one of our examples (SPCApplication1). If not, you may need to supply us with your own example.

You can set the control limits explicitly as described in the manual starting around page 173.

// Primary cl, ll, hl, Secondary cl, ll, yl
double [] controllimitvalues = {300, 299.85, 300.15, 0.1, 0, 0.2};
this.ChartData.SetControlLimitValues(controllimitvalues);

blazermaniac Posted - 23 Nov 2015 : 14:13:05
This was very helpful. I do not currently have any control limits set however I am calling AutoScalePrimaryChartYRange and AutoScaleSecondaryChartYRange.

When I force it to call AutoCalculateControlLimits it scales correctly. However, it does not show the auto-calculated control limits on the chart, why might that be?

Thanks
quinncurtis Posted - 23 Nov 2015 : 13:17:05
The chart would not produce a 0 to 300 scale unless you are doing one or more of the following:

1. You have one or more sample intervals which do not fit your intended dynamic range of 300 +- 0.1

2. You are not calling AutoScalePrimaryChartYRange (and AutoScaleSecondaryChartYRange) on your collected data.

3. You have other plot elements not in the dynamic range of your data. This can include control limits (or spec limits), or target value, which have not been set, either explicitly, or by using AutoCalculateControlLimits. If you do not set the control limits, they are at default values of 0.0, and will force the chart to scale starting at 0.0.

You can test this using our SPCApplication1 example program, and change the two SimulateData calls to generate data in the range 300 +- 0.1, as in the following call

// training data
SimulateData(50, 300, 0.1);

// Calculate the SPC control limits for both graphs of the current SPC chart (X-Bar R)
this.AutoCalculateControlLimits();

// New data added after limits calculated
SimulateData(150, 300, 0.1);

If you solve this you probably won't need to use PostAddCustomChartObjects to correct for the decimal precision.
blazermaniac Posted - 23 Nov 2015 : 11:17:09
Okay, thanks, that worked for setting the data tool tip decimal precision, however, it still appears to be scaling the primary chart based on the rounded values. The Y scale is from 0 to 320 when I would expect it to be from 300.0 to 300.1.
quinncurtis Posted - 20 Nov 2015 : 13:26:50
You can try something like this.

Add a override of the PostAddCustomChartObjects method to your main SPCChart class. This is called after the charts are created, but before they are displayed.

override public void PostAddCustomChartObjects()
{
int decs = this.SecondaryChart.YAxisLab.AxisLabelsDecimalPos;
this.PrimaryChart.Datatooltip.YValueTemplate.SetDecimalPos(decs + 2);
}

Set the decimal precision of the tooltip to some explicit value, or set it to track the SecondaryChart y-axis labels, plus some constant.
blazermaniac Posted - 20 Nov 2015 : 12:12:58
Okay this is an INDIVIDUAL_RANGE_CHART with a sample subgroup size of 1 and makes use of both primary and secondary charts. One example of the primary charts Y axis value range is 0 - 300 while the secondary charts Y axis value range is 0.00 to 0.02. The array of sample values are 300.06, 300.056, 300.06, 300.053, 300.056, 300.053, 300.053, 300.06, 300.053, 300.059, 300.055, 300.052.

Can you give me instructions on how to determine the default decimal precision?

I want the decimal precision to reflect that of the sample values, in this case it would be 3. Currently the decimal precision appear to vary based upon rounding results.

Thanks
quinncurtis Posted - 20 Nov 2015 : 10:46:20
Those properties have nothing to do with the data tool tip decimal precision. They only apply to the table above the charts.

The data tool tip decimal precision is automatically calculated as 2 + the y-axis label decimal precision values, which is auto-calculated based on the range of the data in the chart. Can you give explicit example values of what the range of y-axis is, and what the default decimal precision is, and what you want it to be.
blazermaniac Posted - 19 Nov 2015 : 17:59:50
I am having a very similar issue in that when I click on a point on the chart it shows the rounded value. Also, it appears to scale based upon the rounded value. I have tried to use the following but to no effect:

Before calling InitSPCBatchVariableControlChart
this.ChartTable.SampleItemTemplate.DecimalPos = 3;
this.ChartTable.CalculatedItemTemplate.DecimalPos = 3;
After calling InitSPCBatchVariableControlChart
this.ChartData.DefectiveDecimalPrecision = 3;
this.ChartData.CalculatedValueDecimalPrecision = 3;

Any guidance would be appreciated.

Thanks
Alice Posted - 20 Feb 2008 : 16:03:26
Great. I reinstalled the document and the manual comes back!
quinncurtis Posted - 20 Feb 2008 : 15:55:54
Did the manual get damaged before or after your installed the software, i.e. at any point in time since you purchased the software, have you ever looked at the manual, QCSPCChartNetManual.pdf ? If so, you should just reinstall the software from your original download.
Alice Posted - 20 Feb 2008 : 15:51:20
Oops, my manual file "is damaged and could not be repaired" when I open it. Is there any site I can download that file?
quinncurtis Posted - 20 Feb 2008 : 15:14:35
Yes, you will find various options discussed in the manual, in Chapter 6 - SPC Variable Control Charts, in the section "Table Strings".
Alice Posted - 20 Feb 2008 : 14:59:07
Thank you! That works!

Another question: Is it possible to hide the top part of the ApplicationUserControl,which means only display the bottom charts, not sample data listed above?
quinncurtis Posted - 20 Feb 2008 : 14:45:45
We assume you are referring to the sample item data in the table at the top of the SPC Chart.

Use code simliar to below

C#
this.ChartTable.SampleItemTemplate.DecimalPos = 2;


VB
Me.ChartTable.SampleItemTemplate.DecimalPos = 2


to set the decimal precision of those values. This does not affect the stored precision of the values, which is always stored as a double at full precision.

If this does not apply, please be more specific.
What SPC Chart type are you using ?
Exactly WHERE does the sample data appear rounded?

Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07