Thick border between subgroups when using stacked barchart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Johan Ingemansson
Newbie
Newbie
Posts: 59
Joined: Fri May 28, 2004 4:00 am
Location: Sweden

Thick border between subgroups when using stacked barchart

Post by Johan Ingemansson » Wed Oct 20, 2004 12:28 pm

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]

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

Post by Pep » Fri Oct 29, 2004 1:43 pm

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;

Post Reply