Page 1 of 1

Question about Axis

Posted: Wed Dec 15, 2004 9:50 am
by 6919081
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

Posted: Wed Dec 15, 2004 10:22 am
by Pep
Hi Richard,

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

Posted: Wed Dec 15, 2004 12:59 pm
by 6919081
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.

Posted: Wed Dec 15, 2004 2:48 pm
by Pep
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

Posted: Wed Dec 15, 2004 3:19 pm
by 6919081
Got it, thank you, i will have a try