Page 1 of 1

TeeChartAX V7 bugs(CustomVertAxis) ?

Posted: Sun Sep 19, 2004 6:32 am
by 9523566
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

Posted: Mon Sep 20, 2004 3:16 pm
by Pep
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