User (Legacy) Posted January 27, 2006 Report Share Posted January 27, 2006 Hi, Does anyone have suggestions or words of caution about plotting real time data on a Chart FX chart, with a DateTime X-Axis? I am using Chart FX for VS .NET 2005 for Winforms, and no other Chart FX add-ons. I will be loading a few hundred points of data at first, and will be using Open-High-Low-Close sometimes, and single series and multiple series of line graphs other times. I would like to keep plotting points at the end of the chart in real time, which would include updating 30-minute bars with real time data, adding new 30-minute bars using realtime data, and also changing some horizontal lines and Chart FX Annotations on the chart, like "Last Data was 45.0, collected at 5:45 PM". My Chart FX Winforms chart is bound to an ADO .NET DataTable. 1. If I simply add rows of data to the DataTable, will the data automatically just appear on the chart? 2. Can I access certain points using code, adjust their High, Low, or Close values, and make only that point refresh (Refreshing my entire Chart FX chart takes too long because I sometimes plot so many points)? 3. Can I add points to the end of a graph and have the graph refresh? 4. Does anyone have any sample code that I could use to add and modify points at the end of the graph? 5. Is anything I am trying to do NOT possible without a full, slow, Chart FX chart refresh of hundreds of points? Thank you very much in advance. Brook Link to comment Share on other sites More sharing options...
Software FX Posted January 28, 2006 Report Share Posted January 28, 2006 > 1. If I simply add rows of data to the DataTable, will the data > automatically just appear on the chart? Yes. Whenever the dataset changes, if the chart is bound to it will refresh. The whole DataSet will be plotted. > 2. Can I access certain points using code, adjust their High, Low, or > Close values, and make only that point refresh (Refreshing my entire Chart > FX chart takes too long because I sometimes plot so many points)? There is a real-Time API, this API is to be used IN PLACE of data binding and it allows you to keep a circular buffer of points and add point to the chart at any time. This method offers a much faster refresh rate but it has limitations on what things can be doe to the chart each time, you are limited to just add points to the chart, changing constant lines or annotation objects requires a repaint of the full chart area. A sample using the real-Time API is provided in the Resource Center. In many cases refreshing the whole chart every time is not an issue. In cases where there is lots of points (e.g. 10,000) you may start experiencing performance problems and the Real-Time API will make a big difference. Other API´s such as data compression, anti-aliasing and double-buffering will also help you tune in the performance of your charts. > 3. Can I add points to the end of a graph and have the graph refresh? Yes. > 4. Does anyone have any sample code that I could use to add and modify > points at the end of the graph? There is a real-time sample included in the Resource Center. > 5. Is anything I am trying to do NOT possible without a full, slow, Chart > FX chart refresh of hundreds of points? Changing the scale of the chart, a constant line, annotation objects, etc. In general anything outside the Real-Time API will cause a full refresh. As I pointed out earlier this may not be an issue if the chart is properly tuned for better performance. -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
User (Legacy) Posted February 10, 2006 Author Report Share Posted February 10, 2006 Hi Francisco, Thank you very much for your detailed response. I tried to look at the real time sample in the ChartFX for VS .NET 2005 Resource Center, but when I clicked on the sample located at "Chart FX Programmer´s Guide --> Advanced Features --> Sample Applications --> Real-Time Charts", I got a dialog box that said the following: "C:\Program Files\Chart FX for Visual Studio 2005\Help and Samples\Sample Applications\Windows Forms\RealTimeCharts\RealTimeCharts.sln application not found. Please reinstall the software or contact Software FX technical support at support@softwarefx.com" I reinstalled ChartFX for VS .NET 2005 to try to repair the Resource Center, but had the same problem. Most of the Sample VS .NET 2005 solutions work for me. Those that do work for me have folders in the C:\Program Files\Chart FX for Visual Studio 2005\Help and Samples\Sample Applications\Windows Forms directory. The real-time sample doesn´t have a directory. Am I looking at the wrong sample? If somebody reading this has the sample on their computer, could you please copy and paste the C# version of it (or any .NET code if no C# exists) in a reply to this post. I need to implement a real-time system asap, hopefully Monday. Thanks a lot in advance! Brook Hunter "Software FX Support" <noreply@softwarefx.com> wrote in message news:sTgLj5DJGHA.472@webserver3.softwarefx.com... >> 1. If I simply add rows of data to the DataTable, will the data >> automatically just appear on the chart? > > Yes. Whenever the dataset changes, if the chart is bound to it will > refresh. The whole DataSet will be plotted. > >> 2. Can I access certain points using code, adjust their High, Low, or >> Close values, and make only that point refresh (Refreshing my entire >> Chart FX chart takes too long because I sometimes plot so many points)? > > There is a real-Time API, this API is to be used IN PLACE of data binding > and it allows you to keep a circular buffer of points and add point to the > chart at any time. This method offers a much faster refresh rate but it > has limitations on what things can be doe to the chart each time, you are > limited to just add points to the chart, changing constant lines or > annotation objects requires a repaint of the full chart area. A sample > using the real-Time API is provided in the Resource Center. > > In many cases refreshing the whole chart every time is not an issue. In > cases where there is lots of points (e.g. 10,000) you may start > experiencing performance problems and the Real-Time API will make a big > difference. Other API´s such as data compression, anti-aliasing and > double-buffering will also help you tune in the performance of your > charts. > >> 3. Can I add points to the end of a graph and have the graph refresh? > > Yes. > >> 4. Does anyone have any sample code that I could use to add and modify >> points at the end of the graph? > > There is a real-time sample included in the Resource Center. > >> 5. Is anything I am trying to do NOT possible without a full, slow, Chart >> FX chart refresh of hundreds of points? > > Changing the scale of the chart, a constant line, annotation objects, etc. > In general anything outside the Real-Time API will cause a full refresh. > As I pointed out earlier this may not be an issue if the chart is properly > tuned for better performance. > > -- > Francisco Padron > www.chartfx.com > > > Link to comment Share on other sites More sharing options...
Software FX Posted February 13, 2006 Report Share Posted February 13, 2006 Did you install the Windows Form components ? I can open it in my computer under: C;\Program Files\Chart FX Install Folder\Help and Samples\Sample Applications\Windows Forms\RealTimeCharts\RealTimeCharts.sln -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
User (Legacy) Posted February 13, 2006 Author Report Share Posted February 13, 2006 Hi Francisco, I installed my Chart FX using a file called "ChartFXVS2005WinForms.exe" that I personally downloaded. I even tried reinstalling Chart FX from the file mentioned above, and the folder with the sample still didn´t show up. I have attached a screenshot of the ChartFX 2005 Install directory that shows that I have lots of the sample apps, but am missing the Realtime folder and app. Please help. Even if it is a mystery why my install didn´t work, can you or somebody at Chart FX please post this sample code or email it to me at brook.hunter@superfund.com? I need this sample as soon as humanly possible (today hopefully), so I can show a very important person on Thursday. If all goes well, I will get the go ahead to purchase the Chart FX Financial Module for VS .NET 2005 as soon as it is released. Thank you very much in advance for the sample code, Brook Hunter "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:O4Ue$wKMGHA.1888@webserver3.softwarefx.com... > Did you install the Windows Form components ? > > I can open it in my computer under: > > C;\Program Files\Chart FX Install Folder\Help and Samples\Sample > Applications\Windows Forms\RealTimeCharts\RealTimeCharts.sln > > -- > Francisco Padron > www.chartfx.com > > Link to comment Share on other sites More sharing options...
Software FX Posted February 13, 2006 Report Share Posted February 13, 2006 I see. Looks that they are missing from that installer, I was using the full install (Win and Web). Please contact Software FX support for a new installer and/or missing files. -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
User (Legacy) Posted February 13, 2006 Author Report Share Posted February 13, 2006 Hi Francisco, Thank you for finding out about the installer with the missing sample code. I will email support@softwarefx.com for a new installer, but in the meantime, I have a very tight deadline. Could you please just copy and paste the C# version of the Real-Time API sample into a reply to this post? I need the sample code very bad, today if humanly possible. It is urgent. Thank you very much, Brook Hunter "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:Asr%236TOMGHA.1888@webserver3.softwarefx.com... >I see. Looks that they are missing from that installer, I was using the >full install (Win and Web). > > Please contact Software FX support for a new installer and/or missing > files. > > -- > Francisco Padron > www.chartfx.com > Link to comment Share on other sites More sharing options...
Software FX Posted February 13, 2006 Report Share Posted February 13, 2006 This is what I have. I'm not sure if this is the latest version. -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
User (Legacy) Posted February 14, 2006 Author Report Share Posted February 14, 2006 Hi Francisco, Thanks for the sample code showing how to plot data using the Chart FX Real-Time API. Now I have a question about plotting points in real time without DataBinding and even without using the Real-Time API: Today I was able to plot data in real time in the following way: 1. Get a DataTable of 1000 rows full of data to plot. 2. Do not databind the chart. Plot the 1st 500 points of data one point at a time using a for loop and the normal Chart FX API (not real-time). 3. Press a "Plot Next Point" button to plot the next tick (1st button click plots 501st DataRow´s data, 2nd button click plots the 502nd DataRow´s data, etc.), OR press a "Plot All 500 Remaining Points" button to plot the remaining data. My question: The above procedure works just fine, but it seems slow. For instance, the foor loop that prints the first 500 data points finishes a LOT faster than the "Plot All 500 Remaining Points" button can print the remaining data points. Why might the chart plot the last 500 points much more slowly than the first 500 points? Could it be because the Chart is refreshing or re-databinding (even though I never databound the chart) for every one of the 500 points I added with the second button click? Is there a property of the chart I can use that tells it to allow me to add the remaining 500 points using the normal Chart FX API without not to re-refresh or re-databind the entire chart for each of the 500 points? I want to be able to use a for loop to add the remaining 500 points to chart.Data.X[series, point] and chart.Data.Y[series, point], and then, after adding all 500 points to these collections, write code to tell the chart to plot the 500 data points all at once. Is it even possible to plot points relatively quickly using the method I described above, or do I really need to use the Real-Time API? Is the method I described above always going to be really slow? Thanks a lot for all your help so far, Brook Hunter "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:SZEpV7OMGHA.2236@webserver3.softwarefx.com... > This is what I have. I´m not sure if this is the latest version. > > -- > Francisco Padron > www.chartfx.com > > Link to comment Share on other sites More sharing options...
Software FX Posted February 20, 2006 Report Share Posted February 20, 2006 I would need to see the code in order to tell why the difference. If you never assigned a DataSource no databinding will ever occur. Please post a sample program that reproduces this behavior. -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.