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
Assign Custom Axis
Re: Assign Custom Axis
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";
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";
Re: Assign Custom Axis
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.
Thanks,
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.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |