Changing Axis Labels

TeeChart for ActiveX, COM and ASP
Post Reply
Keynetix
Newbie
Newbie
Posts: 27
Joined: Thu May 11, 2006 12:00 am
Contact:

Changing Axis Labels

Post by Keynetix » Tue May 23, 2006 4:13 pm

Hi,

Does anyone know if it is possible to achieve the following with the active X control.

http://www.teechart.net/support/viewtopic.php?t=2350

Thanks

James

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 May 24, 2006 7:30 am

Hi James,

You could try using available Wind Rose series or bar series and setting different label style for both vertical axes (left and right):

Code: Select all

Private Sub Form_Load()
    TChart1.Axis.Left.Labels.Style = talValue
    TChart1.Axis.Right.Labels.Style = talText
    
    With TChart1.Series(0)
        .asBar.BarStyle = bsArrow
        .VerticalAxis = aBothVertAxis
        .Add 90, "N", clTeeColor
        .Add 180, "W", clTeeColor
        .Add 270, "S", clTeeColor
        .Add 360, "E", clTeeColor
    End With
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

Keynetix
Newbie
Newbie
Posts: 27
Joined: Thu May 11, 2006 12:00 am
Contact:

Post by Keynetix » Wed May 24, 2006 8:34 am

Excellent. Works great.

I just used the following code to add the directions to the axis.

Chart1.Axis.Left.Labels.Add 0, "N"
Chart1.Axis.Left.Labels.Add 45, "NE"
Chart1.Axis.Left.Labels.Add 90, "E"
Chart1.Axis.Left.Labels.Add 135, "SE"
Chart1.Axis.Left.Labels.Add 180, "S"
Chart1.Axis.Left.Labels.Add 225, "SW"
Chart1.Axis.Left.Labels.Add 270, "W"
Chart1.Axis.Left.Labels.Add 315, "NW"
Chart1.Axis.Left.Labels.Add 360, "N"

Thanks again.

James

Post Reply