root / UnitChartHReport.pas @ 15
Historique | Voir | Annoter | Télécharger (1,938 ko)
1 | 1 | avalancogn | unit UnitChartHReport;
|
---|---|---|---|
2 | |||
3 | interface
|
||
4 | |||
5 | uses
|
||
6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, |
||
7 | Dialogs, ExtCtrls, QuickRpt, QRCtrls, QrTee, TeeProcs, TeEngine, Chart, |
||
8 | DBChart, gnugettext; |
||
9 | |||
10 | type
|
||
11 | TFormChartHReport = class(TForm)
|
||
12 | QuickRepChart: TQuickRep; |
||
13 | PageFooterBand1: TQRBand; |
||
14 | DetailBand1: TQRBand; |
||
15 | QRSysDataDate: TQRSysData; |
||
16 | QRLabelEvaPig: TQRLabel; |
||
17 | QRChart1: TQRChart; |
||
18 | QRDBChart1: TQRDBChart; |
||
19 | procedure FormCreate(Sender: TObject);
|
||
20 | private
|
||
21 | { Private declarations }
|
||
22 | public
|
||
23 | { Public declarations }
|
||
24 | end;
|
||
25 | |||
26 | procedure SetChartFont(Chart: TCustomChart; FontName: TFontName);
|
||
27 | |||
28 | var
|
||
29 | FormChartHReport: TFormChartHReport; |
||
30 | |||
31 | implementation
|
||
32 | |||
33 | {$R *.dfm}
|
||
34 | |||
35 | procedure SetChartFont(Chart: TCustomChart; FontName: TFontName);
|
||
36 | begin
|
||
37 | Chart.BottomAxis.LabelsFont.Name := FontName; |
||
38 | Chart.BottomAxis.Title.Font.Name := FontName; |
||
39 | Chart.DepthAxis.LabelsFont.Name := FontName; |
||
40 | Chart.DepthAxis.Title.Font.Name := FontName; |
||
41 | Chart.DepthTopAxis.LabelsFont.Name := FontName; |
||
42 | Chart.DepthTopAxis.Title.Font.Name := FontName; |
||
43 | Chart.Foot.Font.Name := FontName; |
||
44 | Chart.LeftAxis.LabelsFont.Name := FontName; |
||
45 | Chart.LeftAxis.Title.Font.Name := FontName; |
||
46 | Chart.Legend.Font.Name := FontName; |
||
47 | Chart.Legend.Title.Font.Name := FontName; |
||
48 | Chart.RightAxis.LabelsFont.Name := FontName; |
||
49 | Chart.RightAxis.Title.Font.Name := FontName; |
||
50 | Chart.SubFoot.Font.Name := FontName; |
||
51 | Chart.SubTitle.Font.Name := FontName; |
||
52 | Chart.Title.Font.Name := FontName; |
||
53 | Chart.TopAxis.LabelsFont.Name := FontName; |
||
54 | Chart.TopAxis.Title.Font.Name := FontName; |
||
55 | end;
|
||
56 | |||
57 | procedure TFormChartHReport.FormCreate(Sender: TObject);
|
||
58 | begin
|
||
59 | if Screen.Fonts.IndexOf('Arial Unicode MS') <> -1 |
||
60 | then
|
||
61 | begin
|
||
62 | Font.Name := 'Arial Unicode MS';
|
||
63 | QuickRepChart.Font.Name := 'Arial Unicode MS';
|
||
64 | SetChartFont(QRDBChart1, 'Arial Unicode MS');
|
||
65 | end;
|
||
66 | TranslateComponent(QRChart1); |
||
67 | end;
|
||
68 | |||
69 | end. |