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?
- Michael Kollmann asked 7 years ago
- last edited 7 years ago
-
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
-
Hello Andrew, thanks for your quick response! I’ll be waiting patiently :)
-
Nazariy on the team is working on this as we speak.
-
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 …
-
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 login 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
- Nazariy Pelyushkevych answered 7 years ago
- You must login to post comments
Please login first to submit.