Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 SPC Control Chart Tools for .Net
 Having single point in Mean_Range_Chart crashes

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
blazermaniac Posted - 21 Jul 2016 : 17:48:19
I found that if my chart has only a single point then the chart crashes with an 'Overflow error'.

I was able to reproduce this using the BatchVariableControlCharts sample BatchXBarRChart.
6   L A T E S T    R E P L I E S    (Newest First)
blazermaniac Posted - 22 Jul 2016 : 14:55:54
In this particular exercise I did expect the final number of sample intervals to be 1 because I manipulated the logic in SimulateData() to only simulate data for a singe point.

However, you have solved my problem. I reran the test without adjusting numdatapointsinview and it didn't throw an exception. I took a closer look at the logic in my program and found the issue.

Normally I would set numdatapointsinview to a configured amount, however, if they are running a date range report I change numdatapointsinview to the number of rows returns from my query (If you're wondering, we do this in order to be able to capture a screen shot and save it to file). So in the case that only one row is returned from the query, setting numdatapointsinview to that value (1) causes the issue.

I will adjust my logic so that it never sets numdatapointsinview to less than 2.

Thanks for your help!
quinncurtis Posted - 22 Jul 2016 : 13:58:55
You absolutely cannot have the numdatapointsinview parameter used to define the display characteristics of the chart set to 1. It must be set to the final number of sample intervals you expect you expect to display at a time for chart. It cannot be adjusted on the fly.
blazermaniac Posted - 22 Jul 2016 : 13:53:11
How I reproduced it in that example was to put a break point at the following line:

int numdatapointsinview = 17;

After executing that line I changed the value of numdatapointsinview to 1. Next I set a break point in SimulateData() and forced the loop to only execute once. Are these the same steps you used?
quinncurtis Posted - 22 Jul 2016 : 13:14:54
I tested the BatchVariableControlCharts.BatchXBarRChart example, with one data point, in the current release, and cannot reproduce an error. So if it is critical in your application to display a chart with one data point (rather than waiting for two, since that is the only way control lines will be drawn), you should download the current version using your original download link(s).
blazermaniac Posted - 22 Jul 2016 : 11:32:08
I am not calling AutoCalculateControlLimits.

When tested with BatchVariableControlCharts - BatchXBarRCharts, the program got an exception in the Draw method of ChartView the 4th iteration of DrawObject(g2, achartobj, drect);

This is exactly where it happens with my program as well.
quinncurtis Posted - 22 Jul 2016 : 09:18:17
I would assume that you are calling the AutoCalculateControlLimits method, which according to the formulas for control limits require two or more sample intervals. In general you should assume that all charts require a minimum of two sample intervals before you try and plot them.

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