Error on addseries

TeeChart for ActiveX, COM and ASP
Post Reply
Kasper
Newbie
Newbie
Posts: 12
Joined: Wed Jul 09, 2008 12:00 am

Error on addseries

Post by Kasper » Mon Feb 09, 2009 1:47 pm

Hi

After I have created some series and groups in a teechart, I clear the chart, and add them once again. When I loop the AddSeries first time it went well, but second time I got an error:

-2147418113, "Invalid pointer operation"

I'm using TeeChart Pro Activex Control v8
v8.0.0.4

It seemse that my series count increment by one each time, even when I got the error.
Hope any one can give me clue, what can goes wrong, since I do not under stand it !

Regards
Kasper

Code: Select all

Set myChart = TChart1

 For n = 0 To 2
        seriesCount = myChart.seriesCount
        myChart.AddSeries scLine
        myChart.Series(seriesCount).asLine.Pointer.Visible = True
        myChart.Series(seriesCount).asLine.Pointer.HorizontalSize = 2
        myChart.Series(seriesCount).asLine.Pointer.VerticalSize = 2
        
        myChart.Series(seriesCount).asLine.LinePen.width = 1
        myChart.Series(seriesCount).Clear
        myChart.Series(seriesCount).Active = True
        myChart.Series(seriesCount).XValues.DateTime = True
        
        myChart.Series(seriesCount).Title = "some title"
    
        
        If (n = 0) Then
            ' add graph/serie to the group to be shown in list box
            myChart.SeriesList.Groups.Items(0).Add seriesCount
        else
          myChart.Series(seriesCount).color = vbRed
          myChart.Series(seriesCount).Active = False
          myChart.Series(seriesCount).asLine.Stairs = True
        End If
      
        If n  = 2 Then
            groupCount = myChart.SeriesList.Groups.count 
            myChart.SeriesList.AddGroup groupCount
            
            'myChart.Series(seriesCount - 1).Title = "abc"
            'myChart.Series(seriesCount).Title = "abc"
        End If
      
Next

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Feb 09, 2009 4:23 pm

Hi Kasper,

I'm not able to reproduce the issue here using v8.0.0.5. Could you please check if this solves the problem for you? If it doesn't could you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Kasper
Newbie
Newbie
Posts: 12
Joined: Wed Jul 09, 2008 12:00 am

Post by Kasper » Thu Apr 02, 2009 1:29 pm

Sorry it was my mistake, when manipulating series data... I have not seen the problem since I have fixed this other bug.

Post Reply