PolarSerie with ColorEachLine=True

TeeChart for ActiveX, COM and ASP
Post Reply
losvil
Newbie
Newbie
Posts: 3
Joined: Fri Nov 15, 2002 12:00 am
Location: Italy

PolarSerie with ColorEachLine=True

Post by losvil » Tue Dec 04, 2007 11:16 am

I'm using TeeChart 6 AX.
This version does not have ColorEachLine=True with PolarSerie.

Is this function supported in the last AX version ?

Regards
Gio

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

Post by Narcís » Tue Dec 04, 2007 2:26 pm

Hi Gio,

This property is specific to Line series. However, with Polar series you can do use ColorEachPoint:

Code: Select all

    TChart1.AddSeries scPolar
    TChart1.Series(0).FillSampleValues 5
    TChart1.Series(0).ColorEachPoint = True
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

losvil
Newbie
Newbie
Posts: 3
Joined: Fri Nov 15, 2002 12:00 am
Location: Italy

Post by losvil » Tue Dec 04, 2007 4:54 pm

Hi Narcis

I use polar serie to draw shaft profile measured with our roundness machine.
I use .Pointer.Style = psSmallDot to hide point and use lines to show the profile.
I will put in evidence some parts of profile using different line color.

Regards
Gio

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

Post by Narcís » Wed Dec 05, 2007 9:48 am

Hi Gio,

What you request is not supported at the moment but you can do something like this:

Code: Select all

Private Sub Form_Load()
    TeeCommander1.Chart = TChart1
    TChart1.AddSeries scPolar
    TChart1.Series(0).FillSampleValues 5
    TChart1.Series(0).ColorEachPoint = True
    
    TChart1.Series(0).asPolar.Pointer.Visible = False
End Sub

Private Sub TChart1_OnAfterDraw()
    For i = 1 To TChart1.Series(0).Count - 1
        TChart1.Canvas.Pen.Color = TChart1.Series(0).PointColor(i)
        TChart1.Canvas.MoveTo TChart1.Series(0).CalcXPos(i - 1), TChart1.Series(0).CalcYPos(i - 1)
        TChart1.Canvas.LineTo TChart1.Series(0).CalcXPos(i), TChart1.Series(0).CalcYPos(i)
    Next
End Sub
Notice that you can set pointer to not visible instead of using psSmallDot.
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

losvil
Newbie
Newbie
Posts: 3
Joined: Fri Nov 15, 2002 12:00 am
Location: Italy

Post by losvil » Wed Dec 05, 2007 12:59 pm

Hi Narcis

This could be a good solution.
Many thanks for your quick support.

Regards
Gio

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

Post by Narcís » Wed Dec 05, 2007 1:15 pm

Hi Gio,

You're welcome. I'm glad to hear that fits your needs.
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