TeeChartAX V7 bugs(CustomVertAxis) ?

TeeChart for ActiveX, COM and ASP
Post Reply
M.Takeda
Newbie
Newbie
Posts: 18
Joined: Tue Aug 17, 2004 4:00 am

TeeChartAX V7 bugs(CustomVertAxis) ?

Post by M.Takeda » Sun Sep 19, 2004 6:32 am

Follwings is the code in VB.NET
with TeeChartX V6 this code work fine but with V7,only CustomAAAxis(0)
does not take coding position(always 0),color and minmax.
Please check if V7 bug and show me how to resolve it.
(for example)
Public CustomAAAxis(7) As Integer
Public MyColor(15) As Color

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
AxTChart1.Panels.MargineLeft=22
AxTChart1.Panels.MarginRight=22
ColorSet()
Make_AnalogSeries()
Make_CustomAAxis()
end sub

'--------------------
' User Color
'--------------------
private Sub ColorSet()
MyColor(0) = Color.Red
MyColor(1) = Color.Green
MyColor(2) = Color.Yellow
MyColor(3) = Color.Blue
MyColor(4) = Color.Magenta
MyColor(5) = Color.Cyan
MyColor(6) = Color.Teal
MyColor(7) = Color.Black
End Sub

'----------------------------------------
' Make Custom Vertical Axis for Analog
'----------------------------------------
Private Sub Make_CustomAAxis()
Dim i As Integer

For i = 0 To UBound(CustomAAAxis)
CustomAAAxis(i) = AxTChart1.Axis.AddCustom(False)

With AxTChart1.Axis.Custom(i) 'Position
If i <= 3 Then
.PositionPercent = (3 - i) * (-10)
.Otherside = False
Else
.PositionPercent = (i - 4) * (-10)
.Otherside = True
End If

If i = 0 Then 'GridPen Show CustomAAxis(0) only
.GridPen.Visible = True
Else
.GridPen.Visible = False
End If
.AxisPen.Color = Convert.ToUInt32(ColorTranslator.
ToOle(MyColor(i)))
.Title.Caption = ""
.Title.Angle = 90
.Automatic = False
.SetMinMax(AxisMinValue, AxisMaxValue)
End With
AxTChart1.Series(i).VerticalAxisCustom = CustomAAAxis(i)
Next i
End Sub

'-------------------------------------------
' Make Analog Series
'-------------------------------------------
Private Sub Make_AnlogSeries()
Dim i As Integer
For i = 0 To UBound(CustomAAAxis)
AxTChart1.AddSeries(TeeChart.ESeriesClass.scLine)
With AxTChart1.Series(i)
.HorizontalAxis = TeeChart.EHorizontalAxis.aBottomAxis
.XValues.DateTime = True
.asLine.LinePen.Width = 1
.asLine.ColorEachLine = False
.Color = Convert.ToUInt32(ColorTranslator.ToOle(MyColor(i)))
.Marks.Clip = True
End With
Next
End Sub

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

Post by Pep » Mon Sep 20, 2004 3:16 pm

Hi Takeda,

changing the following line should work fine :

With AxTChart1.Axis.Custom(i + 1) 'Position
If i <= 3 Then
.PositionPercent = (3 - i) * (-10)
.Otherside = False
Else
.PositionPercent = (i - 4) * (-10)
.Otherside = True
End If

Post Reply