I’m trying to export a surface to an image running this simple line of code:
SciChartSurface.ExportToBitmapSource(false, null);
and it works, but the size of exported image is not good enough for me, so I’m trying this line of code:
SciChartSurface.ExportToBitmapSource(false, size);
But that’s what I’m getting:
System.Windows.Markup.XamlParseException: ''No matching constructor found on type 'SciChart.Charting.Model.ChartData.XySeriesInfo'. You can use the Arguments or FactoryMethod directives to construct this type.' Line number '1' and line position '1884'.'
I would appreciate any help,
Thank you.
- Alexander Gulbit asked 4 years ago
- You must login to post comments
Good morning Alexander,
The SciChartSurface.ExportToBitmapSource overload with a Size has to perform some complex internal actions in order to render a chart with a different size. Namely, we must create a clone (copy) of the current SciChartSurface and try to arrange it in memory before rendering off-screen. This process is error prone if you have customised the chart (customised types, styles etc…) and we have some guidance here of how to solve these kinds of problems.
Troubleshooting and Caveats when Exporting Chart Images
First of all I would suggest to take a look at our standard built-in Export example which should work out of the box (even at size).
Next, if you have customised the chart in any way, let us know how or where with code samples. We can then suggest a way to workaround the cloning issue required for export at size.
Best regards,
Andrew
- Andrew Burnett-Thompson answered 4 years ago
- You must login to post comments
Please login first to submit.