Gantt

TsgcHTMLComponent_Gantt — Delphi, C++ Builder 및 .NET에서 색상이 지정된 작업 막대와 진행률 채우기를 갖춘 간트 프로젝트 타임라인 차트를 렌더링합니다.

TsgcHTMLComponent_Gantt

시작 날짜와 종료 날짜 및 진행률 백분율이 있는 작업을 추가하고, 제목을 설정한 다음, 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

주요 속성 및 메서드

가장 자주 사용하게 되는 멤버.

작업

TasksTitle, StartDate, EndDate, Progress, 열거형 ColorAssignee가 있는 작업 항목을 담습니다.

작업 추가

AddTask(aTitle, aStart, aEnd, aProgress, aColor, aAssignee)는 단일 호출로 막대 하나를 추가합니다.

자동 크기 조정

컴포넌트는 모든 작업에서 가장 이른 시작과 가장 늦은 종료를 찾아 모든 막대를 그 범위에 걸쳐 비례적으로 배치합니다.

진행률

각 작업의 Progress(0–100)는 막대 위에 반투명 채우기를 그려 완료 정도를 한눈에 볼 수 있게 합니다.

제목

Title은 차트 위에 굵은 제목을 렌더링합니다. 비워 두면 제목 행이 제거됩니다.

출력

GanttID는 카드를 식별합니다. HTML은 카드, 작업 행 및 범위 지정 간트 CSS를 반환합니다.

계속 살펴보기

모든 sgcHTML 컴포넌트60개 이상의 컴포넌트 전체 기능 매트릭스를 둘러보십시오.
무료 체험판 다운로드30일 체험판에는 60.HTML 데모 프로젝트가 포함됩니다.
가격전체 소스 코드가 포함된 Single, Team 및 Site 라이선스.

시작할 준비가 되셨습니까?

무료 체험판을 다운로드하고 Delphi, C++ Builder 및 .NET에서 웹 UI를 구축하기 시작하십시오.