Assign Custom Axis

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
KevL
Newbie
Newbie
Posts: 17
Joined: Fri Mar 14, 2008 12:00 am

Assign Custom Axis

Post by KevL » Thu Apr 12, 2012 3:46 pm

I am trying to reassign Series Vertical axis from Left to Custom and back in code using C# and cannot seem to get the correct syntax. I have tried this:

Series1.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Left;
Series2.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Custom;

AND this:
Series1.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Left;
Series2.VertAxis = Steema.TeeChart.CustomAxes[0];

getting Errors saying:
Cannot implicitly convert type Steema.TeeChart.Axis to Steema.TeeChart.Styles.VerticalAxis

and
Steema.TeeChart.CustomAxes is a tpe which is not valid in the given context.

The custom axis and series are all set uo in the Chart Editor and work fine.

thanks

KevL
Newbie
Newbie
Posts: 17
Joined: Fri Mar 14, 2008 12:00 am

Re: Assign Custom Axis

Post by KevL » Thu Apr 12, 2012 4:06 pm

Finally figured it out...


Series1.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Left;
Series1.CustomVertAxis = tChart3.Axes.Custom[0];

tChart3.Axes.Left.Title.Caption = "A";
tChart3.Axes.Custom[0].Title.Caption = "B";

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Assign Custom Axis

Post by Sandra » Fri Apr 13, 2012 11:44 am

Hello KevL,

Always you use custom axes and you want assign these to series, you need use Series.CustomVertAxis or Series.CustomHorizAxis. I am glad you finally have found it and you can solve your problem.:D

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply