T O P I C R E V I E W |
juilinlee |
Posted - 10 Aug 2010 : 13:52:18 Dear Support team,
I have a question on auto scale y range functions. Before RebuildChartUsingCurrentData, I did execute following lines.
this.AutoScalePrimaryChartYRange(); this.AutoScaleSecondaryChartYRange();
My sample values are 40,40.1,40.4,40.2,40,40.1 which is between 40 and 41. After the chart comes up, all of the sample values are line up on very top. The primary y range is 0 ~ 45. Does there is any way that can make AutoScalePrimaryChartYRange function works better? Is there anything I need to set before do the AutoScalePrimaryChartYRange? I hope the Y range will be 40 ~ 41 after the chart comes up.
Thanks a lot
Rick
|
6 L A T E S T R E P L I E S (Newest First) |
juilinlee |
Posted - 10 Aug 2010 : 18:12:04 Dear Support team,
Thanks for your support.
Rick |
quinncurtis |
Posted - 10 Aug 2010 : 16:13:16 I'm a little confused, since it seems logical that if you set the added control limit to 0.0, the chart will auto-scale to include 0.0 in the range. So it seems that you should set the alarm value of your added control limit to the lower limit of your desired range, 39 or 40 in the example you described.
lcl2 = new SPCControlLimitRecord(this.ChartData, SPCControlLimitRecord.SPC_NOTA_LIMIT,39, "LCL", "LCL");
|
juilinlee |
Posted - 10 Aug 2010 : 15:51:52 Dear Support Team,
I found the issue code, and please advice.
When I add new control limit into a new chart, set the alarmlimit value to 0. (See the red value below) This cause the Y Range start from 0. Do you know any way to go around it?
SPCControlLimitRecord lcl2 = null; lcl2 = new SPCControlLimitRecord(this.ChartData, SPCControlLimitRecord.SPC_NOTA_LIMIT,0, "LCL", "LCL");
If you would like to receive the sample code and picture of the chart, please let me know.
Thanks
Rick |
quinncurtis |
Posted - 10 Aug 2010 : 15:09:19 You also have to set the target value, since that also produces a control line. |
juilinlee |
Posted - 10 Aug 2010 : 14:53:58 Dear Support Team,
Actually I did set control limit for this chart, and the Upper Control Limit is 41, and lower control limit is 40. However, the Y range still start from 0. Hope you have some ideas how this happened, or I did something wrong before execute RebuildChartUsingCurrentData function.
Thanks
Rick |
quinncurtis |
Posted - 10 Aug 2010 : 14:15:57 The y-axis auto-scale routines have to take into account the control limit alarm lines. I assume these have not been set in your program, therefore they default to 0.0, and this causes the y-axis range to auto-scale from 0.0 to you max sample value, approximately 41 in your case. So either auto-calculate the control limit lines, or set them explicitly. |
|
|