Zoom & DateTime - Bug?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
daniele_h
Newbie
Newbie
Posts: 13
Joined: Thu Jan 31, 2008 12:00 am

Zoom & DateTime - Bug?

Post by daniele_h » Wed Feb 06, 2008 2:09 pm

Dear All

I have an odd problem when trying to zoom a chart with Line series where the BottomAxis is in DateTime format.

- Zooming with the mouse (usual topleft-to-bottomright) and also by code results in the date completely wrong, thus the values are obviously not displayed because no data is found for that date.
I get for example 30.12.1899 where my full range is from 1.12.2007 to 5.12.2007.

- When I however first set paging (even the biggest number of poinst possible), then zooming works correctly.

I should mention that my datasource is from text file. But that should not matter considering the second point
Does anyone have an idea how to solve this ?

Regards, Daniele

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

Post by Narcís » Wed Feb 06, 2008 2:42 pm

Hi Daniele,

I'm not able to reproduce the problem using TeeChart Pro v8.02 VCL and the code below. Could you please send us a simple example project we can run "as-is" to reproduce the problem here and let us know the TeeChart version you are using?

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

Code: Select all

uses DateUtils;

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  Series1.XValues.DateTime := true;

  for i:=0 to 100 do
    Series1.AddXY(Today + i, random);
end;
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

daniele_h
Newbie
Newbie
Posts: 13
Joined: Thu Jan 31, 2008 12:00 am

Post by daniele_h » Wed Feb 06, 2008 4:18 pm

thank you,
I uploaded now a test-project for you to reproduce.
I'm using Tchart pro v8.something

I did simplify the project to the bare bones, so the error must be found in the code - or the component. the series are created at run-time. maybe the problem is there. I used sample code I found on your page.

Thanks
Daniele

daniele_h
Newbie
Newbie
Posts: 13
Joined: Thu Jan 31, 2008 12:00 am

Post by daniele_h » Fri Feb 08, 2008 9:28 am

Dear Narcís

I now found out what the problem is, but do not know how to solve it.
The problem only appears if - as in my case - a ChartScrollBar is used!
By removing the scrollbar the Chart can be zoomed correctly.

Do you have any ideas of a workaround - speak using ScrollBar and still zooming correctly?

I'd much appreciate your help

Cheers
Daniele

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

Post by Narcís » Fri Feb 08, 2008 10:24 am

Hi Daniele,

Thanks for the information.

We think the problem is in the TChartScrollBar.RecalcPosition implementation. We'll try to improve this for next releases. In the meantime the "solution" would be to use regular TScrollBar and manually change axis scale by using TChartAxis.SetMinMax method (zooming and scrolling is merely changing axis minimum and maximum value). It may be also necessary setting scrollbar's min and max values in the zooming and scrolling events.

I have sent you an e-mail with an example using TScrollBar.
Last edited by Narcís on Fri Feb 08, 2008 10:29 am, edited 1 time in total.
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

daniele_h
Newbie
Newbie
Posts: 13
Joined: Thu Jan 31, 2008 12:00 am

Post by daniele_h » Fri Feb 08, 2008 10:28 am

Ok, thanks for your suggestion. I'll try like you say

regards
Daniele

beluga
Newbie
Newbie
Posts: 1
Joined: Thu Sep 27, 2007 12:00 am

need sample too

Post by beluga » Wed May 21, 2008 6:43 am

Hello Narcís

Could you provide me with a ChartScrollBar / DateTime sample too

thx. HeinzJ

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

Post by Narcís » Wed May 21, 2008 11:21 am

Hi HeinzJ,

Sure! I've just sent you the example to your forums contact e-mail address.
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

KymaNorway
Newbie
Newbie
Posts: 21
Joined: Fri Feb 03, 2006 12:00 am

series disappears

Post by KymaNorway » Thu May 22, 2008 12:57 pm

I have a simliar problem with Teechart 7.12.

I am using DateTime as the horizontal axis. The chart works perfectly until I add a scrollbar to it.

Here the horizontal axis shows correct values, but the series disappears when I zoom or scroll. When I zoom out to 100% size, everything is showing correctly again.

Is there a fix for this?

Could you please send me the sample of your Scrollbar/DateTime.

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

Post by Narcís » Thu May 22, 2008 1:10 pm

Hi KymaNorway,

I've just sent you the example. I'm afraid there's no fix for that at the moment.
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

KymaNorway
Newbie
Newbie
Posts: 21
Joined: Fri Feb 03, 2006 12:00 am

Not fixed :shock:

Post by KymaNorway » Mon May 26, 2008 10:14 am

is it not fixed in version 8 either? It seems like such an obvious and big bug.

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 Jun 02, 2008 10:23 am

Hi KymaNorway,

No, this issue (TV52013102) hasn't been fixed yet. I've set it to a high-priority bug to be fixed for future releases.
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

MiguelHernandez
Newbie
Newbie
Posts: 2
Joined: Thu Mar 18, 2010 12:00 am

Re: Zoom & DateTime - Bug?

Post by MiguelHernandez » Wed Jun 23, 2010 12:37 pm

Hi Narcís,

could you provide me the example? I have a chart with lots of bar and I need to scroll them step by step instead paging.

Thanks in advance,

Miguel Ángel.

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

Re: Zoom & DateTime - Bug?

Post by Narcís » Wed Jun 23, 2010 12:57 pm

Hi Miguel Ángel,

Yes, I have sent you the example. Notice that TV52013102 was fixed for v8.04, which was released in October 2008.
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