Page 1 of 1

With latest version of Teechart.Net, how do you print and/or export the graph as shown?

Posted: Wed Jun 12, 2019 4:58 pm
by 18286055
With the latest version of Steema.TeeChart.NET.Xamarin.Forms (4.2018.10.17), how do you print and/or export the graph as shown?

I've looked at tutorial 14 in http://www.teechart.net/docs/TeeChartNETTutorials.htm but the command "tChart1.Printer.Print();" is not found in visual studio 2019 version 16.1.3. I want to call Xamarin.Essentials.Share and offer the user to email, text, etc. but I'm not able to find any way to print or export.

What i've tried for export (using tutorial 12 as a guide):

Code: Select all

string fileName = Path.Combine(FileSystem.CacheDirectory, FileName);

//ImageExportFormat exporter = new ImageExportFormat(Chart1.Chart); exporter.FileExtension = ".jpg";
//exporter.Save(streamer, new Image(), Chart1.ChartBounds.Width, Chart1.ChartBounds.Height);
//Steema.TeeChart.Export.DataExport exporter = new DataExport(Chart1);
//Steema.TeeChart.Export.DataExportFormat exportFormat = new ExcelFormat(Chart1);
//Steema.TeeChart.Export.PNGFormat png = new PNGFormat(Chart1);

Steema.TeeChart.Export.ImageExport imageExporter = new ImageExport(Chart1) { PNG = { FileExtension = "png", Height = Chart1.ChartBounds.Height, Width = Chart1.ChartBounds.Width} };
imageExporter.PNG.Save(fileName);

Re: With latest version of Teechart.Net, how do you print and/or export the graph as shown?

Posted: Wed Jun 19, 2019 3:31 pm
by Pep
Hello,
With the latest version of Steema.TeeChart.NET.Xamarin.Forms (4.2018.10.17), how do you print and/or export the graph as shown?
I'm afraid we don't have a Chart export or print option to do it directly with the TeeChart for Xamarin.Forms version. We do have the option for each specific TeeChart for Xamarin.iOS version and the TeeChart for Xamarin.Android version, but not for crossplatform code.
A way to do it would be by creating a custom renderer apart from TeeChart, create the image from view and save or export.
We've done an example which does this (still pending to test and verify for iOS). You can find the example here

Re: With latest version of Teechart.Net, how do you print and/or export the graph as shown?

Posted: Thu Jul 18, 2019 4:16 pm
by 18286055
When will this be coming to cross-platform?

Re: With latest version of Teechart.Net, how do you print and/or export the graph as shown?

Posted: Fri Jul 19, 2019 7:57 am
by Pep
Hello,
I've added it as a new feature to be considered for the next maintenance releases. I can't tell a specific date, but we'll try to include it during this quarter.