I had quite a bit of points, and on clicking the + the first time it exceptioned. I need a workaround for sure on this, this won't do. It only seems to happen when I first start showing the graph, so maybe it's a timing thing.
************** Exception Text **************System.NullReferenceException: Object reference not set to an instance of an object. at Infragistics.Win.UltraWinChart.AxisTool.Scale(Boolean positive) at Infragistics.Win.UltraWinChart.AxisTool.DoAction() at Infragistics.Win.UltraWinChart.AxisTool.MouseDown() at Infragistics.Win.UltraWinChart.UltraChart.OnMouseDown(MouseEventArgs evt) at System.Windows.Forms.Control.WmMouseDown(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)
I couldn't reproduce this on my machine. Can you provide a bit more information? What version of netadvantage are you using? What chart type? How many points are you displaying? Which axis has the scroll scale enabled? You mentioned that this only happens when you first start showing the chart, but since you're clicking the '+' the chart has already rendered. I'm not completely sure what you mean by this. Does it not throw and exception if you wait longer?
This is a line chart on the latest Infragistics (8.2 .net 2.0). I would say I have about 500 points or so when I first start, that I use a NumericTimeDataSeries to bind to and add to the graph's series, and also I add points dynamically about every second to that list. The treatdatetimeasstring is = false (so I get time on the xaxis). The scrollscale is enabled on both the x and y axis, however the error comes when I click the + sign on the xaxis scrollscale (not tried y axis one). The x axis is set to auto (so it shows labels automatically given Infragistics ranges). It usually occurs when I first bring the form up, and I quickly click the + a couple times. It exceptions pretty consistently, every couple times or so, so it should be reproducible.
Thanks! I really need this one fixed for sure.
You should contact developer support for information about the hotfix. The bug number is 7283. It wouldn't hurt to also include your sample, as they may be able to reproduce the problem.http://es.infragistics.com/gethelp
Sorry I was on business travel and unable to respond until now. I appreciate very much the hotfix. What number hotfix will it be, and when will it be out? This problem still occurs consistently for me so it is absolutely necessary to have this fix, as it is a serious problem. As soon as the hotfix is out I will update you on whether it worked or not.
I can send you the little sample project I made, but it only occurs one in 5 times, but it really depends on PC specs probably, etc. I can't send the full software unfortunately.
I was still unable to reproduce the problem with your code. I tried it both as is and in form load. Regardless, I have added null reference checks to both Scroll and Scale methods of the axis. The changes should be available in the next hotfix, although I cannot fully guarantee it will solve the problem. In the meantime, it would be best if you could submit a stand alone project to developer support for testing. This way they can log a bug for you.
The adding to trhe series is NOT done in my real UserControl in the constructor. It is instead done AFTER the form has loaded. The problem exists in both places, regardless of whether done in form load or not. There's a null reference somewhere due to timing? Can you recreate it with my code there? Move into to form load, it'll do the same thing. Thanks.
You should move all the code from the form's constructor into the form's load event. The constructor should only be used to initialize properties and variables. I bet it'll work fine from the load event.