Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
260
Chart is not scaled to page size when printing
posted

I am using a composite chart which I show in the UltraPrintViewDialog. In the Print sample from the SamplesExplorer the chart is automatically nicely scaled to use the entire page.

The left preview is my application, the two red arrows indicate the wrong space.
The right preview is from the print sample.

When I try to achieve the same from my application, the chart is not scaled. The size in the print preview changes when I change the size of the form. In the sample explorer the size of the chart in the preview does not change when the form size changes.

I compiled  the sample on my PC. I use pretty much the same code as in the sample:

 

private void InitializeComponent()
{
    this.preview = new Infragistics.Win.Printing.UltraPrintPreviewDialog(this.components);
    this.preview.Name = "preview";
    this.preview.PreviewSettings.ZoomMode = Infragistics.Win.Printing.ZoomMode.WholePage;
    this.preview.ThumbnailAreaVisible = false;
}

public void PrintPreview()
{
    preview.Document = chart.PrintDocument;
    preview.ShowDialog();
}

 

Any ideas what could cause the behaviour would be greatly appreciated.

Parents
  • 53790
    posted

    Hello DenSys,

    Looking at the provided code everything looks correct.  If you are using the default settings of your UltraChart, you willl achieve desired behavior.

    Maybe you are using some of the properties in ultraChart1.PrintDocument.PrinterSettings or properties from your this.ultraPrintPreviewDialog1.PreviewSettings. If you are using any of these properties you could change the default chart`s behavior (like it is in your left screenshot).

    If you are able to send me your sample, I`ll be glad to research this issue Also please inform me what is you current version and do you have any installed service release and which one.

    Let me know if you have any questions.

    Regards

Reply Children
No Data