Question about Axis

TeeChart for ActiveX, COM and ASP
Post Reply
Richard
Newbie
Newbie
Posts: 40
Joined: Mon May 21, 2001 4:00 am

Question about Axis

Post by Richard » Wed Dec 15, 2004 9:50 am

My Code goes like this:

Chart.Legend.Visible=true
Chart.Height=400
Chart.Width=600
Chart.Panel.Gradient.Visible=true
Chart.Header.Text(0)="Stocks"
Chart.Header.Font.Bold=True
Chart.Axis.Bottom.Title.Caption="Product Name"
Chart.Axis.Bottom.Title.Font.Bold=True
Chart.Axis.Bottom.Labels.Angle=90
Chart.Axis.Left.Title.Font.Bold=True
Chart.Axis.Left.Title.Caption="Amount"

And as I have two series in the Chart, I tried to add these

Chart.Axis.Right.Title.Font.Bold=True
Chart.Axis.Right.Title.Caption="VALUE"

but it seems not function

What I mean is I wanna have two Vertical Rulers, how can i do this?

Thank you in advance

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

Post by Pep » Wed Dec 15, 2004 10:22 am

Hi Richard,

have you set the verticalAxis property to Both ? :
Chart.Series(0).VerticalAxis = aBothVertAxis

Richard
Newbie
Newbie
Posts: 40
Joined: Mon May 21, 2001 4:00 am

Post by Richard » Wed Dec 15, 2004 12:59 pm

Thank you Pep, but I dont actually know what to do...

I think I should make this clear.

What I hope to see is the chart has two rulers on both side. The chart has two series thus one ruler measure one series. Is this clear enough? I will try the way you told me.

Thanks again.

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

Post by Pep » Wed Dec 15, 2004 2:48 pm

Hi Richard,

to see the both rulers, you must asign which one will use each Series. As I do before, for example :
TChart1.Series(0).VerticalAxis = aLeftAxis
TChart1.Series(1).VerticalAxis = aRightAxis

But to see the scales you must enter before the data to the Series or specify the Min and Max for the Axis :

Code: Select all

Private Sub Form_Load()
With TChart1
    .Aspect.View3D = False
    .AddSeries scLine
    .AddSeries scLine
    .Series(0).VerticalAxis = aLeftAxis
    .Series(1).VerticalAxis = aRightAxis
    .Axis.Left.SetMinMax 0, 100
    .Axis.Left.Increment = 10
    .Axis.Right.SetMinMax 0, 100
    .Axis.Right.Increment = 10
End With
End Sub

Richard
Newbie
Newbie
Posts: 40
Joined: Mon May 21, 2001 4:00 am

Post by Richard » Wed Dec 15, 2004 3:19 pm

Got it, thank you, i will have a try

Post Reply