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

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy

We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Answered
1
0

Hi,

I’m trying to get the snapshot of SciChart when it’s first loaded to send the rendered graph to an external application without rendering it on the screen in WPF. Calling .ExportToBitmapSource() gets the graph without the data and annotations. I’m currently using v3.2.1.5511. If I bind the function to a button and call the function after it’s rendered, it has no problems and displays it nicely.

this is what my constructor looks like,

        _ChartSurface.Height = 500;
        _ChartSurface.Width = 500;
        _ChartSurface.Measure(new Size(this.ActualWidth, this.ActualHeight));
        _ChartSurface.Arrange(new Rect(new Point(0, 0), this.DesiredSize));
        _ChartSurface.UpdateLayout();

        var bmp = _ChartSurface.ExportToBitmapSource();
        Clipboard.SetImage(bmp);

I have included a sample project for you guys to see what I’m talking about. The image is automatically copied to clipboard, so you can use a paint program to just paste the image. You can download the project from here, the site seems to have problems while uploading zip files. http://www.filedropper.com/scichartshiftedaxissample

Thanks

  • You must to post comments
Best Answer
1
0

Hi Kewur.

Could you try to download the latest build fromNuget and test whether you can reproduce the issue with it? We have recently fixed some regressions in v3.2 related to export to bitmap and I think everything should be ok with latest build.

Thanks in advance.

  • kewur
    I can't seem to find the Nuget package with visual studio, is it still up?
  • Andrew
    You can see our NuGet status here: http://abtsoftware-prd.cloudapp.net:81. It does seem to be up
  • kewur
    OK, turns out my company blocks port 81 (:I managed to test it, and it seems to be fixed now, thank you!P.S: you seem to have fixed some other problems I used to have too, so thanks for that. Axes seem to snap nicely with graphs now.
  • Andrew
    Great!
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.