Hi,
I'm using Teechart.NET v2 (but started with the v1 trial) for Gantt charting. I'm now trying to have two horizontal axis with different scales:
labels...............18-08......................................................19-08
the first one ------|-------------------------------------------------|-----------
labels...............00:00........................12:00......................00:00
the second one ---|-------------------------|-----------------------|-----------
and then having them two sinchronized with an horizontal only zoom (I mean: when I zoom the x axis are the only one affected without changing the y one).
Any suggestion? Thanks in advance
Regards
Double axis & horizontal "zoom"
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Cinin,
You can set zoom only being horizontal or vertical for your chart. This can be done using the chart editor at Chart -> General tab or at run-time using:
You can set zoom only being horizontal or vertical for your chart. This can be done using the chart editor at Chart -> General tab or at run-time using:
Code: Select all
tChart1.Zoom.Direction = Steema.TeeChart.ZoomDirections.Horizontal;
Best Regards,
Narcís Calvet / 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 |
Thanks Narcis,
I set the chart to display the bars starting at the top of it instead of centered. Now I have a trackbar with 3 possibile position and I do when it's changed:
but the the bars are centered again (and I imagine the code above isn't the best to do a zoom).
BTW: what about the double axis issue? I tried with custom axis and other thing but I'm unable to have different scale (and different labels) keeping them sinchronized.
Thanks again
I set the chart to display the bars starting at the top of it instead of centered. Now I have a trackbar with 3 possibile position and I do when it's changed:
Code: Select all
if (YOU_WANT_TO_ZOOM_OUT)
{
double tmp = tChart1.Axes.Left.MinXValue;
Rectangle r = new Rectangle(210,97,78,90);
tChart1.Zoom.ZoomRect(r);
zoomBar.Tag = zoomBar.Value;
tChart1.Axes.Left.AdjustMaxMin();
}
else // YOU_WANT_TO_ZOOM_IN
{
tChart1.Zoom.ZoomPercent(1.0);
}
BTW: what about the double axis issue? I tried with custom axis and other thing but I'm unable to have different scale (and different labels) keeping them sinchronized.
Thanks again
Code: Select all
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Cinin,
Could you please send us an example we can run "as-is" to reproduce the problem here? You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
Thanks in advance.
Could you please send us an example we can run "as-is" to reproduce the problem here? You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
I thought your problem was how to zoom horizontally only. Could you please specify which is your exact problem and post an example if possible as well?BTW: what about the double axis issue? I tried with custom axis and other thing but I'm unable to have different scale (and different labels) keeping them sinchronized.
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 |
Instructions - How to post in this forum |
thank you again Narcis, I'll try to build a running example stripping away all the others things.
BTW: in a gantt chart how can I change the start, end and/or value of a task?
I click on a task, retreive some info in the clickSeries event but I'm unable to find where I can change the values of that task. I found the X & Y properties but i need to change both the start and the width of the task!
Thanks in advance
BTW: in a gantt chart how can I change the start, end and/or value of a task?
I click on a task, retreive some info in the clickSeries event but I'm unable to find where I can change the values of that task. I found the X & Y properties but i need to change both the start and the width of the task!
Thanks in advance