Index

From: Jan Hirsch  Hasomed GmbH
Subject: Multiple Stacked Bars
Date: Mon, 21 Sep 2009 11:41:49 +0200
Newsgroup: steema.public.teechart8.delphi  

Hello Guys,
I'm having problems to achieve a vertical bar chart that shows multiple
(1-3) vertical bar series (1-5) where every bar consists
of two 'child bars'. I took your example from the forum and modified it:
procedure TForm1.Button1Click(Sender: TObject);
var tmpSeries: TBarSeries;
i: Integer;
begin
for i:=0 to 1 do begin
tmpSeries:=TBarSeries.Create(self);
Chart1.AddSeries(tmpSeries);
tmpSeries.MultiBar:=mbStacked;
tmpSeries.Marks.Style:=smsValue;
tmpSeries.AddBar(random, 'Round 1', clTeeColor);
tmpSeries.AddBar(random, 'Round 2', clTeeColor);
tmpSeries.AddBar(random, 'Round 3', clTeeColor);
tmpSeries.AddBar(random, 'Round 4', clTeeColor);
tmpSeries.AddBar(random, 'Round 5', clTeeColor);
tmpSeries.Title:='Error Class: ' + IntToStr(i+1);
end;
end;

This works fine for one bar series but what do I have to do in order to get
another series
drawn next to this one. Adding another tempSeries into the loop results in 5
bars (instead of 10)
consisting of 4 'child bars' (instead of 2). Using 'mbSelfStack' on every
tempSeries brings one big bar
consisting of 10 'child bars'...

With kind regards,
Jan Hirsch