如果您正在使用分页功能,您可以暂时禁用它以打印整个系列并在打印后再次重置。例如,在表单上有一个 TChart、一个 TChartScrollBar 和一个 TButton:
uses Series, TeeEdit;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.View3D:=false;
Chart1.AddSeries(TFastLineSeries).FillSampleValues(100);
Chart1.Pages.MaxPointsPerPage:=10;
ChartScrollBar1.Chart:=Chart1;
ChartScrollBar1.Enabled:=true;
end;
procedure TForm1.Button1Click(Sender: TObject);
var tmpCount, tmpPage: Integer;
begin
tmpCount:=Chart1.Pages.MaxPointsPerPage;
tmpPage:=Chart1.Pages.Current;
Chart1.Pages.MaxPointsPerPage:=Chart1[0].Count;
with TChartPreviewer.Create(Self) do
begin
Chart:=Chart1;
Execute;
end;
Chart1.Pages.MaxPointsPerPage:=tmpCount;
Chart1.Pages.Current:=tmpPage;
end;