Page 1 of 1

Problem with zoom in a DBCart with TBarSeries and a CrossTab

Posted: Thu Sep 20, 2007 4:59 pm
by 9339085
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

Posted: Tue Sep 25, 2007 12:07 pm
by narcis
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.

Posted: Tue Sep 25, 2007 1:10 pm
by 9339085
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

Posted: Tue Sep 25, 2007 1:22 pm
by 9339085
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

Posted: Tue Sep 25, 2007 1:28 pm
by narcis
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;

Posted: Tue Sep 25, 2007 2:58 pm
by 9339085
Hello,
your solution worked for me..

Thank you very much.

Your sincerely