Page 1 of 1

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

Posted: Wed Dec 03, 2008 8:20 am
by 10546890
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.

Posted: Wed Dec 03, 2008 9:13 am
by narcis
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.

Posted: Thu Feb 19, 2009 4:06 pm
by narcis
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;