Pre loader

ExportToFile leads to an ExportException

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1
0

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:

<s:SeriesSelectionModifier
    x:Name="seriesSelection
    SelectedSeriesStyle="{StaticResource selectedSeriesStyle}"
    SelectionChanged="seriesSelection_SelectionChanged" />

The style XAML

<Style x:Key="selectedSeriesStyle" TargetType="{x:Type s:FastLineRenderableSeries}">
     <Setter Property="PointMarkerTemplate">
         <Setter.Value>
             <ControlTemplate>
                 <s:EllipsePointMarker
                 Width="6"
                 Height="6"
                 Fill="White"
                 Stroke="Black" />
            </ControlTemplate>
         </Setter.Value>
     </Setter>
 </Style>

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

Version
4.2.0.9227
  • 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
0
0

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

http://support.scichart.com/index.php?/Knowledgebase/Article/View/17232/37/getting-nightly-builds-with-nuget

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.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies