mhowes Posted September 24, 2007 Report Share Posted September 24, 2007 I have data that comes in real time. I have 8 sets of data and I get a 8 x/y pairs at a time, one x/y pair for each series I run, add the points, and nothing shows up in the chart. Here is the function which I add a point at a time chartFx.RealTime.BeginAddData(1, RealTimeAction.Append); chartFx.Data.Y[Channel, this.pnts] = Y; chartFx.Data.X[Channel, this.pnts] = X; chartFx.RealTime.EndAddData(true, true); pnts++; also, I don't know how many points I'm going to get and would rather not keep around a counter. Is there a way to truely append? I tried the folowing chartFx.RealTime.BeginAddData(1, RealTimeAction.Append); chartFx.Data.Y[Channel, 0] = Y; chartFx.Data.X[Channel, 0] = X; chartFx.RealTime.EndAddData(true, true); and nothing showed up as well any help appreciated thanks mike Quote Link to comment Share on other sites More sharing options...
Frank Posted September 26, 2007 Report Share Posted September 26, 2007 This is the correct code: chartFx.RealTime.BeginAddData(1, RealTimeAction.Append); chartFx.Data.Y[Channel, 0] = Y; chartFx.Data.X[Channel, 0] = X; chartFx.RealTime.EndAddData(true, true); I don't know why you are not getting anything to show. I tried here and it shows just fine. Please attach a project that reproduces the problem. Quote Link to comment Share on other sites More sharing options...
mhowes Posted September 26, 2007 Author Report Share Posted September 26, 2007 I am a good bit confused right now. I commented out all the RealTime specific code. So I removed the BufferSize setting, the RealTimeMode and the Begin and End AddData, leaving this for adding point chartFx.Data.X[Channel, this.pnts] = X; chartFx.Data.Y[Channel, this.pnts] = Y; the chart works fine in this case. but a couple general questions First, I have both the X and Y axis AutoScale set to true. Does this work with RealTime charts? Next, the only issue with doing it without RealTime (this is a guess on my part) is speed? The chart seems terribly slow. Even for the Form that the chart is one to initially display with no data points takes a good couple seconds. I'm replacing an old chart with ChartFX and the old chart seems a good 3X to 4X faster. This is before points even get added to the chart. I'm not doing an 3D, it's a line chart with no markers, and no point labels and lastly if the chart is working with the above to add the X/Y pair and AutoScale turned on, shouldn't all I have to do is add a buffersize (do I even have to do that?) add a Mode and wrap the the point adding in the Begin and End? Well I guess I can remove the pnts counter and replace it with 0 thanks mike Quote Link to comment Share on other sites More sharing options...
mhowes Posted September 27, 2007 Author Report Share Posted September 27, 2007 One more piece of info. For kicks when I was trying to figure out what is wrong with my realtime charts I turned on the datagrid and all the data is in the charts datagrid and looks fine Then I turned on point labels and I see that all the points are basically bunched up with the correct Y values but all the X values are essentially zero I'm really starting to get the feeling it has to do with the fact that I'm adding an X/Y pair using Data.X and Data.Y all the examples are something like this chart1.Data[0, 0] = -50 + r.NextDouble() * 100; chart1.Data[1, 0] = -50 + r.NextDouble() * 100; Quote Link to comment Share on other sites More sharing options...
Frank Posted October 2, 2007 Report Share Posted October 2, 2007 Using the latest service pack I am unable to reproduce what you are describing. Please make sure you are using the latest service pack and if the problem persists please attach a sample application that shows the problem. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.