‎02-24-2009 10:16 AM
I'm using the ScatterGraph control formatting with an x-axis format mode of DateTime. When I pan or zoom so that the visible range is <0 I a DateTime ArgumentOutOfRangeException is thrown from the main app. How can I handle this? Or alternatively how can I set the ScatterGraph to ignore calls to pan/zoom out of range?
To easily reproduce the exception you can use the PlotDateTime example (C😕Documents and Settings\All Users\Documents\National Instruments\MStudioVS2008\DotNET\Examples\UI\WindowsForms\Graph\PlotDateTime\cs\PlotDateTime.2008.sln).
1. Change MainForm.cs
from:
private DateTime startDate = DateTime.Now;
to:
private DateTime startDate = DateTime.MinValue;
2. Build and Run.
3. Click Chart Data.
4. Click Stop Charting.
5. Use the shift-left drag to pan left.
6. Boom!
Using Measurement Studio 8.6 for Visual Studio 2008 on WinXP SP2 with .NET 3.5
Solved! Go to Solution.
‎02-24-2009 12:11 PM
Hey Furmar,
You can catch and handle this issue in the RangeChanged event of the axis in question. Check out the end of this forum I answered a little while ago for more information.
Let me know if you still have any questions!
NickB
National Instruments