Series Marks Style displaying difficulties

TeeChart for ActiveX, COM and ASP
Post Reply
Shurik
Newbie
Newbie
Posts: 4
Joined: Thu Oct 31, 2002 5:00 am

Series Marks Style displaying difficulties

Post by Shurik » Tue Feb 08, 2005 3:21 pm

Hello,

I'm running 5.03 version and trying to display the results of a crosstab
table using VB6

Code: Select all

With TChart2
      
      'hide chart
      ' .Visible = False
      'clean up
       .RemoveAllSeries
       
        For i = 0 To rs.Fields.Count - 3
        'add a ne wseries        
        .AddSeries scPoint
        .Series(i).DataSource = rs
        .Series(i).YValues.ValueSource = rs.Fields(i + 1).Name
        .Series(i).VerticalAxis = aLeftAxis
        'labels
        .Series(i).LabelsSource = rs.Fields(0).Name
        ' legend title
        .Series(i).Title = rs.Fields(i + 1).Name
        .Series(i).Marks.Style = smsLegend             '<------------------
        .Series(i).Marks.Visible = True 'False
       Next
       
      .Visible = True
   
   End With
The legend does display the Series names which I'd like to be dispayed on the chart but what happens instead is that I only get XY values and not the legend "content".

Am I missing something here?
Thanks in advance for your input

Shurik.

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 Feb 11, 2005 3:50 pm

Hello Shurik,

I don't understand very well what are you trying to do, but if you want to change the series marks text you can implement it in the OnGetSeriesMark event as shown below. In that case the series marks are changed to the series name.

Code: Select all

Private Sub TChart1_OnGetSeriesMark(ByVal SeriesIndex As Long, ByVal ValueIndex As Long, MarkText As String)
    MarkText = TChart1.Series(SeriesIndex).Name
End Sub
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

Shurik
Newbie
Newbie
Posts: 4
Joined: Thu Oct 31, 2002 5:00 am

Post by Shurik » Fri Feb 11, 2005 4:20 pm

Hi Narcís,

That (MarkText = TChart1.Series(SeriesIndex).Title )
did the trick .

Thanks a lot

Shurik.

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 Feb 11, 2005 5:06 pm

Hi Shurik,

You're welcome! I'm glad to hear this helped.
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