XIV v14.0.49を使用Delphi XE8
して、コンポーネントを作成し、その上に垂下しました。IntraWeb
TIWForm
TChart
設計時にTChart
表示され、設定できます。
しかし、実行時にはTChart
Webページにはありません。
それを使用するために構成する必要がある設定はありますか?
TChart
withを使用TIWImage
して Web ページに表示する必要があるようです。
IntraWeb demos で次のメソッドを見つけました
// 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;