GDI+ : 2D Bars do not show negative values at all.

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
tsiipola
Newbie
Newbie
Posts: 21
Joined: Tue Oct 02, 2007 12:00 am

GDI+ : 2D Bars do not show negative values at all.

Post by tsiipola » Wed Dec 03, 2008 8:20 am

When using a GDI+ chart, no 2D bars are shown for values less than zero. I reproduced this with TeeChart 8.04.
It can be reproduced with following Style selections:
Rectangle, Cylinder, Bevel, Slant Cube.

This can be a critical issue for many of our customers and can be interpreted as data corruption as some values are missing. At the moment we are experimenting with the bit clumsy workaround of using gradient rectangle with both colors defined identical.

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 Dec 03, 2008 9:13 am

Hi tsiipola,

Thanks for reporting. I could reproduce the issue here and added it (TV52013630) to the defect list to be fixed for next 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

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 Feb 19, 2009 4:06 pm

Hi tsiipola,

This has been fixed now for the next maintenance release. If you are a sourcecode client you can easily fix the bug implementing Rectangle method in TeeGDIPlus.pas like this:

Code: Select all

procedure TGDIPlusCanvas.Rectangle(X0,Y0,X1,Y1:Integer);
var R: TRect;
begin
  Dec(X1);
  Dec(Y1);

  R:=OrientRectangle(TeeRect(X0,Y0,X1,Y1));

  if Brush.Style<>bsClear then
     FGraphics.FillRectangle(GBrush,R.Left,R.Top,R.Right-R.Left,R.Bottom-R.Top);
  if Pen.Style<>psClear then
     FGraphics.DrawRectangle(GPen,R.Left,R.Top,R.Right-R.Left,R.Bottom-R.Top);
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

Post Reply