Teechart Autoscale Price Axis

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Rania
Newbie
Newbie
Posts: 4
Joined: Fri Apr 04, 2008 12:00 am

Teechart Autoscale Price Axis

Post by Rania » Thu Nov 20, 2008 9:33 am

Hi,

I have a Delphi 7/Teechart program that allows you to zoom on the date/price axis of a line series. I added a scroll bar under the chart so I can easily scroll along the date axis when it is zoomed. The problem is that as I scroll the line can disappear as it is out of the bounding box 'Price' range.

What I'd like is an autoscale price axis that shows the best size axis for the visible part of the series in the chart pane.
As you scroll, the price axis automatically adjusts to display all the visible data in the chart Window using a 'best fit' type method.

Is this feature built into Teechart (VCL) or can it be easily implemented?

Thanks

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

Post by Narcís » Mon Nov 24, 2008 8:00 am

Hi Rania,

Could you please give us some more details about your application? Which TeeChart version are you using? Are you using TChartScrollBar or standard TScrollBar? There are some known issues with TChartScrollBar on that field, we'd better recommend using TScrollBar. I can send you an example if necessary.
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

Rania
Newbie
Newbie
Posts: 4
Joined: Fri Apr 04, 2008 12:00 am

Post by Rania » Mon Nov 24, 2008 8:24 am

Hi,
We have the latest version. The problem is NOT the scroll bar. I want the X axis to auto scale a sthe chart is scrolled. Thanks

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

Post by Narcís » Mon Nov 24, 2008 8:27 am

Hi Rania,

There was a bug with TChartScrollBar (TV52013102) which was fixed in latest v8.04 release as you can see in the release notes.

Can you please confirm you are using v8.04 and TChartScrollBar component?

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

Rania
Newbie
Newbie
Posts: 4
Joined: Fri Apr 04, 2008 12:00 am

Post by Rania » Mon Nov 24, 2008 9:46 am

Hi Narcis,
We are running 8.02. I have NO problem with scrolling the chart. I need the X axis to autoscale based on the visible data in the chart pane.

How do I do this?

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

Post by Narcís » Mon Nov 24, 2008 9:55 am

Hi Rania,

As you can see in TV52013102's description in the release notes:
12) [TV52013102]
TChartScrollBar component modified axes
scales incorrectly when zooming or panning
associated chart.
This means that when having a TChartScrollBar associated to a chart and you zoomed or scrolled that chart the TChartScrollBar tool wrongly modified axis scales, even you didn't manipulate the scroll bar directly.

I suspect that your probelm coud be related to this bug so could you please let us know if you are using a TChartScrollBar or a TScrollBar? Could you also please try using v8.04, available at the client area?

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

Rania
Newbie
Newbie
Posts: 4
Joined: Fri Apr 04, 2008 12:00 am

Post by Rania » Mon Nov 24, 2008 10:39 am

Hi Narcis,
I think we are tyalking at cross purposes.


Please look at the video in http://www.rania.co.uk/teechart/scalezoom.zip and you'll see what I want to recreate using Teechart.


Is there a property that turns ON/OFF the autoscaling of the Y axis as you scroll along the date axis?


Thanks
Don

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

Post by Narcís » Mon Nov 24, 2008 6:19 pm

Hi Don,

In that case you can do something like the example here. You could use the OnZoom and OnScroll events for calling Chart1.Draw and then set left axis min. and max. values as you wish.

Hope this helps!
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

Post Reply