Silverlight chart export

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Farsider
Newbie
Newbie
Posts: 7
Joined: Thu Dec 16, 2004 5:00 am

Silverlight chart export

Post by Farsider » Fri Jun 12, 2009 8:21 pm

Hi,

I am a current customer using TeeChart for ActiveX and I am evaluating TeeChart for .NET 2009 with Silverlight. I noticed that the Silverlight TeeChart DLL does not support chart export to either JPEG or PNG. When will this feature be available?

I also modified your Silverlight example code to export its chart to PDF by adding the following code:

Code: Select all

tChart1.Export.Image.PDF.Save("tempChart.pdf");
When I attempted to open tempChart.pdf with Adobe Acrobat, all I saw was a blank page. What am I doing incorrectly?

I also noticed that if I export a chart to XAML I get illegal XAML such as

Code: Select all

<Line X1="247.954473252443" X2="245.318184344495" Y1="215.335953284886" Y2="235.082315799269" Stroke="#FF293D62" StrokeDashArray="{Binding Source={x:Static DashStyles.}, Path=Dashes}" StrokeDashCap="Round"/>
When I attempt to parse this XAML, the XAML parser chokes on "DashStyles." Is there something that I am doing wrong?

Our current product that uses the ActiveX version exports charts to JPEG files for printing and reporting purposes. Is there any way that you know of to accomplish this goal with the Silverlight product?

Thanks,
Rob

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Silverlight chart export

Post by Narcís » Mon Jun 15, 2009 10:24 am

Hi Farsider,
I am a current customer using TeeChart for ActiveX and I am evaluating TeeChart for .NET 2009 with Silverlight. I noticed that the Silverlight TeeChart DLL does not support chart export to either JPEG or PNG. When will this feature be available?
Silverlight 2.0 does not contain encoders for JPEG and PNG files. In WPF, there are the following two classes:

System.Windows.Media.Imaging.JpegBitmapEncoder
System.Windows.Media.Imaging.PngBitmapEncoder

These two classes are not present in Silverlight 2.0 and so JPEG and PNG files cannot be created.
I also modified your Silverlight example code to export its chart to PDF by adding the following code:

Code: Select all
tChart1.Export.Image.PDF.Save("tempChart.pdf");


When I attempted to open tempChart.pdf with Adobe Acrobat, all I saw was a blank page. What am I doing incorrectly?
I'm afraid this is a bug (TW24014237) which I have added to the defect list to be fixed for next releases.
I also noticed that if I export a chart to XAML I get illegal XAML such as

Code: Select all
<Line X1="247.954473252443" X2="245.318184344495" Y1="215.335953284886" Y2="235.082315799269" Stroke="#FF293D62" StrokeDashArray="{Binding Source={x:Static DashStyles.}, Path=Dashes}" StrokeDashCap="Round"/>


When I attempt to parse this XAML, the XAML parser chokes on "DashStyles." Is there something that I am doing wrong?
How are you exporting the XAML file? Doing so as with PDF I get the same error.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Farsider
Newbie
Newbie
Posts: 7
Joined: Thu Dec 16, 2004 5:00 am

Re: Silverlight chart export

Post by Farsider » Mon Jun 15, 2009 12:16 pm

I am exporting the chart to XAML the same way I am exporting it to PDF. I am using the TeeChart Export property.

Code: Select all

tChart1.Export.Image.XAML.Save("tempChart.xaml");
Given that I cannot export a Silverlight TeeChart as JPEG, PNG, or XAML, do you have any guidance as to how I can export a chart from my Silverlight application such that it can be easily published to another webpage or Word document?

Thanks,
Rob

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Silverlight chart export

Post by Narcís » Mon Jun 15, 2009 1:49 pm

Hi Rob,

What about other image format supported as EPS, SVG or VML?
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Farsider
Newbie
Newbie
Posts: 7
Joined: Thu Dec 16, 2004 5:00 am

Re: Silverlight chart export

Post by Farsider » Mon Jun 22, 2009 1:27 pm

Our application is a business application that executives use to create and export presentations. None of the suggested formats (EPS, SVG, VML) are easily imported into a Word document or PowerPoint presentation.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Silverlight chart export

Post by Narcís » Tue Jun 23, 2009 1:00 pm

Hi Farsider,

At the moment Teechart.Silverlight.dll does not export to bmp, png or jpeg. We've just found some information to create a png image in silverlight here:

http://blogs.msdn.com/jstegman/archive/ ... light.aspx

However, it does say:
On the flip side, the dynamically generated image is not well suited for local storage since its not compressed.
It’s acceptable for you using uncompressed PNG files? If so we could try and implement the above technique in the next maintenance release.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply