Pre loader

ExportToBitmapSource fails when the size parameter is not null.

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

0
0

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.

Version
5.4
  • You must to post comments
0
0

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

  • 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