Page 1 of 1
multiple axes
Posted: Tue Apr 08, 2008 10:26 am
by 9338755
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.
Posted: Tue Apr 08, 2008 10:48 am
by narcis
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.
Posted: Tue Apr 08, 2008 11:05 am
by 9338755
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!
Posted: Tue Apr 08, 2008 1:03 pm
by narcis
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.
Posted: Tue Apr 08, 2008 1:38 pm
by 9338755
I did so. I've also added a screenshot. By the way I meant AxisTitel not AxisLabel (mixed it up).
Posted: Tue Apr 08, 2008 2:49 pm
by narcis
Hi ctusch,
Thanks for the information.
By the way I meant AxisTitel not AxisLabel (mixed it up).
Ok, this changes everything
.
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);
}
Posted: Wed Apr 09, 2008 11:59 am
by 9338755
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.