⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stacked.pas

📁 Delphi Component - Chart Fx
💻 PAS
字号:
unit stacked;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  OleCtrls, ChartfxLib_TLB;

type
  TForm1 = class(TForm)
    ChartFX1: TChartFX;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.FormCreate(Sender: TObject);
VAR
   i,j: Integer;
begin
    // Init data
    ChartFX1.OpenDataEx(COD_VALUES, 6, 10);
    For j := 0 To 9 Do
        For i := 0 To 5 Do
            ChartFX1.ValueEx[i, j] := 10 + Random(90);
    ChartFX1.CloseData(COD_VALUES);
    
    // Produce 2 bars and 1 curve
    ChartFX1.Series[0].Gallery := BAR;
    ChartFX1.Series[1].Gallery := BAR;
    ChartFX1.Series[1].Stacked := True; // On top of 0
    ChartFX1.Series[2].Gallery := BAR;
    ChartFX1.Series[3].Gallery := BAR;
    ChartFX1.Series[3].Stacked := True; // On top of 2
    ChartFX1.Series[4].Gallery := BAR;
    ChartFX1.Series[4].Stacked := True; // On top of 3
    ChartFX1.Series[5].Gallery := CURVE;

    ChartFX1.Series[5].MarkerShape := MK_NONE;
    ChartFX1.Series[5].LineWidth := 3;

    // Adjust scale
    ChartFX1.RecalcScale;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -