Pre loader

Tag: uiimage

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

1 vote
5k views

I’m try to generate a UIImage from a SCIChartSurface into a graphic context using the code below from a view that is not displayed on the screen. The image created is pure black, which indicates it did not draw. If I display the graph in a view on the devices screen, the graph draws correctly.

UIGraphicsBeginImageContextWithOptions(self.chart.bounds.size, NO, 0.0);
[self.chart drawViewHierarchyInRect:self.chart.bounds afterScreenUpdates:YES];
UIImage *chartImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

Are there any special steps that are needed to draw into a graphic context?

Showing 1 result

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies