现在的位置: 首页 > 综合 > 正文

Acro Multi-Language Class-Method for TeeChart

2012年11月01日 ⁄ 综合 ⁄ 共 1774字 ⁄ 字号 评论关闭

unit teechartClassMethod;

interface
uses
  Graphics,SysUtils,AcroMultiClassMethod;

implementation
uses
  Chart;

procedure Proc_TChart(ATable:IDataLocate;AComponent:TObject;
  ACodePage,ASeqNo:string;AFont:TFont);
var
  i:integer;
begin
//Series
  for i:=0 to TChart(AComponent).SeriesCount-1 do
  begin
    TChart(AComponent).Series[i].Title:=GetDisplayValue(ATable,
      TChart(AComponent).Series[i].Title,ACodePage,ASeqNo);
    TChart(AComponent).Series[i].XValues.Name:=GetDisplayValue(ATable,
      TChart(AComponent).Series[i].XValues.Name,ACodePage,ASeqNo);
    TChart(AComponent).Series[i].YValues.Name:=GetDisplayValue(ATable,
      TChart(AComponent).Series[i].YValues.Name,ACodePage,ASeqNo);
  end;
//Title
  TChart(AComponent).Title.Text.Text:=GetDisplayValue(ATable,
    Trim(TChart(AComponent).Title.Text.Text),ACodePage,ASeqNo);
  TChart(AComponent).SubTitle.Text.Text:=GetDisplayValue(ATable,
    Trim(TChart(AComponent).SubTitle.Text.Text),ACodePage,ASeqNo);
  TChart(AComponent).SubFoot.Text.Text:=GetDisplayValue(ATable,
    Trim(TChart(AComponent).SubFoot.Text.Text),ACodePage,ASeqNo);
  TChart(AComponent).Foot.Text.Text:=GetDisplayValue(ATable,
    Trim(TChart(AComponent).Foot.Text.Text),ACodePage,ASeqNo);
  TChart(AComponent).Axes.Top.Title.Caption:=GetDisplayValue(ATable,
    TChart(AComponent).Axes.Top.Title.Caption,ACodePage,ASeqNo);
//Axes
  for i:=0 to TChart(AComponent).Axes.Count-1 do
    TChart(AComponent).Axes[i].Title.Caption:=GetDisplayValue(ATable,
      TChart(AComponent).Axes[i].Title.Caption,ACodePage,ASeqNo);
//Legend
  TChart(AComponent).Legend.Title.Text.Text:=GetDisplayValue(ATable,
    TChart(AComponent).Legend.Title.Text.Text,ACodePage,ASeqNo);
end;

initialization
  AcroClassMethodStorage.RegisterClassMethod(TChart,Proc_TChart);
finalization
  AcroClassMethodStorage.UnRegisterClassMethod(TChart);
end. 

抱歉!评论已关闭.