【问题标题】:Delphi - how i can use TChart with IntraWebDelphi - 我如何将 TChart 与 IntraWeb 一起使用
【发布时间】:2015-12-22 19:38:50
【问题描述】:

我将Delphi XE8IntraWeb XIV v14.0.49 一起使用,我创建了一个TIWForm,并在其上放置了一个TChart 组件。

在设计时显示TChart,我可以设置它。

但在运行时网页上没有TChart

我应该配置任何设置来使用它吗?

【问题讨论】:

  • 您使用的是 Delphi 附带的 TeeChart 库还是 TeeChart 库的 PRO 版本?据我所知,您需要 TeeChart 库的专业版才能在 IntraWeb 应用程序中使用 TChart 组件。
  • @SilverWarior 是的,我正在使用 Delphi 附带的 TeeChart 库。但根据他们网站上 TeeChart lib 的功能矩阵,它似乎支持 IntraWeb steema.com/feature_matrix/vcl 检查TeeChart Standard in RAD Studio

标签: delphi teechart intraweb


【解决方案1】:

看来您必须使用TChartTIWImage 才能在网页中显示它。

我在 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;

For more information

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-01-14
    • 1970-01-01
    • 2017-12-02
    • 1970-01-01
    • 2017-12-27
    • 1970-01-01
    • 2012-11-10
    相关资源
    最近更新 更多