StatCard

TsgcHTMLComponent_StatCard — Delphi, C++ Builder 및 .NET에서 아이콘, 추세 화살표 및 선택적 그라데이션 배경을 갖춘 대시보드 KPI/통계 카드를 렌더링합니다.

TsgcHTMLComponent_StatCard

Bootstrap card 위에 구축된 측정 타일입니다. 제목과 값을 설정하고, 아이콘과 추세를 추가하고, 선택적으로 그라데이션을 적용한 다음, HTML 속성을 읽습니다.

컴포넌트 클래스

TsgcHTMLComponent_StatCard

렌더링

Bootstrap 5 card 마크업

언어

Delphi, C++ Builder, .NET

생성하고, 측정값을 설정하고, 렌더링하기

TitleValue를 할당하고, ColorTrend를 선택하고, 선택적으로 Gradient를 선택한 다음, HTML을 읽습니다 — 또는 정적 한 줄 Build 헬퍼를 사용하십시오.

uses
  sgcHTML_Component_StatCard;

var
  oStat: TsgcHTMLComponent_StatCard;
begin
  oStat := TsgcHTMLComponent_StatCard.Create(nil);
  try
    oStat.Title := 'Monthly Revenue';
    oStat.Value := '$48,200';
    oStat.Icon := '●';
    oStat.Color := scSuccess;
    oStat.Trend := stUp;
    oStat.TrendValue := '12.5%';

    WebModule.Response := oStat.HTML;   // Bootstrap card
  finally
    oStat.Free;
  end;
end;

// Or in a single line with the static helper:
Result := TsgcHTMLComponent_StatCard.Build('Monthly Revenue', '$48,200',
  scSuccess, stUp, '12.5%', 'kpiRevenue', sgBlueViolet);
// includes: sgcHTML_Component_StatCard.hpp

TsgcHTMLComponent_StatCard *oStat = new TsgcHTMLComponent_StatCard(NULL);
try
{
  oStat->Title = "Monthly Revenue";
  oStat->Value = "$48,200";
  oStat->Icon = "●";
  oStat->Color = scSuccess;
  oStat->Trend = stUp;
  oStat->TrendValue = "12.5%";

  String html = oStat->HTML;   // Bootstrap card
}
__finally
{
  delete oStat;
}

// Or in a single line with the static helper:
String html = TsgcHTMLComponent_StatCard::Build("Monthly Revenue", "$48,200",
  scSuccess, stUp, "12.5%", "kpiRevenue", sgBlueViolet);
using esegece.sgcWebSockets;

var stat = new TsgcHTMLComponent_StatCard();
stat.Title = "Monthly Revenue";
stat.Value = "$48,200";
stat.Icon = "●";
stat.Color = TsgcHTMLStatColor.scSuccess;
stat.Trend = TsgcHTMLStatTrend.stUp;
stat.TrendValue = "12.5%";

string html = stat.HTML;   // Bootstrap card

// Or in a single line with the static helper:
string oneLine = TsgcHTMLComponent_StatCard.Build("Monthly Revenue", "$48,200",
    TsgcHTMLStatColor.scSuccess, TsgcHTMLStatTrend.stUp, "12.5%", "kpiRevenue",
    TsgcHTMLStatGradient.sgBlueViolet);

주요 속성 및 메서드

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

측정값

Title은 카드에 레이블을 지정하고, Value는 주요 수치를 표시하며, Icon은 모서리에 인라인 아이콘 글리프를 렌더링합니다.

추세

Trend(TsgcHTMLStatTrend: stUp, stDown, stNeutral)는 색상 화살표를 그리고 TrendValue는 변화량 텍스트를 설정합니다.

색상

Color(TsgcHTMLStatColor)는 Bootstrap 컨텍스트 색상으로 테두리, 값 및 아이콘에 테마를 적용합니다.

그라데이션

Gradient(TsgcHTMLStatGradient)는 사전 설정 그라데이션을 적용합니다. GradientStartColor, GradientEndColorGradientAngle은 사용자 지정 그라데이션을 정의합니다.

부가 기능

FooterText는 캡션 행을 추가하고, CardID는 DOM id를 설정하며, CSSClass는 추가 클래스를 덧붙입니다.

한 줄 빌드

Build(aTitle, aValue, aColor, aTrend, aTrendValue, aCardID, aGradient)는 단일 정적 호출로 카드 HTML을 반환합니다.

계속 살펴보기

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

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

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