PROBLEMS WITH TChart Pro V8.0

TeeChart for ActiveX, COM and ASP
Post Reply
GIT
Newbie
Newbie
Posts: 4
Joined: Mon Aug 20, 2007 12:00 am
Contact:

PROBLEMS WITH TChart Pro V8.0

Post by GIT » Tue Sep 04, 2007 11:05 am

1. 3 areas for drawing chart and they can be zoomed independently.
2. Each chart will be drawn many series on it.
3. X co-ordinate of 2 series can be the same or can be different.
4. The X-range of 3 charts must be the same.
5. All charts must have X-Y grid.
6. Only one chart has Visible Bottom Axis.


PROBLEMS WITH TChart Pro V8.0
I try to make a program that using TChart Pro V8.0 to support all above requirements but there are some problems happen that I can’t support:

1. If only one chart has Visible Bottom Axis, other charts will not have grid.
2. The left axes of TRIGGER chart and ENGSTAT chart (Figure 9) can’t be aligned. The position of axis depends on the length of Axis title (TRIGGER, and ENGSTAT). It can’t be fixed in the same line.

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 Sep 04, 2007 2:11 pm

Hi GIT,

Please find below the answers to your questions:

1. You can make axes not visible like this:

Code: Select all

    TChart1.Axis.Bottom.AxisPen.Visible = False
    TChart1.Axis.Bottom.Ticks.Visible = False
    TChart1.Axis.Bottom.MinorTicks.Visible = False
For the labels you can set them to a blank space using the OnGetAxisLabel event:

Private Sub TChart1_OnGetAxisLabel(ByVal Axis As Long, ByVal SeriesIndex As Long, ByVal ValueIndex As Long, LabelText As String)
If Axis = 3 Then 'Bottom axis
LabelText = " "
End If
End Sub


2. Why don't you try using TChart1.Axis.Bottom.Labels.Size. The AxisLabels' Size property is 0 by default. Therefore the space between the Axis and the Chart will be automatically calculated based on the Axis Labels Width and Height. Example [Visual Basic]:

You can set this property both at design or runtime:

Code: Select all

TChart1.Axis.Right.Labels.Size = 50 
(50 pixels separation)

Using this may help you align the charts as axes position depend on labels size too.
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

GIT
Newbie
Newbie
Posts: 4
Joined: Mon Aug 20, 2007 12:00 am
Contact:

thanks a lot.

Post by GIT » Wed Sep 05, 2007 4:51 am

I modified source code as your answer,
and it works in good condition.

thank you a lot!
Best regards.

Post Reply