Bar3DSeries UseYOrigin False behavior

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
SteveP
Advanced
Posts: 132
Joined: Sun Sep 07, 2003 4:00 am

Bar3DSeries UseYOrigin False behavior

Post by SteveP » Wed May 18, 2005 8:20 pm

Bar3DSeries.UseYOrigin := false causes all bars to be drawn with their individual minimums set to the overall minimum of all bars. This causes all bars to be drawn down to the bottom axis. They no longer span just the range from their Y to Offset values. The Y axis minimum becomes the overall minimum of all bars.

Is this the designed behavior ? Could it instead keep displaying all bars over their Y to Offset range but only adjust the Y axis minimum to the overall minimum of all bars ? The Y axis acts this way. It autoscales to whatever the overall maximum of all bars is.

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 19, 2005 7:33 am

Hi Steve,

The problem is you are not setting YOrigin for the series and its default value is zero. You should do something like:

Code: Select all

  Series1.AddBar(1,4,2);
  Series1.YOrigin:=2;
  Series1.UseYOrigin:=true;
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

SteveP
Advanced
Posts: 132
Joined: Sun Sep 07, 2003 4:00 am

Post by SteveP » Thu May 19, 2005 1:05 pm

Narcis,

Setting YOrigin for the series basically means having to set the minimum value for the series. Typically, one does not have to set the series minimum. The chart does that automatically by itself. It just seemed to me that there could be consistant behavior if the Bar3D series could also determine the overall series minimum value, like it does with its overall maximum value.

Steve

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu May 26, 2005 11:04 am

Hi Steve,
Is this the designed behavior ? Could it instead keep displaying all bars over their Y to Offset range but only adjust the Y axis minimum to the overall minimum of all bars ? The Y axis acts this way. It autoscales to whatever the overall maximum of all bars is.
This is as designed, but you can always calculate the desired YOrigin and asign it in the OnAfterDraw event :

Code: Select all

procedure TForm1.Chart1AfterDraw(Sender: TObject);
begin
Series1.YOrigin := Series1.MinYValue;
Series1.UseYOrigin := true;
end;

Post Reply