about TChart's Custom axes

TeeChart for ActiveX, COM and ASP
Post Reply
xghostzhao
Newbie
Newbie
Posts: 4
Joined: Sat Feb 09, 2002 5:00 am
Contact:

about TChart's Custom axes

Post by xghostzhao » Fri Apr 30, 2004 8:21 am

Developing eviroment: VB6+teechart5
I creat a teechart
Now i want to unbind three area ,everyone has itself axis,how should i difine it and i don't know how to add custom axis in the demo,when success for it ,i want to add a series at every area !
please tell me how to do it
thank you

xghostzhao
Newbie
Newbie
Posts: 4
Joined: Sat Feb 09, 2002 5:00 am
Contact:

Post by xghostzhao » Fri Apr 30, 2004 8:47 am

A memont ago, I study DEMO again,I know
Step 1: chart -> axis -> add custom axis
here you can difine your owner area
Step 2:
chart ->add series
here you can add series
Step 3: series ->general ->horizontal ,vertical

Now i want to know how can i effect this result with coding

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Fri Apr 30, 2004 9:28 am

Hi --
A memont ago, I study DEMO again,I know
Step 1: chart -> axis -> add custom axis
here you can difine your owner area
Step 2:
chart ->add series
here you can add series
Step 3: series ->general ->horizontal ,vertical

Now i want to know how can i effect this result with coding
Try:

Code: Select all

Private Sub Form_Load()
Dim CustomAxis As TeeChart.IAxis
Dim CustomAxisIndex As Integer
With TChart1
    CustomAxisIndex = .Axis.AddCustom(False)
    Set CustomAxis = .Axis.Custom(CustomAxisIndex)
    CustomAxis.AxisPen.Color = vbRed
    
    .AddSeries scBar
    .Series(0).FillSampleValues 20
    .Series(0).VerticalAxisCustom = CustomAxisIndex
    
    .Panel.MarginLeft = 10
End With
End Sub
[/quote]
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply