Author |
Topic  |
|
fsjodin
26 Posts |
Posted - 02 Oct 2007 : 12:56:52
|
Hi.
Every once in a while when I zoom into a plot I will get the exception below. It does not happen often but seems more prevalent when I have set a custom TickMarkTimeBase on the X-Axis.
I do not have a reliable way of reproducing it, when I get the exception, if I zoom out and then zoom in again sometimes the exception will occur again, sometimes not.
Do you have any suggestions for what might be causing this exception to occur?
System.ArgumentException: The result is out of the supported range for this calendar. The result should be between 01/01/0001 00:00:00 (Gregorian date) and 12/31/9999 23:59:59 (Gregorian date), inclusive. at System.Globalization.Calendar.CheckAddResult(Int64 ticks, DateTime minValue, DateTime maxValue) at System.Globalization.Calendar.Add(DateTime time, Double value, Int32 scale) at System.Globalization.Calendar.AddDays(DateTime time, Int32 days) at com.quinncurtis.chart2dnet.ChartCalendar.Add(Int32 item, Int32 value) at com.quinncurtis.chart2dnet.ChartCalendar.CalendarDaysAdd(ChartCalendar dstart, Int64 numdays, Int32 nweektype) at com.quinncurtis.chart2dnet.TimeScale.CoordinateAdd(Double rdatevalue1, Double rsecs) at com.quinncurtis.chart2dnet.TimeScale.ConvertXYCoordToTime(Int64 x) at com.quinncurtis.chart2dnet.TimeScale.WorkingToPhysScale(Double v) at com.quinncurtis.chart2dnet.PhysicalCoordinates.UserToPhysX(Double x) at com.quinncurtis.chart2dnet.PhysicalCoordinates.ConvertCoord(Point2D dest, Int32 ndestpostype, Point2D source, Int32 nsrcpostype) at com.quinncurtis.chart2dnet.ChartZoom.SetPhysSuperZoomLocations(PhysicalCoordinates atransform) at com.quinncurtis.chart2dnet.ChartZoom.ProcessSuperZoom() at com.quinncurtis.chart2dnet.ChartZoom.OnMouseUp(MouseEventArgs mouseevent) at com.miswaco.cri.charting.StripPlotChartView.ZoomWithStack.OnMouseUp(MouseEventArgs mouseevent) in C:\-----\StripPlotChartView.cs:line 1063 at com.miswaco.cri.charting.MouseModeBoundMouseListener.OnMouseUp(MouseEventArgs mouseevent) in C:\-----\MouseModeBoundMouseListener.cs:line 48 at com.quinncurtis.chart2dnet.ChartView.OnMouseUp(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ContainerControl.WndProc(Message& m) at System.Windows.Forms.UserControl.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
|
|
quinncurtis
1164 Posts |
Posted - 02 Oct 2007 : 13:13:13
|
Sorry, there is nothing we can suggest based on the information provided. We are not sure what you mean by "custom TickMarkTimeBase"; you may want to explain how that is different from a regular TickMarkTimeBase. If you come up with a way for us to reproduce the problem we may be able to suggest something. |
 |
|
fsjodin
26 Posts |
Posted - 02 Oct 2007 : 15:41:40
|
Sorry, I should not have said custom TickMarkTimeBase.
What I meant to say is that the exception seems to occur more often when I have called chartView.SetAxisTickMarkTimeBase(TickMarkConstant);
Where TickMarkConstant is one of the TIMEAXIS_* constants such as: ChartObj.TIMEAXIS_50YEAR10YEAR ChartObj.TIMEAXIS_20YEAR5YEAR
etc.
Unfortunately I do not have a reliable way of reproducing it. In the same plot, zooming in and out multiple steps will work fine many times and then all of a sudden the exception occurs.
An additional factor is that it only seems to be happening with plots with a large number of datapoints. I have a plot with 3 Y-axes, 470000 data points and I can make it happen somewhat often in that plot by zooming in and out at random. In plots with ~20K datapoints I cannot recollect seeing it happen. I do know you recommend reducing the number of points and that having a plot with 470K points is not beneficial etc.
I do not have access to the chart2dnet source code so I am not sure what the ChartZoom is doing when the exception occurs. From the method names it looks like the mouse coord is being translated from user coord to phys pos coords and that for some reason in these specific cases the calculation ends with a invalid datetime object. Are there any opportunities for overflows or similar?
|
 |
|
quinncurtis
1164 Posts |
Posted - 02 Oct 2007 : 18:16:16
|
Yes, it does look like the software is trying to evaluate an invalid date. But there is no real possibility of us making any suggestions unless we have the source to a simple exmaple that can reproduce it.
|
 |
|
|
Topic  |
|
|
|