可以控制啊,你想要现实多少块就现实多少块。 比如你只需要现实10块数据 vStrList 为先取得的1000条数据 for i := 0 to vStrList.Count - 1 do begin if i < 10 then TPieSeries(AChart.Series[0]).AddPie('')//增加图形 else Sum := Sum + Interger(vStrList.Objects[i]); end; if Sum > 0 then TPieSeries(AChart.Series[0]).AddPie(Sum, '其它', clTeeColor);
TChart有分页功能 Chart1.MaxPointsPerPage := X 设置每页最大点数
回:zhaixing0101 Chart1.MaxPointsPerPage := X 设置每页点数 --------------------------------------------------- 用这种方式,只是显示前头的数据: x=40, 显示1---40点我是希望显示后面的数据:961---1000, 还有没法吗?
Chart1.Page := X 这个属性, 负责当前显示第几页的数据, (可以自己程序计算一下, 当前数据在第几页里) 帮助里的说明 Declaration property Page : LongInt; Description Run-time only. The Page property determines the current visible points of Series in a Chart with MaxPointsPerPage property greater than zero. When TChart.MaxPointsPerPage property is greater than zero, TeeChart internally divides all Series points in "pages". Each page is assigned a different initial and ending X coordinates. The TChart.NumPages property returns the total number of pages. It equals to the total number of Series points divided the MaxPointsPerPage property.The TChart.PreviousPage and TChart.NextPage methods decrement or increment the Page property respectively.
比如你只需要现实10块数据
vStrList 为先取得的1000条数据
for i := 0 to vStrList.Count - 1 do
begin
if i < 10 then
TPieSeries(AChart.Series[0]).AddPie('')//增加图形
else
Sum := Sum + Interger(vStrList.Objects[i]);
end;
if Sum > 0 then
TPieSeries(AChart.Series[0]).AddPie(Sum, '其它', clTeeColor);
Chart1.MaxPointsPerPage := X 设置每页最大点数
---------------------------------------------------
用这种方式,只是显示前头的数据:
x=40, 显示1---40点我是希望显示后面的数据:961---1000, 还有没法吗?
帮助里的说明
Declaration
property Page : LongInt;
Description
Run-time only.
The Page property determines the current visible points of Series in a Chart with MaxPointsPerPage property greater than zero.
When TChart.MaxPointsPerPage property is greater than zero, TeeChart internally divides all Series points in "pages".
Each page is assigned a different initial and ending X coordinates.
The TChart.NumPages property returns the total number of pages. It equals to the total number of Series points divided the MaxPointsPerPage property.The TChart.PreviousPage and TChart.NextPage methods decrement or increment the Page property respectively.