Make pie chart build from left to right (Clockwise) ????

TeeChart for ActiveX, COM and ASP
Post Reply
Jeff
Newbie
Newbie
Posts: 22
Joined: Fri Nov 15, 2002 12:00 am
Location: Virginia, United States

Make pie chart build from left to right (Clockwise) ????

Post by Jeff » Wed Aug 10, 2005 9:05 pm

Hello,

I am trying to setup a pie chart for angles...0 to 360 going from the top of the pie chart rotating left. It appears the pie chart builds (counter-clockwise). Is there a setting that will change this?

Thanks!

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Aug 11, 2005 6:28 am

Hi,

there is no "Clockwise" property in the IPieSeries interface, so to plot your points anticlockwise you will have to do something like this:

Code: Select all

Private Sub Command1_Click()
With TChart1
    For i = 0 To .Series(0).Count - 1
        .Series(0).Delete 0
    Next i
    .Series(0).Add 1, "Point " & Chr(69), vbYellow
    .Series(0).Add 2, "Point " & Chr(68), vbCyan
    .Series(0).Add 3, "Point " & Chr(67), vbBlue
    .Series(0).Add 4, "Point " & Chr(66), vbGreen
    .Series(0).Add 5, "Point " & Chr(65), vbRed
    .Series(0).asPie.RotationAngle = 120
End With
End Sub

Private Sub Form_Load()
With TChart1
    .AddSeries scPie
    .Legend.Visible = False
    .Series(0).Add 5, "Point " & Chr(65), vbRed
    .Series(0).Add 4, "Point " & Chr(66), vbGreen
    .Series(0).Add 3, "Point " & Chr(67), vbBlue
    .Series(0).Add 2, "Point " & Chr(68), vbCyan
    .Series(0).Add 1, "Point " & Chr(69), vbYellow
    .Series(0).Color = vbRed
End With
End Sub

Post Reply