-
Notifications
You must be signed in to change notification settings - Fork 0
/
frmDistStroke.pas
75 lines (64 loc) · 1.57 KB
/
frmDistStroke.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
unit frmDistStroke;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, VclTee.TeeGDIPlus, Data.DB,
Vcl.StdCtrls, VCLTee.TeEngine, VCLTee.Series, VCLTee.TeeProcs, VCLTee.Chart,
VCLTee.DBChart, Vcl.ExtCtrls;
type
TDistStroke = class(TForm)
DistStroke: TPanel;
ChartDistStroke: TDBChart;
LineSeries1: TLineSeries;
Panel8: TPanel;
Button5: TButton;
Button6: TButton;
Button7: TButton;
Button8: TButton;
Button9: TButton;
Button10: TButton;
Button11: TButton;
Button12: TButton;
Button13: TButton;
Button14: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;
var
DistStroke: TDistStroke;
implementation
{$R *.dfm}
(*
void __fastcall TMemberDlg::DBChart1GetAxisLabel(TChartAxis *Sender,
TChartSeries *Series, int ValueIndex, UnicodeString &LabelText) {
TFDQuery *qry;
TDateTime dt;
TLocateOptions SearchOptions;
Variant v[1]; // VarArray
bool Success;
// replace axis label with session date
if (Sender == DBChart1->BottomAxis) {
if (Series != nullptr) {
if (Series->DataSource != nullptr) {
qry = reinterpret_cast<TFDQuery*>(Series->DataSource);
if (qry->Active == true) {
v[0] = Variant((ValueIndex + 1));
SearchOptions.Clear();
Success = qry->Locate("ChartX", VarArrayOf(v, 0),
SearchOptions);
if (Success) {
dt = qry->FieldByName("SessionStart")->AsDateTime;
LabelText = dt.DateString();
}
else {
LabelText = "ERR";
}
}
}
}
}
}
*)
end.