Vineet Posted October 13, 2008 Report Posted October 13, 2008 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.
CarlosC Posted October 15, 2008 Report Posted October 15, 2008 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();
Recommended Posts
Archived
This topic is now archived and is closed to further replies.