Page 1 of 1

Thick border between subgroups when using stacked barchart

Posted: Wed Oct 20, 2004 12:28 pm
by 9232649
Hi,

When I display a stacked barchart (View3d:=False) then the borders between the different "sub" bars are thicker then the "normal" border. Does anyone know how to solve this problem? If you want I can e-mail a picture to display the problem.


Best Regards,

Johan Ingemansson[/img]

Posted: Fri Oct 29, 2004 1:43 pm
by Pep
Hi Johan,

the only ways that I know of could be :
1) Making the border of the Bar visible to false.
2) Using the Canvas techniques to dras a line with the same color over one of the Series, using the following code :

Code: Select all

procedure TForm1.Chart1AfterDraw(Sender: TObject);
var i : integer;
begin
  Chart1.Canvas.Pen.Color := clred;
  for i:= 0 to Series1.Count-1 do
  begin
    Chart1.Canvas.MoveTo(Series1.CalcXPos(i)+1,Series1.CalcYPos(i));
    Chart1.Canvas.lineTo(Series1.CalcXPos(i)+Series1.BarWidth,Series1.CalcYPos(i));
  end;
end;