Hi,
Actually, i am trying to export multiple charts to one pdf file but i am not able to do that.
i can export one char to a file using this way(Steema.TeeChart.Export.PDFFormat.SaveToFile(TChart2.Chart, "c:\test.pdf")) but still i am getting the wrong format(its coming up with funny looks)
if we can't add multiple charts into a pdf file so can we add multiple charts into jpeg or any other image format?
please help me out to solve my problem.
Thanks in advance.
Export multiple charts to a pdf file (help)
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi DaveR,
I'm afraid this is not possible for now. I' ve added your request to our wish-list to be considered for inclusion in future releases.Actually, i am trying to export multiple charts to one pdf file but i am not able to do that.
Could you please let us know the exact TeeChart version you are using and send us an image of that chart and corresponding pdf document? You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.i can export one char to a file using this way(Steema.TeeChart.Export.PDFFormat.SaveToFile(TChart2.Chart, "c:\test.pdf")) but still i am getting the wrong format(its coming up with funny looks)
Yes, this is possible doing something like this:if we can't add multiple charts into a pdf file so can we add multiple charts into jpeg or any other image format?
Code: Select all
TChart tChart1 = new TChart();
TChart tChart2 = new TChart();
tChart1.Width = 300;
tChart1.Height = 200;
tChart2.Width = 300;
tChart2.Height = 200;
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line1.FillSampleValues();
Steema.TeeChart.Styles.Line line2 = new Steema.TeeChart.Styles.Line(tChart2.Chart);
line2.FillSampleValues();
MemoryStream stream1 = new MemoryStream();
tChart1.Export.Image.JPEG.Save(stream1);
Image img1 = System.Drawing.Image.FromStream(stream1);
MemoryStream stream2 = new MemoryStream();
tChart2.Export.Image.JPEG.Save(stream2);
Image img2 = System.Drawing.Image.FromStream(stream2);
Bitmap img3 = new Bitmap(img1.Width, img1.Height + img2.Height);
Graphics gfx = Graphics.FromImage(img3);
gfx.DrawImage(img1, new Point(0, 0));
gfx.DrawImage(img2, new Point(0, img1.Height));
img3.Save("FinalChart.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
Best Regards,
Narcís Calvet / 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 |