📄 jgyhsearchfxtx.pas
字号:
unit JGYhSearchFxTx;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, OleCtrls, VCFI, ComCtrls, ImgList, ToolWin, ExtCtrls,
VtChartLib6_TLB;
type
TJGYhSearchFxTxGL = class(TForm)
CoolBar1: TCoolBar;
ToolBar1: TToolBar;
ImageList1: TImageList;
ImageList2: TImageList;
ToolButton1: TToolButton;
ToolButton2: TToolButton;
ToolButton3: TToolButton;
ToolButton4: TToolButton;
ToolButton5: TToolButton;
ToolButton6: TToolButton;
ToolButton7: TToolButton;
Panel1: TPanel;
StatusBar1: TStatusBar;
ToolButton8: TToolButton;
VtChart1: TVtChart6;
ToolButton9: TToolButton;
ToolButton10: TToolButton;
procedure ToolButton4Click(Sender: TObject);
procedure ToolButton7Click(Sender: TObject);
procedure ToolButton9Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
aCol,aRow:array of string;
aData:array of double;
iDs,iYd:smallint;
procedure SetGraph(aCol:array of string;aRow:array of string;aData:array of double;const Swap:boolean=false);
end;
var
JGYhSearchFxTxGL: TJGYhSearchFxTxGL;
implementation
{$R *.dfm}
procedure TJGYhSearchFxTxGL.SetGraph(aCol:array of string;aRow:array of string;aData:array of double;const Swap:boolean=false);
var
i,j,iRow,iCol:smallint;
begin
if Swap then
begin
iRow := high(aRow)+1;
iCol := high(aCol)+1;
VtChart1.RowCount := iCol;
VtChart1.ColumnCount := iRow;
for i:=1 to iRow do
begin
VtChart1.Column := i;
VtChart1.ColumnLabel := trim(aRow[i-1])+' ';//trim(copy(aCol[i-1],7,30))+' ';
end;
for i:=1 to iCol do
begin
VtChart1.Row := i;
VtChart1.RowLabel := trim(aCol[i-1]);
end;
for i:=1 to iCol do
for j:=1 to iRow do
begin
VtChart1.Row:=i;
VtChart1.Column:=j;
VtChart1.data:= floattostr(aData[(j-1)*iCol+i-1]);
end;
end
else
begin
iRow := high(aRow)+1;
iCol := high(aCol)+1;
VtChart1.RowCount := iRow;
VtChart1.ColumnCount := iCol;
for i:=1 to iCol do
begin
VtChart1.Column := i;
VtChart1.ColumnLabel := trim(aCol[i-1])+' '; //trim(copy(aCol[i-1],7,30))+' ';
end;
for i:=1 to iRow do
begin
VtChart1.Row := i;
VtChart1.RowLabel := trim(aRow[i-1]);
end;
for j:=1 to iRow do
for i:=1 to iCol do
begin
VtChart1.Row:=j;
VtChart1.Column:=i;
VtChart1.data:= floattostr(aData[(j-1)*iCol+i-1]);
end;
end;
end;
procedure TJGYhSearchFxTxGL.ToolButton4Click(Sender: TObject);
begin
if ToolButton4.Down then
VtChart1.ChartType :=1
else
if ToolButton5.Down then
VtChart1.ChartType :=3
else
if ToolButton8.Down then
VtChart1.ChartType :=13;
end;
procedure TJGYhSearchFxTxGL.ToolButton7Click(Sender: TObject);
begin
close;
end;
procedure TJGYhSearchFxTxGL.ToolButton9Click(Sender: TObject);
begin
if ToolButton9.Down then
SetGraph(aCol,aRow,aData,True)
// SetGraph(aRow,aCol,aData,true)
else
SetGraph(aCol,aRow,aData);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -