[英]Delphi - how i can use TChart with IntraWeb
I'm using Delphi XE8
with IntraWeb
XIV v14.0.49 i create a TIWForm
and i drooped a TChart
component on it. 我使用Delphi XE8
与IntraWeb
XIV v14.0.49我创建了一个TIWForm
和我下垂一个TChart
它的组成部分。
On the design time the TChart
displayed and i can set it up. 在设计时,将显示TChart
,我可以进行设置。
But on the run time there is no TChart
on the web page. 但是在运行时,网页上没有TChart
。
Is there any setting should i configure to use it ? 我应该配置使用它的任何设置吗?
It seems you must use the TChart
with TIWImage
to display it in the webpage. 看来你必须使用TChart
与TIWImage
在网页中显示它。
I found the following method in IntraWeb demos 我在IntraWeb演示中找到了以下方法
// this method copies a TChart to an TIWImage
procedure CopyChartToImage(const aChart: TChart; const aImage: TIWImage);
var
xMetaFile: TMetafile;
xBitmap: TBitmap;
xRect: TRect;
begin
xBitmap := aImage.Picture.Bitmap;
xBitmap.Width := aChart.Width;
xBitmap.Height := aChart.Height;
aImage.Width := aChart.Width;
aImage.Height := aChart.Height;
xRect := Rect(0, 0, aChart.Width, aChart.Height);
aChart.BufferedDisplay := False;
xMetaFile := aChart.TeeCreateMetafile(False, xRect);
try
xBitmap.Canvas.Draw(0, 0, xMetaFile);
finally
FreeAndNil(xMetaFile);
end;
end;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.