【问题标题】:best way to duplicate teeChart to ReportBuilder for printing purposes将 teeChart 复制到 ReportBuilder 以进行打印的最佳方法
【发布时间】:2019-10-01 13:34:12
【问题描述】:

我有一个包含 32 个系列和 6 个自定义轴的 TeeChart。我需要打印此图表,并且我们在软件中的其他任何地方都使用 ReportBuilder 来打印图表(屏幕上首先会出现打印预览)。我们使用 CloneChart 方法将图表复制到 ReportBuilder。使用此图表,我们遇到了图表不完全可见的问题,就像它没有拉伸一样。 我还注意到自定义轴在 ReportBuilder 中不可见。 我的目标是在 ReportBuilder 中为打印目的在表单上提供 TeeChart 的精确副本。

我尝试复制自定义轴,在 ReportBuiled ppChart 中添加了自定义轴。重点是该系列是在运行时创建的。嗯,我需要将系列与正确的自定义轴或其他东西联系起来。 我尝试了其他几种方法来搜索拉伸,但均未成功。

    for i := 0 to aChartSource.SeriesCount - 1 do
    begin
      if aChartSource[i].Active then
      begin
        s := CloneChartSeries(aChartSource[i]);
        s.ParentChart               := AChartTarget.Chart;
        s.GetVertAxis.Grid.Visible  := (s.GetVertAxis.Grid.Visible and aShowGrid);
        s.GetHorizAxis.Grid.Visible := (s.GetHorizAxis.Grid.Visible and aShowGrid);
        s.Marks.Visible             := (s.Marks.Visible and aShowMarks);
        s.OnGetMarkText             := GetMarkText;

        for ii := 0 to AChartSource[i].Count -1 do
        begin
          if (s.ValueColor[ii] <> AChartSource[i].ValueColor[ii]) then
          begin
            s.ValueColor[ii] := AChartSource[i].ValueColor[ii];
            vRedraw := TRUE;
          end;
        end;
      end;
    end;
    { Duplicate the axis }
    for i := 0 to aChartSource.CustomAxes.Count - 1 do
    begin
      ppchrtKPI.Chart.CustomAxes.Add;
      LAxis.
      LAxis := ppchrtKPI.Chart.CustomAxes[ppchrtKPI.Chart.CustomAxes.Count-1];
      LAxis.Assign(aChartSource.CustomAxes[i]);
    end;

ReportBuilder 的 PrintPreview 表单上的输出是包含系列的图表,但没有自定义垂直轴。 ReportBuilder 中的 Techart 似乎被裁剪了;底部 X 轴附近的系列不可见

【问题讨论】:

    标签: teechart reportbuilder


    【解决方案1】:

    正如here 所说,自定义轴的问题听起来像是在 v2018.24.180321 中修复的票 #780

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-10-09
      • 2011-07-20
      • 1970-01-01
      • 1970-01-01
      • 2010-09-26
      • 2021-11-09
      • 1970-01-01
      相关资源
      最近更新 更多