OnDrawAxisLabel Event

TeeChart for ActiveX, COM and ASP
hugh
Newbie
Newbie
Posts: 33
Joined: Tue Jan 15, 2008 12:00 am

VB example??

Post by hugh » Mon Jun 23, 2008 3:21 pm

Narcis,

Any luck with finding somebody to draft me a VB6 example for my stripchart problem??

Thanks,

Hugh

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 Jun 25, 2008 8:06 am

Hi Hugh,

I think we already told you the options we thought you could apply to your chart. However, all of them couldn't be used in all circumstances due to some bugs mentioned in this thread. Is there anything else we can help with?

Thanks in advance.
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

hugh
Newbie
Newbie
Posts: 33
Joined: Tue Jan 15, 2008 12:00 am

Post by hugh » Wed Jun 25, 2008 1:18 pm

Narcis,

I just wanted to make sure that at the current time it's not possible to use TeeChart for my project - not even in VB6 (as I am using LabView for my project). I still like the options TeeChart offers (even they are not working at this time) and would like to use them in my current and future project(s). That's the reason I am so patiently trying to get it to work and spending tons of time helping to debug your companies product.

Please let me know if there is timeframe for at least major issues getting fixed so I can plan to go ahead with my project.

As you are in the businness of charting components - you know your competition but also my needs - I would apprecciate to propose me one or more competitive components I might be able to use for my project. I know that's not neccessarily in the interest if your company - BUT as I did choose Teechart as my first chgoice and I already paid for - and TeeChart cannot deliver at this time - but I need to get my project going I think it would be more than fair for you to do that.

Thanks,

Hugh

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 Jul 01, 2008 3:38 pm

Hi Hugh,

We have revisited the issues you reported and have some suggestions to achieve the kind of chart you request:

1. A bug has been found on tee file import wherein the Custom Axis events were not hooking correctly to the Chart. That has been resolved for the next maintence update allowing the reproduction of the following


Image


Code used for this example:

Code: Select all

Private Sub TChart1_OnDrawAxisLabel(ByVal Axis As Long, ByVal X As Long, ByVal Y As Long, LabelText As String)

    Y = Y + 20
    Dim aAxis As TeeChart.IAxis
    Dim vertical As Boolean

    Select Case Axis
    Case 4: Set aAxis = TChart1.Axis.Left
      vertical = True
    Case 2: Set aAxis = TChart1.Axis.Right
      vertical = True
    Case 0: Set aAxis = TChart1.Axis.Bottom
      vertical = False
    Case 1: Set aAxis = TChart1.Axis.Top
      vertical = False
    Case 3: Set aAxis = TChart1.Axis.Depth
      vertical = True
    Case Else:
      Set aAxis = TChart1.Axis.Custom(Axis - 6)
    End Select

    If Axis = 0 Then 'Bottom axis
      TChart1.Header.Text(0) = "here"
    End If

    With aAxis
      If Not vertical Then
        If X = .CalcXPosValue(.Minimum) Then 'first label
            LabelText = "   " + LabelText
            TChart1.Canvas.Font.Bold = True
        Else
            If X = .CalcXPosValue(.Maximum) Then 'last label
              LabelText = LabelText + "     "
              TChart1.Canvas.Font.Bold = True
            End If
        End If
      End If
    End With

End Sub


2. An alternative option to showing Axis labels where some crossover may be expected may be achieved via the following code segment to be run after importing the tee file that contains the custom axes.


Image

Code: Select all

    TChart1.Panel.MarginTop = 20
    TChart1.Panel.MarginBottom = 20
    
    Dim lastTopAxisRaised As Boolean
    Dim lastBottomAxisRaised As Boolean
    
    lastTopAxisRaised = False
    lastBottomAxisRaised = False
    
    For i = 0 To TChart1.Axis.CustomCount - 1
      If TChart1.Axis.Custom(i).Otherside Then
        If lastTopAxisRaised = False Then
          TChart1.Axis.Custom(i).TickLength = 18
          lastTopAxisRaised = True
        Else
          lastTopAxisRaised = False
        End If
      Else
        If lastBottomAxisRaised = False Then
          TChart1.Axis.Custom(i).TickLength = 18
          lastBottomAxisRaised = True
        Else
          lastBottomAxisRaised = False
        End If
      End If
    Next i

3. A third option contains a combination or the previous techniques:

Image


BTW: We expect to have next v8 ActiveX maintenance release at the end of this week.
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

hugh
Newbie
Newbie
Posts: 33
Joined: Tue Jan 15, 2008 12:00 am

Post by hugh » Tue Jul 01, 2008 3:51 pm

Narcis,

Thanks - I look forward to the next release. I would apprecciate to get informed when I can download - thanks again.

Hugh

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 Jul 01, 2008 3:58 pm

Hi Hugh,

Release will be announced on this forum. You may also be interested on subscribing to our RSS news feed for automatic announcements.

Thanks in advance.
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