multiple axes

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
ctusch
Newbie
Newbie
Posts: 34
Joined: Fri Aug 27, 2004 4:00 am

multiple axes

Post by ctusch » Tue Apr 08, 2008 10:26 am

Hello,

I'm currently getting started with multiple axes i.e. custom axes. I have two question:

1) Is it possible to position the axis label? It's at the middle of the axis' height but I'd like to have it at the top. I couldn't find a property for doing this.

2) I'm planning to have multiple axes to the left of my chart (all having the height of the chart). What is the best way to position the axes/resize the chart so the chart, the axes and the axes' labels won't overlap?

Thanks for your help in advance!

EDIT:
I just came across another question: why doesn't zoom affect my custom axes? Scroll does.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Apr 08, 2008 10:48 am

Hi ctusch,

Please find below the answers to your questions:
1) Is it possible to position the axis label? It's at the middle of the axis' height but I'd like to have it at the top. I couldn't find a property for doing this.
I don't understand your exact request. Could you please give me some more details about it?
2) I'm planning to have multiple axes to the left of my chart (all having the height of the chart). What is the best way to position the axes/resize the chart so the chart, the axes and the axes' labels won't overlap?
You can do something as in Yeray's example here. This is a Delphi example using TeeChart Pro VCL. Something similar should be possible using .NET version.
I just came across another question: why doesn't zoom affect my custom axes? Scroll does.
Custom axes don't support zoom. You have to do that manually as told here.
Best Regards,
Narcís Calvet / 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

ctusch
Newbie
Newbie
Posts: 34
Joined: Fri Aug 27, 2004 4:00 am

Post by ctusch » Tue Apr 08, 2008 11:05 am

Hello narcis,
narcis wrote:
1) Is it possible to position the axis label? It's at the middle of the axis' height but I'd like to have it at the top. I couldn't find a property for doing this.
I don't understand your exact request. Could you please give me some more details about it?
What I meant is I want the text that is in the AxisLabel.Text property displayed at the upper end of my axis. But it is displayed in the middle and I can't find a way to change its position.

Thanks for the other answers so far!

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Apr 08, 2008 1:03 pm

Hi ctusch,

Sorry but I still don't understand what do you mean with AxisLabel.Text. Would you be so kind to send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
Best Regards,
Narcís Calvet / 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

ctusch
Newbie
Newbie
Posts: 34
Joined: Fri Aug 27, 2004 4:00 am

Post by ctusch » Tue Apr 08, 2008 1:38 pm

I did so. I've also added a screenshot. By the way I meant AxisTitel not AxisLabel (mixed it up).

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Apr 08, 2008 2:49 pm

Hi ctusch,

Thanks for the information.
By the way I meant AxisTitel not AxisLabel (mixed it up).
Ok, this changes everything :wink:.

In that case, the solution is custom drawing in the AfterDraw event:

Code: Select all

    void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
    {
      Rectangle Rect = tChart1.Chart.ChartRect;
      g.RotateLabel(Rect.Left - tChart1.Axes.Left.MaxLabelsWidth() -30, Rect.Top + 10, "test", 90);
    }
Best Regards,
Narcís Calvet / 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

ctusch
Newbie
Newbie
Posts: 34
Joined: Fri Aug 27, 2004 4:00 am

Post by ctusch » Wed Apr 09, 2008 11:59 am

So that means I can't move the axis title itself.. okay this is going to be a bit more complicated with multiple axes next to each other but I'm glad there is a way to do it at all.

Post Reply