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: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184: 185: 186:
| unit Unit1;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, TeEngine, Series, ExtCtrls, TeeProcs, Chart, Grids, ComCtrls, INIFiles, DB, ADODB, NxColumns, NxColumnClasses, DateUtils, NxScrollControl, NxCustomGridControl, NxCustomGrid, NxGrid, ComObj, Menus, ImgList, ShellApi, ActnPopup, Clipbrd, Math, ToolWin, ActnMan, ActnCtrls, ActnMenus,GanttCh, ActnList, XPStyleActnCtrls, Mask, DBGrids, ArrowCha, NxCollection, DBCtrls;
type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); private public Tester_Charts: Array of TChart; Tester_ChartsFPY: Array of TChart; Tester_Series: Array of THorizBarSeries; Tester_PointSeries: Array of TPointSeries; Tester_FPYSoll: Array of TLineSeries; Tester_SollSeries: Array of TLineSeries; Tester_BarSeriesFr: Array of TBarSeries; Tester_BarSeriesSp: Array of TBarSeries; Tester_BarSeriesNa: Array of TBarSeries; Tester_BarSeriesDoppel: Array of TBarSeries; end;
var Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject); var pDatum: String; begin SetLength(Tester_ChartsFPY, 1); SetLength(Tester_Series, 1); SetLength(Tester_PointSeries, 1); SetLength(Tester_FPYSoll, 1); SetLength(Tester_SollSeries, 1); SetLength(Tester_BarSeriesFr, 1); SetLength(Tester_BarSeriesSp, 1); SetLength(Tester_BarSeriesNa, 1); SetLength(Tester_BarSeriesDoppel, 1);
Tester_ChartsFPY[0] := nil; Tester_ChartsFPY[0] := TChart.Create(Form1); Tester_ChartsFPY[0].Parent := Form1; Tester_ChartsFPY[0].Name := 'ChartTesterFPY' + IntToStr(0); Tester_ChartsFPY[0].Top := 15; Tester_ChartsFPY[0].View3D := false; Tester_ChartsFPY[0].Legend.Alignment := laBottom; Tester_ChartsFPY[0].Title.Font.Style := [fsBold]; Tester_ChartsFPY[0].Title.Font.Color := clBlack; Tester_ChartsFPY[0].BottomAxis.LabelsAngle := 90; Tester_ChartsFPY[0].Align := alClient;
Tester_ChartsFPY[0].Width := (((Form1.Width - 15) div 2)); Tester_ChartsFPY[0].Left := 5; Tester_ChartsFPY[0].Height := Form1.Height - Tester_ChartsFPY[0].Top - 5; Tester_ChartsFPY[0].Color := clWhite; Tester_ChartsFPY[0].Title.Text.Clear; Tester_ChartsFPY[0].Title.Text.Add('xxxxxxxxxxx' + ' - ' + Form1.Caption); Tester_ChartsFPY[0].Title.Visible := false; Tester_ChartsFPY[0].BevelOuter := bvNone;
Tester_ChartsFPY[0].RightAxis.Title.Caption := 'FPY'; Tester_ChartsFPY[0].LeftAxis.Title.Caption := 'BGR'; Tester_ChartsFPY[0].RightAxis.Title.Font.Style := [fsBold]; Tester_ChartsFPY[0].LeftAxis.Title.Font.Style := [fsBold]; Tester_ChartsFPY[0].RightAxis.SetMinMax(0, 110);
Tester_BarSeriesNa[0] := nil; Tester_BarSeriesNa[0] := TBarSeries.Create(Tester_ChartsFPY[0]); Tester_BarSeriesNa[0].ParentChart := Tester_ChartsFPY[0]; Tester_BarSeriesNa[0].Name := 'Tester_BarSeriesNa' + IntToStr(0); Tester_BarSeriesNa[0].Marks.Visible := false; Tester_BarSeriesNa[0].Marks.ArrowLength := 40; Tester_BarSeriesNa[0].Marks.Arrow.Color := clLime; Tester_BarSeriesNa[0].Marks.BackColor := clLime; Tester_BarSeriesNa[0].Marks.Style := smsValue; Tester_BarSeriesNa[0].Marks.Font.Size := 9; Tester_BarSeriesNa[0].Title := 'Nacht Pass'; Tester_BarSeriesNa[0].MultiBar := mbStacked; Tester_BarSeriesNa[0].SeriesColor := RGB(0, 60, 20); Tester_BarSeriesNa[0].BarWidthPercent := 40;
Tester_BarSeriesFr[0] := nil; Tester_BarSeriesFr[0] := TBarSeries.Create(Tester_ChartsFPY[0]); Tester_BarSeriesFr[0].ParentChart := Tester_ChartsFPY[0]; Tester_BarSeriesFr[0].Name := 'Tester_BarSeriesFr' + IntToStr(0); Tester_BarSeriesFr[0].Marks.Visible := false; Tester_BarSeriesFr[0].Marks.ArrowLength := 40; Tester_BarSeriesFr[0].Marks.Arrow.Color := clLime; Tester_BarSeriesFr[0].Marks.BackColor := clLime; Tester_BarSeriesFr[0].Marks.Style := smsValue; Tester_BarSeriesFr[0].Marks.Font.Size := 9; Tester_BarSeriesFr[0].Title := 'Früh Pass'; Tester_BarSeriesFr[0].MultiBar := mbStacked; Tester_BarSeriesFr[0].SeriesColor := RGB(70, 190, 0); Tester_BarSeriesFr[0].BarWidthPercent := 40;
Tester_BarSeriesSp[0] := nil; Tester_BarSeriesSp[0] := TBarSeries.Create(Tester_ChartsFPY[0]); Tester_BarSeriesSp[0].ParentChart := Tester_ChartsFPY[0]; Tester_BarSeriesSp[0].Name := 'Tester_BarSeriesSp' + IntToStr(0); Tester_BarSeriesSp[0].Marks.Visible := true; Tester_BarSeriesSp[0].Marks.ArrowLength := 40; Tester_BarSeriesSp[0].Marks.Arrow.Color := clSkyBlue; Tester_BarSeriesSp[0].Marks.BackColor := clSkyBlue; Tester_BarSeriesSp[0].Marks.Style := smsLabel; Tester_BarSeriesSp[0].Marks.Font.Size := 9; Tester_BarSeriesSp[0].Title := 'Spät Pass'; Tester_BarSeriesSp[0].MultiBar := mbStacked; Tester_BarSeriesSp[0].SeriesColor := RGB(197, 255, 197); Tester_BarSeriesSp[0].BarWidthPercent := 40;
Tester_BarSeriesDoppel[0] := nil; Tester_BarSeriesDoppel[0] := TBarSeries.Create(Tester_ChartsFPY[0]); Tester_BarSeriesDoppel[0].ParentChart := Tester_ChartsFPY[0]; Tester_BarSeriesDoppel[0].Name := 'Tester_BarSeriesDoppel' + IntToStr(0); Tester_BarSeriesDoppel[0].Marks.Visible := true; Tester_BarSeriesDoppel[0].Marks.ArrowLength := 20; Tester_BarSeriesDoppel[0].Marks.Arrow.Color := clYellow; Tester_BarSeriesDoppel[0].Marks.BackColor := clYellow; Tester_BarSeriesDoppel[0].Marks.Style := smsXValue;
Tester_BarSeriesDoppel[0].Marks.Font.Size := 9; Tester_BarSeriesDoppel[0].Title := 'Doppel'; Tester_BarSeriesDoppel[0].SeriesColor := clYellow; Tester_BarSeriesDoppel[0].BarWidthPercent := 5;
Tester_FPYSoll[0] := nil; Tester_FPYSoll[0] := TLineSeries.Create(Tester_ChartsFPY[0]); Tester_FPYSoll[0].ParentChart := Tester_ChartsFPY[0]; Tester_FPYSoll[0].Name := 'LineSeriesTester' + IntToStr(0); Tester_FPYSoll[0].Marks.Visible := false; Tester_FPYSoll[0].Title := 'Soll FPY'; Tester_FPYSoll[0].SeriesColor := clRed; Tester_FPYSoll[0].VertAxis := aRightAxis; Tester_FPYSoll[0].LinePen.Width := 2;
Tester_PointSeries[0] := nil; Tester_PointSeries[0] := TPointSeries.Create(Tester_ChartsFPY[0]); Tester_PointSeries[0].ParentChart := Tester_ChartsFPY[0]; Tester_PointSeries[0].Name := 'LinePointTester' + IntToStr(0); Tester_PointSeries[0].Marks.Visible := false; Tester_PointSeries[0].Title := 'FPY'; Tester_PointSeries[0].SeriesColor := clRed; Tester_PointSeries[0].VertAxis := aRightAxis; Tester_PointSeries[0].LinePen.Width := 2;
Tester_SollSeries[0] := nil; Tester_SollSeries[0] := TLineSeries.Create(Tester_ChartsFPY[0]); Tester_SollSeries[0].ParentChart := Tester_ChartsFPY[0]; Tester_SollSeries[0].Name := 'SollSeriesTester' + IntToStr(0); Tester_SollSeries[0].Marks.Visible := false; Tester_SollSeries[0].Title := 'Soll'; Tester_SollSeries[0].SeriesColor := RGB(202, 164, 0);; Tester_SollSeries[0].LinePen.Width := 2;
pDatum := FormatDateTime('dd.mm', now); Form1.Tester_BarSeriesDoppel[0].Add(40, pDatum); Form1.Tester_BarSeriesNa[0].Add(10, IntToStr(10)); Form1.Tester_BarSeriesFr[0].Add(20, IntToStr(20)); Form1.Tester_BarSeriesSp[0].Add(30, IntToStr(30));
Form1.Tester_FPYSoll[0].Add(98, pDatum); Form1.Tester_SollSeries[0].Add(30, pDatum);
Form1.Tester_PointSeries[0].Add(10, pDatum); end;
end. |