TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
-
Eskimo
- Newbie
- Posts: 1
- Joined: Tue Oct 06, 2015 12:00 am
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 (54.29 KiB) Viewed 4840 times
The graph should lik this
Complete Graph of the png image:
- Graph.png (152.69 KiB) Viewed 4836 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
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");
}