Delphi中DBChart的应用

1、绑定数据

ADOQuery1.Active := True;

DBChart1.Series[0].DataSource := ADOQuery1;

DBChart1.Series[0].XLabelSource := ‘FieldName’;

DBChart1.Series[0].YValues.ValueSource := ‘FieldName’;

2、切换图表类型

tmpChart := DBChart1.Series[0];

ChangeSeriesType(tmp, TLineSeries);

tmpChart.Active := true;

tmpChart.RefreshSeries;

3、设置分页

DBChart1.ScaleLastPage := true;

DBChart1.MaxPointsPerPage := 10;

DBChart1.Page := 1;

DBChart1.PreviousPage;

DBChart1.NextPage;

DBChart1.Page := NumPages;

你可能感兴趣的:(职场,Delphi,应用,休闲,DBChart)