From: SourceForge.net <no...@so...> - 2009-12-17 12:12:29
|
Bugs item #2916205, was opened at 2009-12-17 12:12 Message generated for change (Tracker Item Submitted) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821568&aid=2916205&group_id=161868 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: .Refresh().method crashes - Still crashes Initial Comment: I would like to continue my latest thread, which was closed. It can be found with this link: http://sourceforge.net/tracker/?func=detail&aid=2915404&group_id=161868&atid=821568 Thanks Jamcquay for your response, but your code didn't work. Have you any other suggestion how I shall solve this? Here is my current code with your code response. // Generate data samples each second void runTimeLogger_Tick(object sender, EventArgs e) { xAxis.Add(counter++); // Generate a data sample to the X-axis yAxis.Add((1.5 + Math.Sin((double)counter * 0.2))); // Generate a data sample to the Y-axis - This will create a sine-curve for the Y-axis this.Invoke(new MethodInvoker(delegate() { UpdateGraph(); })); } // Update the display of the Nplot-graph private void UpdateGraph() { Grid grid = new NPlot.Grid(); grid.VerticalGridType = Grid.GridType.Coarse; grid.HorizontalGridType = Grid.GridType.Coarse; grid.MajorGridPen = new Pen(Color.LightGray, 1.0f); plotGraph.Add(grid); StepPlot stepPlot = new StepPlot(); stepPlot.Pen = new Pen(Color.Red, 2); stepPlot.AbscissaData = xAxis; stepPlot.DataSource = yAxis; plotGraph.Add(stepPlot); plotGraph.Refresh(); // This row causes the program to crash!!! (Argument Out Of Range Exception) } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821568&aid=2916205&group_id=161868 |