enclosing 2 files t1.tee & t2.tee
t2.tee is the base file in which 4 series are created of each bar type #
when i executed the below code i am getting t1 file .. ( which is nothing 2
graph types shown with 2 different axis but only axis is shown ,right axis
is not been able to set ... )
the same code worked fine with earlier version of the teechart . now i am
using version 7.1.1
posted the tee files
how can we set the right axis
below is the code segement ;
Dim j As Integer
j = TChart1.SeriesCount / 2
For i = 0 To j - 1
TChart1.ChangeSeriesType i, scBar
TChart1.Series(i).VerticalAxis = aLeftAxis
Next i
For i = j To TChart1.SeriesCount - 1
TChart1.ChangeSeriesType i, scLine
TChart1.Series(i).asLine.LinePen.Width = 3
TChart1.Series(i).VerticalAxis = aRightAxis
Next i
TChart1.Axis.Left.Automatic = True
TChart1.Axis.Right.Automatic = True
not able to set right axis using the following code
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Aravind,
For some reason all right axis properties are set to not visible so I had to modify your code to something like this:
If it's done unexpectedly then please try to arrange a simple project that causes this (we need to see how the full chart is created) and post it in the attachments newsgroup.
Thanks in advance.
For some reason all right axis properties are set to not visible so I had to modify your code to something like this:
Code: Select all
Private Sub Form_Load()
Me.TeeCommander1.Chart = Me.TChart1
TChart1.Import.LoadFromFile "e:\temp\t2.tee"
Dim j As Integer
j = TChart1.SeriesCount / 2
For i = 0 To j - 1
TChart1.ChangeSeriesType i, scBar
TChart1.Series(i).VerticalAxis = aLeftAxis
Next i
For i = j To TChart1.SeriesCount - 1
TChart1.ChangeSeriesType i, scLine
TChart1.Series(i).asLine.LinePen.Width = 3
TChart1.Series(i).VerticalAxis = aRightAxis
Next i
TChart1.Axis.Left.Automatic = True
TChart1.Axis.Right.Automatic = True
With TChart1.Axis.Right
.Visible = True
.AxisPen.Visible = True
.Ticks.Visible = True
.Labels.Visible = True
.Labels.Font.Size = 8
End With
End Sub
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 |
Instructions - How to post in this forum |