Gantt
TsgcHTMLComponent_Gantt — Delphi, C++ Builder 및 .NET에서 색상이 지정된 작업 막대와 진행률 채우기를 갖춘 간트 프로젝트 타임라인 차트를 렌더링합니다.
TsgcHTMLComponent_Gantt — Delphi, C++ Builder 및 .NET에서 색상이 지정된 작업 막대와 진행률 채우기를 갖춘 간트 프로젝트 타임라인 차트를 렌더링합니다.
시작 날짜와 종료 날짜 및 진행률 백분율이 있는 작업을 추가하고, 제목을 설정한 다음, HTML 속성을 읽습니다 — 컴포넌트가 모든 막대를 프로젝트 범위에 걸쳐 비례적으로 조정합니다.
TsgcHTMLComponent_Gantt
작업 막대가 있는 Bootstrap 5 카드 + 범위 지정 CSS
Delphi, C++ Builder, .NET
Title을 설정하고, 각 작업 항목에 대해 날짜, 진행률 및 색상과 함께 AddTask를 호출한 다음, HTML을 읽습니다.
uses
sgcHTML_Enums, sgcHTML_Component_Gantt;
var
oGantt: TsgcHTMLComponent_Gantt;
begin
oGantt := TsgcHTMLComponent_Gantt.Create(nil);
try
oGantt.Title := 'Release Plan';
oGantt.AddTask('Design', EncodeDate(2026, 6, 1),
EncodeDate(2026, 6, 7), 100, hcPrimary, 'Ana');
oGantt.AddTask('Build', EncodeDate(2026, 6, 8),
EncodeDate(2026, 6, 20), 45, hcSuccess, 'Tom');
WebModule.Response := oGantt.HTML; // card + task bars + CSS
finally
oGantt.Free;
end;
end;
// includes: sgcHTML_Enums.hpp, sgcHTML_Component_Gantt.hpp
TsgcHTMLComponent_Gantt *oGantt = new TsgcHTMLComponent_Gantt(NULL);
try
{
oGantt->Title = "Release Plan";
oGantt->AddTask("Design", EncodeDate(2026, 6, 1),
EncodeDate(2026, 6, 7), 100, hcPrimary, "Ana");
oGantt->AddTask("Build", EncodeDate(2026, 6, 8),
EncodeDate(2026, 6, 20), 45, hcSuccess, "Tom");
String html = oGantt->HTML; // card + task bars + CSS
}
__finally
{
delete oGantt;
}
using esegece.sgcWebSockets;
var gantt = new TsgcHTMLComponent_Gantt();
gantt.Title = "Release Plan";
gantt.AddTask("Design", new DateTime(2026, 6, 1),
new DateTime(2026, 6, 7), 100, TsgcHTMLColor.hcPrimary, "Ana");
gantt.AddTask("Build", new DateTime(2026, 6, 8),
new DateTime(2026, 6, 20), 45, TsgcHTMLColor.hcSuccess, "Tom");
string html = gantt.HTML; // card + task bars + CSS
가장 자주 사용하게 되는 멤버.
Tasks는 Title, StartDate, EndDate, Progress, 열거형 Color 및 Assignee가 있는 작업 항목을 담습니다.
AddTask(aTitle, aStart, aEnd, aProgress, aColor, aAssignee)는 단일 호출로 막대 하나를 추가합니다.
컴포넌트는 모든 작업에서 가장 이른 시작과 가장 늦은 종료를 찾아 모든 막대를 그 범위에 걸쳐 비례적으로 배치합니다.
각 작업의 Progress(0–100)는 막대 위에 반투명 채우기를 그려 완료 정도를 한눈에 볼 수 있게 합니다.
Title은 차트 위에 굵은 제목을 렌더링합니다. 비워 두면 제목 행이 제거됩니다.
GanttID는 카드를 식별합니다. HTML은 카드, 작업 행 및 범위 지정 간트 CSS를 반환합니다.