How to draw the chart to a metafile.


This example uses the PaintTo method to draw the chart to a metafile canvas.

var
  emf: TMetaFile;
  emfcvs: TMetafileCanvas;
begin
  emf := TMetafile.Create();
  try
    emf.Enhanced := true;
    emf.Width := RAC.ClientWidth;
    emf.Height := RAC.ClientHeight;
    emf.MMWidth := 0;
    emf.MMHeight := 0;
    emfcvs := TMetafileCanvas.Create(emf, 0);
    try
      RAC.PaintTo(emfcvs, RAC.ClientRect, RAC.FirstDisplayedIndex);
    finally
      emfcvs.Free;
    end;
    emf.SaveToFile('RAC.emf');
  finally
    emf.Free;
  end;
end;
What People Say

This is a great component. I've been using it for a year. It's well written, performance is top notch, and the couple of time I've asked for support, I've gotten it right away from the author.
Steve McForest
More …

No malware No spam
McAfee Site Report
Web of Trust