Drawing with c#
-
I have a question I dont know if anyone here is familiar with the zedgraph API but its pretty cool. http://zedgraph.sourceforge.net/[^] I am having issues here tho. I want to create a live moving chart that updates in front of your eyes every single second. Stock Market Chart -- candlestick, bar chart, etc. When i start my program i draw the graph but i do not populate it with data yet. I then made a button that when it is pressed it will get the data feed and start populating the graph chart. Here is the problem!!!! When the data comes in my app just freezes!!! (in the background it's just constantly reading in the data not drawing or updated the chart at all) So then i said okay let me just use a small amount of data. When i clicked the button with a small amount of data it did absolutely nothing. But when i minimized my application down to the windows taskbar or toolbar (or whatever its called) and then maximized it (brought it back up and to focus) The chart was populated and everything looked great. I guess my question is why did i have to minimize it and then maximize it to see the results of the drawing of bars on the graph. And why cant i see my data update and draw right in front of my eyes!!! Thanks in advance to anyone who can help me....
-
I have a question I dont know if anyone here is familiar with the zedgraph API but its pretty cool. http://zedgraph.sourceforge.net/[^] I am having issues here tho. I want to create a live moving chart that updates in front of your eyes every single second. Stock Market Chart -- candlestick, bar chart, etc. When i start my program i draw the graph but i do not populate it with data yet. I then made a button that when it is pressed it will get the data feed and start populating the graph chart. Here is the problem!!!! When the data comes in my app just freezes!!! (in the background it's just constantly reading in the data not drawing or updated the chart at all) So then i said okay let me just use a small amount of data. When i clicked the button with a small amount of data it did absolutely nothing. But when i minimized my application down to the windows taskbar or toolbar (or whatever its called) and then maximized it (brought it back up and to focus) The chart was populated and everything looked great. I guess my question is why did i have to minimize it and then maximize it to see the results of the drawing of bars on the graph. And why cant i see my data update and draw right in front of my eyes!!! Thanks in advance to anyone who can help me....
-
How and when are you painting?, show your method. Are you calling your paint method on each pass? Are you double buffering your graphics? Are you looping through your data first, then painting or are you painting on every loop of data?
I believe you need to refresh your form/chart every time you want to update the chart. You said every second. I would try a timer and the tick event, refresh your form. jude
-
I believe you need to refresh your form/chart every time you want to update the chart. You said every second. I would try a timer and the tick event, refresh your form. jude
Refreshing the form was exactly what i needed to do. Thanks alot.
-
Refreshing the form was exactly what i needed to do. Thanks alot.
Happy I could help! Happy Coding! jude