Custom series pointers?

TeeChart for ActiveX, COM and ASP
Post Reply
Gary
Newbie
Newbie
Posts: 7
Joined: Tue Jul 22, 2003 4:00 am

Custom series pointers?

Post by Gary » Thu Jun 22, 2006 9:48 pm

I was wondering how I would go about applying a series with a custom image as a pointer that will display on both the graph and the legend.

I'm also currently running version 6 if that makes any difference.

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

Post by Narcís » Fri Jun 23, 2006 8:35 am

Hi Gary,

You can do something like this:

Code: Select all

Private Sub Form_Load()
    TChart1.AddSeries scPoint
    
    TChart1.Series(0).FillSampleValues 10
    TChart1.Series(0).asPoint.Pointer.Visible = False
End Sub

Private Sub TChart1_OnAfterDraw()

    For i = 0 To TChart1.Series(0).Count - 1
        X = TChart1.Series(0).CalcXPos(i) - 20
        Y = TChart1.Series(0).CalcYPos(i) - 20
        
        TChart1.Canvas.Draw X, Y, Picture1.Picture
    Next
    
End Sub
However, you should manually draw the symbol on the legend. TeeChart Pro v7 ActiveX already includes OnLegendDrawSymbolEvent specially designed for this purpose. An example of the event usage is also included in v7.

Also notice that TeeChart Pro v7 ActiveX includes a set of tools and instructions to automatically upgrade v6 applications to v7.
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

Gary
Newbie
Newbie
Posts: 7
Joined: Tue Jul 22, 2003 4:00 am

Post by Gary » Fri Jun 23, 2006 3:36 pm

Thanks Narcís. I'm not really sure how to implement this using Visual C++ instead of VB, though. I understand what's going on with the code, I just can't find enough information in the documentation or on the forums to get it up and running.

I found this post and it looks to be similar to what I'm working on
http://www.teechart.net/support/viewtop ... ght=images, but again I'm not really sure how to implement the ListImages.Add , , LoadPicture . . . in Visual C++.

Any help would be appreciated.

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 Jun 26, 2006 8:12 am

Hi Gary,

Have you seen the VC++ examples included with TeeChart Pro ActiveX? You'll find them at C:\Program Files\Steema Software\TeeChart Pro v7 ActiveX Control\Examples\Visual C++ (default english installation path).
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

Post Reply