Ilya Posted August 23, 2007 Report Share Posted August 23, 2007 Hello everyone, I can successfully run the real time sample that comes with the chartfx and the chart updates with no problem in real time. However, when I create my own project, I am simply not able to get the chart to update in real time using the same or modified code. If I maximize and minimize the application or lets say show/hide the toolbar, the chart gets redrawn and I could see the values but nothing gets drawn unless I perform the steps mentioned. I would greatly appreciate if someone could point out what I could be doing wrong because this is starting to get frustrating (Note: I am able to load a chart with data that is not streaming with no problems). I have included the test project that I am playing around with as an attachment. Thank You. Quote Link to comment Share on other sites More sharing options...
Frank Posted August 29, 2007 Report Share Posted August 29, 2007 Add the following code to the end of your Timer_Tick code: chart1.Data.CommitChanges(); Because you are using the Financial Extension, this line is necessary to notify the extension that new data is available for processing. Quote Link to comment Share on other sites More sharing options...
Ilya Posted September 4, 2007 Author Report Share Posted September 4, 2007 Frank, thank you for your reply. After adding the line you mentioned, the chart does begin to repaint correctly. I have however noticed that if I add several studies to the chart, after maybe a minute or so whenever the CommitChanges is called, it freezes on the call. Sometimes it takes several minutes for it to complete and once it completes, the chart resumes updating normally for a short period of time before repeating the behavior. Is there anythign that could be causing this call to execute for so long??? One thing that I believe I have noticed is that this happens when the IsBufferFull is true. What I dont understand is how this could be since I only have maybe 25 points on my chart and the buffersize as well as the realtimebuffer size is 1000? If I break into the debugger and do chart2.Data[0,700], I get a value of 1.0E+108 which means there is no data at that point yet. Does the property IsBufferFull take something else into account besides how many points were written into the buffer? Thank You. 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.