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

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
TLC
Newbie
Newbie
Posts: 59
Joined: Mon Apr 08, 2019 12:00 am

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

Post by TLC » Wed Jun 12, 2019 4:58 pm

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);

Pep
Site Admin
Site Admin
Posts: 3272
Joined: Fri Nov 14, 2003 5:00 am
Contact:

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

Post by Pep » Wed Jun 19, 2019 3:31 pm

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

TLC
Newbie
Newbie
Posts: 59
Joined: Mon Apr 08, 2019 12:00 am

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

Post by TLC » Thu Jul 18, 2019 4:16 pm

When will this be coming to cross-platform?

Pep
Site Admin
Site Admin
Posts: 3272
Joined: Fri Nov 14, 2003 5:00 am
Contact:

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

Post by Pep » Fri Jul 19, 2019 7:57 am

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.

Post Reply