SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components


Hello SciChart-Team!

I’m trying to export a graph from my application using the “ExportToFile”-method.
This is what my code looks

Chart.ExportToFile(@"C:\Users\miko\Desktop\export.xps", SciChart.Core.ExportType.Xps, false, new Size(2560, 1440));

When this is being called the following exception is being raised

Exception thrown: 'SciChart.Charting.Common.Helpers.ExportException' in SciChart.Charting.dll
Additional information: Exception occured during deserialization of the SeriesSelectionModifier type. The SelectedSeriesStyle property of the Style type cannot be processed. Please be advised that SciChart doesn't handle serialization of objects with propeties of interface type, collection type or custom type.You need to implement IXmlSerializible in such objects to have them handled properly. For more details, please check the InnerException.

This exception seems to be related to the SeriesSelectionModifier I have applied to my chart.

The modifier XAML:

    SelectedSeriesStyle="{StaticResource selectedSeriesStyle}"
    SelectionChanged="seriesSelection_SelectionChanged" />

The style XAML

<Style x:Key="selectedSeriesStyle" TargetType="{x:Type s:FastLineRenderableSeries}">
     <Setter Property="PointMarkerTemplate">
                 Stroke="Black" />

When I remove the SeriesSelectionModifier from my XAML all works as expected.
What am I missing?

  • Andrew Burnett-Thompson
    Hi Michael, thanks for reporting this and for the excellent info. It seems easy to reproduce – just include SeriesSelectionModifier and export. We will try this on our side, and should be able to issue a patch. Best regards, Andrew
  • Michael Kollmann
    Hello Andrew, thanks for your quick response! I’ll be waiting patiently :)
  • Andrew Burnett-Thompson
    Nazariy on the team is working on this as we speak.
  • Andrew Burnett-Thompson
    As a workaround, if you remove the SeriesSelectionModifier temporarily before export, then add it back, it will work. We will have a patch for it shortly …
  • Michael Kollmann
    I’m using the SeriesSelectionModifier to change the style of the selected series and the respective Y-Axis and I want that to be visible in my saved image so that’s not a viable solution, sadly.
  • You must to post comments

Hello Michael, your problem is fixed now in version #v4.2.1.305. Here is an instruction how to get it

Thank you for reporting this problem.
Best regards,
Pelyushkevych Nazar
SciChart WPF\Xamarin developer

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.