Exported graph is incomplete

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Eskimo
Newbie
Newbie
Posts: 1
Joined: Tue Oct 06, 2015 12:00 am

Exported graph is incomplete

Post by Eskimo » Thu Aug 18, 2016 8:16 am

There is only one half of the graph in the exported image when first a pdf and immediatly after a png image is exported.
The exported pdf is right, but the png is drawn incorrectly. TeeChart .net version 4.1.2016.5122

Incomplete Graph of the png image:
IncompleteGraph.png
IncompleteGraph.png (54.29 KiB) Viewed 4689 times
The graph should lik this
Complete Graph of the png image:
Graph.png
Graph.png (152.69 KiB) Viewed 4685 times
Code snippet:

Code: Select all

Steema.TeeChart.Export.PDFFormat pdf = MyTeeChart.Chart.Export.Image.PDF;
pdf.Height = 1062;
pdf.Width = 1889;
pdf.Save(filename + ".pdf");

Steema.TeeChart.Export.PNGFormat png = MyTeeChart.Chart.Export.Image.PNG;
png.Height = 1062;
png.Width = 1889;
png.Save(filename + ".png");
Best regards
T. Harder

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Exported graph is incomplete

Post by Christopher » Thu Aug 18, 2016 11:29 am

Hello,

A call to TChart.Draw() resolves the problem, e.g.

Code: Select all

    private void button4_Click(object sender, EventArgs e)
    {
      string filename = @"D:\tmp\probexport1";
      Steema.TeeChart.Export.PDFFormat pdf = tChart1.Export.Image.PDF;
      pdf.Height = 1062;
      pdf.Width = 1889;
      pdf.Save(filename + ".pdf");

      tChart1.Draw();

      Steema.TeeChart.Export.PNGFormat png = tChart1.Export.Image.PNG;
      png.Height = 1062;
      png.Width = 1889;
      png.Save(filename + ".png");
    }
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply