Page 1 of 1
Save Image of Multiple Chart
Posted: Fri Oct 31, 2014 11:33 am
by 9526439
Hi Steema,
We want to save the single image of Multiple opened charts in different tiled windows as shown in image. as shown in attached image
- Save Image of Multiple Chart
- save as image.png (135.54 KiB) Viewed 15007 times
Please provide any solution asap.
Thanks in advance.
Thanks&Regards
Plano Research
Re: Save Image of Multiple Chart
Posted: Fri Oct 31, 2014 11:52 am
by Christopher
Hello!
This isn't really a TeeChart issue per se, as TeeChart is perfectly capable of exporting itself to an image.
If you want to combine two (or more) images to one image, you can create a new bitmap then paint each image onto it. First
create a bitmap at runtime, then
create the graphics from the image and then use this graphics to draw your images to it.
Re: Save Image of Multiple Chart
Posted: Thu Nov 13, 2014 12:35 pm
by 9526439
Hi
We are creating a application in window form conatins a panel and Panel contains Teechart and few textboxes and labels. We are trying to implement functionality "save as image" of all contents of panel. All contents saved as image but teechart is not exported as image. We are using this code below:
using (Bitmap bitmap = new Bitmap(panel2.ClientSize.Width,
panel2.ClientSize.Height))
{
panel2.DrawToBitmap(bitmap, panel2.ClientRectangle);
bitmap.Save(deskTopPath + @"/snap_" + snapCount.ToString() + @".png", ImageFormat.Png);
}
How to achive this functionality?
Please reply soon.
Thanks
Plano
Re: Save Image of Multiple Chart
Posted: Thu Nov 13, 2014 12:50 pm
by 9526439
Hi Team,
A demo project is attached of above mail. Please find.
Thanks
Plano Team
Re: Save Image of Multiple Chart
Posted: Thu Nov 13, 2014 2:52 pm
by Christopher
amol wrote:
A demo project is attached of above mail. Please find.
This seems to be a limitation of the
Control.DrawToBitmap Method:
The DrawToBitmap method is not supported for ActiveX controls. You can override the OnPrint event and provide custom printing logic if required.
The DrawToBitmap method has the following limitations:
An ArgumentException might be thrown for large bitmaps. The maximum allowable size varies by machine.
DrawToBitmap does not support the Ink controls for the Windows XP Tablet PC Edition 2005 operating system.
DrawToBitmap does not draw a child TextBox if the Visible property of the TextBox is set to false.
Controls inside containers are rendered in reverse order.
DrawToBitmap is not fully functional for the RichTextBox; only the border of a bitmap is drawn.
If DrawToBitmap cannot even render Microsoft's own controls such as RichTextBox, then I'm afraid it doesn't surprise me that TeeChart is not being rendered.
Re: Save Image of Multiple Chart
Posted: Fri Nov 14, 2014 5:41 am
by 9526439
Hi Steema,
Please provide me the solution for that.
Thanks
Plano
Re: Save Image of Multiple Chart
Posted: Fri Nov 14, 2014 9:26 am
by Christopher
amol wrote:
Please provide me the solution for that.
I think I have already suggested a solution to this issue in my post
here:
Code: Select all
If you want to combine two (or more) images to one image, you can create a new bitmap then paint each image onto it. First create a bitmap at runtime, then create the graphics from the image and then use this graphics to draw your images to it.
The issue with TeeChart not rendering to a Panel's bitmap is a Microsoft issue, not a Steema issue, I'm afraid.
Re: Save Image of Multiple Chart
Posted: Fri Nov 14, 2014 9:52 am
by 9526439
Hi Steema
Please create a sample application.
Thanks
Plano
Re: Save Image of Multiple Chart
Posted: Fri Nov 14, 2014 9:59 am
by Christopher
amol wrote:
Please create a sample application.
With all due respect, I feel this is a generic programming issue and not one specific to either the TeeChart API or the TeeChart source code.
May I suggest that you make the first attempt at this, and if you are unsuccessful then please post your code here so that I can help you with it.