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

Answered
0
0

Hi,

I have issue with export SciChart to Bitamp. I have to generate pdf report from data. Report contains two charts.

It is possible to render chart in memory and export to bitmap? I know it is possible in WPF but I couldn’t achive this in Android.

Now my solution is that I render this charts on fragments and wait 1s on each to render and then save chart. But this solution is not good. For slower devices chart is not exported correctly.

For example on one device have strange grid (only exported bitmap, fragment with this chart looks good):

Chart

Version
v2
  • You must to post comments
Best Answer
2
0

Hi Marcin,

Yes, it’s possible to render chart in memory. We have an example in our demo application which we use internally for testing of chart export. You can use it as reference for implementing chart export in memory for your application:

 public void exportChartInMemory() {
    final SciChartSurface sciChartSurface = new SciChartSurface(getActivity());

    setRenderSurface(sciChartSurface, renderSurface);
    sciChartSurface.setTheme(themeId);

    initSurface(sciChartSurface);

    SciChartSurfaceExportUtil.prepareSurfaceForExport(sciChartSurface, 800, 600);

    imageView.setImageBitmap(sciChartSurface.exportToBitmap());
}

Hope that this will help you!

Best regards,
Yura

  • Marcin K
    It’s works. Thank You
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

SciChart WPF v6 BETA released! Note pricing/licensing changes are coming. Contact us to beat the rise!Read more
+