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.
Bar3DSeries UseYOrigin False behavior
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Steve,
The problem is you are not setting YOrigin for the series and its default value is zero. You should do something like:
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 |
Instructions - How to post in this forum |
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
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
Hi Steve,
This is as designed, but you can always calculate the desired YOrigin and asign it in the OnAfterDraw event :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.
Code: Select all
procedure TForm1.Chart1AfterDraw(Sender: TObject);
begin
Series1.YOrigin := Series1.MinYValue;
Series1.UseYOrigin := true;
end;
Pep Jorge
http://support.steema.com
http://support.steema.com