Hello,
while I was trying to reproduce another problem I'm having with TeeChart, I stumbled across this one. The example has been tested with version 3.5.3700.30575. It should throw the exception a few seconds after start-up. When setting AutoRepaint to false I had to resize the window to get the same behavior.
Am I doing something wrong?
EDIT: I also tried to invoke the code in the timer event handler and using .Refresh instead of .Draw but then it starts hanging after resizing the chart for some time.
Chart throws an InvalidOperationException
Chart throws an InvalidOperationException
- Attachments
-
- TeeChartExample.zip
- (9.29 KiB) Downloaded 305 times
Re: Chart throws an InvalidOperationException
Hello ctush,
Please, check if next code works as you want in your application. If problem still appears, please could you explain which steps we have followed for reproduce your problem here?
Please, check if next code works as you want in your application. If problem still appears, please could you explain which steps we have followed for reproduce your problem here?
Code: Select all
void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
lock(this.chartLock)
{
for(int i = 0; i < this.lines.Length; i++)
{
this.lines[i].Add(DateTime.Now, this.random.NextDouble() * 200.0);
}
}
this.tChart.Invalidate();
}
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Chart throws an InvalidOperationException
Thanks, that did it!