gant chart used with seconds rather then days?
gant chart used with seconds rather then days?
I have a need to create a gant looking chart for a series of of data points that are measured in seconds and span no more then 3 minutes. I tried manually adding some data, but the end date seems to always want to be an actual date. Is there a way to create a gant style chart with a series of 10 or so bars each back to back horizontally but only lasting a few seconds? thanks
Re: gant chart used with seconds rather then days?
Hello,
The AddGantt method allows you to add each value with start and end date. You could use it to add your values with an end date a few seconds greater than the start date. Here you have an example using it:
The AddGantt method allows you to add each value with start and end date. You could use it to add your values with an end date a few seconds greater than the start date. Here you have an example using it:
Code: Select all
uses GanttCh, DateUtils;
procedure TForm1.FormCreate(Sender: TObject);
var tmpDate: TDateTime;
i: Integer;
begin
Chart1.View3D:=false;
Chart1.Legend.TextStyle:=ltsPlain;
tmpDate:=StrToDateTime('01/01/2011 8:00:00');
with Chart1.AddSeries(TGanttSeries) as TGanttSeries do
begin
for i:=0 to 5 do
begin
AddGantt(tmpDate,IncSecond(tmpDate,10),random(5), 'val nº' + IntToStr(i));
tmpDate:=IncSecond(tmpDate,30);
end;
end;
Chart1.Axes.Bottom.LabelsAngle:=90;
Chart1.Axes.Bottom.DateTimeFormat:='hh:mm:ss';
Chart1.Axes.Bottom.Increment:=DateTimeStep[dtTenSeconds];
Chart1.Axes.Left.LabelStyle:=talValue;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |