Page 1 of 1

PolarSerie with ColorEachLine=True

Posted: Tue Dec 04, 2007 11:16 am
by 9079358
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

Posted: Tue Dec 04, 2007 2:26 pm
by narcis
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

Posted: Tue Dec 04, 2007 4:54 pm
by 9079358
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

Posted: Wed Dec 05, 2007 9:48 am
by narcis
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.

Posted: Wed Dec 05, 2007 12:59 pm
by 9079358
Hi Narcis

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

Regards
Gio

Posted: Wed Dec 05, 2007 1:15 pm
by narcis
Hi Gio,

You're welcome. I'm glad to hear that fits your needs.