TeeChart ActiveX v5.0.7 possible memory leak ?

TeeChart for ActiveX, COM and ASP
Post Reply
Fosset
Newbie
Newbie
Posts: 2
Joined: Wed Dec 12, 2001 5:00 am
Location: Quebec

TeeChart ActiveX v5.0.7 possible memory leak ?

Post by Fosset » Wed Apr 14, 2004 4:12 pm

Hi,

I use the last ActiveX v 5.0.7 with database as input value for series.
All work fine to show values, etc....

But my application use a timer to refresh data from database. The only way found is to Refresh Adodc recordset and set again to series DataSource.

TableAccess.Refresh

Me.TChart1.Series(0).DataSource = TableAccess.Recordset
Me.TChart1.Series(0).ValueLists.Items(0).ValueSource = "Field1"
Me.TChart1.Series(0).ValueLists.Items(1).ValueSource = "Field2"
...

But this method add memory leak. How can i do ?

I have tryed many method, but the only working method is to set the recordset again.

thanks
Fosset

By the way... I use Delphi VCL version and to solve zoom bug in DblClick on graph I use Chart.Abort, but in VB how I can ?

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Thu Apr 15, 2004 9:20 am

Hi --
But this method add memory leak. How can i do ?

I have tryed many method, but the only working method is to set the recordset again.
OK. Two alternatives:
1) Try refreshing your ADO recordset and then calling ISeries.RefreshSeries.
2) Try refreshing your ADO recordset then call code similar to:

Code: Select all

  .Series(0).Clear
  Record.MoveFirst
  While Record.EOF = False
    S = Record.Fields(4).Value
    .Series(0).AddXY Record.Fields(3).Value, Record.Fields(2).Value, S, clTeeColor
    .Series(1).AddXY Record.Fields(3).Value, Record.Fields(0).Value * 10000, Record.Fields(1).Value, clTeeColor
    
    Record.MoveNext
  Wend
By the way... I use Delphi VCL version and to solve zoom bug in DblClick on graph I use Chart.Abort, but in VB how I can ?
You could try something similar to:

Code: Select all

Private Sub Form_Load()
With TChart1
    .AddSeries scLine
    .Series(0).FillSampleValues 20
End With
End Sub

Private Sub TChart1_OnDblClick()
MsgBox "Hi"
TChart1.Zoom.Enable = False
End Sub

Private Sub TChart1_OnMouseMove(ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
If TChart1.Zoom.Enable = False Then
    TChart1.Zoom.Enable = True
End If
End Sub
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Fosset
Newbie
Newbie
Posts: 2
Joined: Wed Dec 12, 2001 5:00 am
Location: Quebec

Post by Fosset » Fri Apr 16, 2004 12:55 pm

thanks, your help is great and useful, all is working now.

thanks again.

Post Reply