Problem with zoom in a DBCart with TBarSeries and a CrossTab

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
WilliEbert
Newbie
Newbie
Posts: 7
Joined: Tue Sep 07, 2004 4:00 am
Contact:

Problem with zoom in a DBCart with TBarSeries and a CrossTab

Post by WilliEbert » Thu Sep 20, 2007 4:59 pm

Hello,
we use a TBarSeries in a DBCart with a DBCrossTabSource and BarSeries.Multibar := mbStacked. If we zoom into the Chart only the first BarSeries of the MultiBar paint correct if AutoBarSize := true, all other stacked Bars had zoomed the unzoomed width.

We use TChart Pro 7.07 with Delphi 7.

Can you help us?

Your sincerely
Willi Ebert

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 Sep 25, 2007 12:07 pm

Hi Willi,

Using the All Features\Welcome!\Database Charts\CrossTab Charts example in the features demo and setting the series to mbStacked works fine here. Could you please test if it works fine at your end? If so, how should we reproduce the problem here?

Please notice that included with the binary installation you'll find complete TeeNew project.

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

WilliEbert
Newbie
Newbie
Posts: 7
Joined: Tue Sep 07, 2004 4:00 am
Contact:

Post by WilliEbert » Tue Sep 25, 2007 1:10 pm

Hello,
in your demo the BarSeries is not stacked and autobarsize is set to false. Further i can not edit the unit 'DBChart_CrossTabSource.pas' to do that because there is an error that the ancestor of the form TBaseDBChart is not found if i load the file in delphi.

Can you help me?

Your sincerely

WilliEbert
Newbie
Newbie
Posts: 7
Joined: Tue Sep 07, 2004 4:00 am
Contact:

Post by WilliEbert » Tue Sep 25, 2007 1:22 pm

Hello,
meanwhile i can edit your unit. I have to open the unit Base_DBChart first. And if i set autobarsize to true and multibar to mbStacked there is the same error. If i zoom into the chart the first bar is ok but the second bar on top of the first bar is smaller then the first. May be its better so send you a picture of the chart? How can i dot that?

Your sincerely

Willi Ebert

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 Sep 25, 2007 1:28 pm

Hello Willi,

Thanks for the information. Finally we could reproduce the problem here and that's because just the first series in the chart has AutoBarSize set to true. Series created by CrossTab source don't have this property so you should do something like the code below after activating CrossTab source.

Code: Select all

  for i:=0 to DBChart1.SeriesCount-1 do
  begin
    if DBChart1[i] is TBarSeries then
      (DBChart1[i] as TBarSeries).AutoBarSize:=true;
  end;
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

WilliEbert
Newbie
Newbie
Posts: 7
Joined: Tue Sep 07, 2004 4:00 am
Contact:

Post by WilliEbert » Tue Sep 25, 2007 2:58 pm

Hello,
your solution worked for me..

Thank you very much.

Your sincerely

Post Reply