CalsepDK Posted July 16, 2007 Report Share Posted July 16, 2007 Hi I have created a derived chart control. This control is used to display data both real time and static. The static performance is top notch and so is real time updating as long as I have less than approx. 1000 points after which updating happens slower and slower until comming to a complete stop with the entire UI freezing. As soon as the simulation (which is sending the output points to the chart) has finished, the chart is updated and shows the entire output correctly (meaning it has received the remaining output points). The simulation is running on a seperate thread from the UI. The way I add points to the plot in real time is using the standard API (NoOfNewPoints is typically around 5 since I want the chart to update often). If (Me.Data.Points < .PlotList.Count) Then Me.Data.Points = .PlotList.Count + 10 End If For j As Integer = 0 To NoOfNewPoints - 1 Me.Data.X(index, PointCount + j) = .XCoordinateValue(PointCount + j) Me.Data.Y(index, PointCount + j) = .YCoordinateValue(PointCount + j) Next I don't know how many output points will be generated by the simulation, so I expand it a little by little (it makes no real difference how much I add at a time). I have tried looking into the real time API, but I can't get it to work properly. I tried the following: Me.RealTime.BeginAddData(NoOfNewPoints, RealTimeAction.Append) For j As Integer = 0 To NoOfNewPoints - 1 Me.Data.X(index, 0) = .XCoordinateValue(PointCount + j) Me.Data.Y(index, 0) = .YCoordinateValue(PointCount + j) Next Me.RealTime.EndAddData(False, False) But this never updates the chart with anything. I have tried setting the BufferSize, but it doesn't change anything (and I wouldn't know the exact number anyhow). I have tried changing AntiAliasing, DoubleBuffering, AggressiveAllocation, marker size and shape, but it really doesn't change anything. The problem seems to become worse (meaning the behaviour will kick in sooner than 1000) if more than one chart is updating in real time. Any suggestions is appreciated. Is the real time API the way to go if I want this kind of behaviour and if so, how in # Quote Link to comment Share on other sites More sharing options...
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.