Jump to content
Software FX Community

Exporting of financial chart in image format of jpeg/png


Vineet

Recommended Posts

Posted

Hi,

  I want to export financial chart in chartFX7 in image format. Only type that is availabe is bitmap. Which is huge in size. Is it possible to export chart fx 7 in jpeg or png format.

 chrtTool.Export(ChartFX.WinForms.FileFormat.Bitmap, AppSetting.ImageGenerationPath() + contractname + ".png");

Above line is the code for doing it. Currently i am using VS.Net 2008 with 3.5 Framework. This is windows application.

Thanks Vineet Nair.

Posted

Unfortunate, exporting the chart to a png image is not supported by ChartFX 7 (Windows Forms).

You can try to  export the chart to a MemoryStream object and the use an Image object to save the chart as a png image. Use the following code:

MemoryStream memoryStream = new MemoryStream();

chrtTool.Export(ChartFX.WinForms.FileFormat.Bitmap, memoryStream);

Image image = Bitmap.FromStream(memoryStream);

image.Save(string.Concat(AppSetting.ImageGenerationPath(), contractname, ".png"), System.Drawing.Imaging.ImageFormat.Png);  

memoryStream.Close();  

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...