SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
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 v18.104.22.16811. 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
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.
Please login first to submit.