TBarSeries with "double" values
Posted: Fri Apr 11, 2014 12:52 pm
We are using the TeeChartStandard2014 package.
I have a TBarSeries with some "double" values. I use this sample code:
I looks like this:
So the bars with the same values are "overlayed". The same with "mbStacked".
Any idea how to fix this?
Best Regards,
Kai
I have a TBarSeries with some "double" values. I use this sample code:
Code: Select all
var
i, j: Integer;
tmpDates: array of TDateTime;
doADoubleValue: Boolean;
doADoubleValue := False;
setLength(tmpDates, 2);
for i:=0 to High(tmpDates) do
if i mod 2 = 0 then
tmpDates[i]:=IncDay(Today, i*2)
else
tmpDates[i]:=IncDay(Today, (i*2)+1);
for i:=0 to 1 do
with frmChart.ChartAccounting.AddSeries(TBarSeries) as TBarSeries do
begin
//MultiBar:=mbStacked;
MarksOnBar:=False;
MarksLocation:=mlCenter;
CustomBarWidth:=40;
XValues.DateTime:=true;
for j:=0 to High(tmpDates) do
begin
if j mod 2 = 0 then
begin
AddXY(tmpDates[j]+i, 25+random*75, 'S' + inttoStr(i) + ' L' + IntToStr(j));
end
else
begin
AddXY(tmpDates[j], 25+random*75, 'S' + inttoStr(i) + ' L' + IntToStr(j));
if not doADoubleValue then
begin
AddXY(tmpDates[j], 15+random*75, 'test - S' + inttoStr(i) + ' L' + IntToStr(j));
doADoubleValue := True;
end;
end;
end;
end;
So the bars with the same values are "overlayed". The same with "mbStacked".
Any idea how to fix this?
Best Regards,
Kai