Two different Axis on the right side of the Chart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
ICS
Newbie
Newbie
Posts: 10
Joined: Wed Sep 22, 2010 12:00 am

Two different Axis on the right side of the Chart

Post by ICS » Tue Aug 23, 2011 8:55 am

Hello
I searched in the demo project, but coudn't find how to show two different axis on the right side of the tChart.

I have three series on my chart. One (type Bar) has as vertical Axis the tChart.Axes.Left, and the otherones (type Line) have as vertical Axis the tChart.Axis.Right.
But the two series on tChart.Axis.Right don't have the same range.
How can I add an additional Axis to the tChart (on the right side) with a new range and add one series to this new axis?
To show the two different values (legend) of the two axises, one could show the values on the left of the Axis (inside the chart) and the other on the right of the chart (outside the chart). Both could also be shown outside the tChart (on the right side of the axis)

I'm very thanksfull for a solution.

Eric

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

Re: Two different Axis on the right side of the Chart

Post by Sandra » Wed Aug 24, 2011 12:19 pm

Hello Eric,

I suggest you take a look, in example demo All Features\Welcome !\Axes\Permanent custom axes, where you can see as you do to add a custom axes in the right Axis. If you have any problems with it, please let me know.

I hope will helps.

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

ICS
Newbie
Newbie
Posts: 10
Joined: Wed Sep 22, 2010 12:00 am

Re: Two different Axis on the right side of the Chart

Post by ICS » Thu Aug 25, 2011 10:09 am

Hola Sandra
I added a custom axis, thanks for your advice. If have two more questions:

Is there a way, that I can show the orange Labels inside the Chart?
At the moment I moved the labels to the right by setting the axis1.Ticks.Length to 35. How can I make moving to the left into the chart? (see attchement)

When I make the cusom axis1 visible, the Tchart1 dosn't automaticly become smaller to show the full lables (like it does with tChart1.Axes.Right). As you see on the pictures (see attchement), the orange lables from the axis1 are cut off a little bit.
Attachments
Picture.JPG
Picture.JPG (85.35 KiB) Viewed 7582 times

ICS
Newbie
Newbie
Posts: 10
Joined: Wed Sep 22, 2010 12:00 am

Re: Two different Axis on the right side of the Chart

Post by ICS » Thu Aug 25, 2011 10:17 am

Additional information:

When I make the tChart1.Axes.Right.Visible = false (the violett axis), the chart resizes automaticly and becomes bigger and the the orange (the custom axis) is outside the picture :-(

ICS
Newbie
Newbie
Posts: 10
Joined: Wed Sep 22, 2010 12:00 am

Re: Two different Axis on the right side of the Chart

Post by ICS » Fri Aug 26, 2011 6:09 am

Hola

I found the solution:
with Axis.Positon.Position = xx% I can the position of the axis to any point :-)
And because I have the labels inside the chart now (at 100%, but "Other side" not selected) I don't have the problem any more, that the labels are outside the tChart image. !!

Hasta luego

Eric

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

Re: Two different Axis on the right side of the Chart

Post by Sandra » Fri Aug 26, 2011 8:19 am

Hello Eric,

I am glad that you found a solution for your problem.:)

Gracias,
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