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?
- Brian Smith asked 5 years ago
- last active 11 months ago
To whom this may concern:
I have a Custom Renderable Series that I use to draws a polygon around the points on a scatter plot.
protected override void Draw(IRenderContext2D renderContext, IRenderPassData renderPassData)
{
base.Draw(renderContext, renderPassData);
var blobShellPoints = getBlobShellPoints();
using (var polyPen = renderContext.CreateBrush(Colors.DodgerBlue, 0.3))
{
var startCoordinates = getCoordinatesFor(blobShellPoints[0].X, blobShellPoints[0].Y);
using (var blobDrawingContext = renderContext.BeginPolygon(polyPen, startCoordinates.X, startCoordinates.Y))
{
foreach (var point in blobShellPoints)
{
var pointCoords = getCoordinatesFor(point.X, point.Y);
blobDrawingContext.MoveTo(pointCoords.X, pointCoords.Y);
}
}
}
}
I would like to know if there is some way to show a tooltip when the mouse hovers over the said drawn polygon. I don’t see any ability to do this after I finish creating the polygon or before the end of the encapsulated polyPen disposable. It should look something like the attached image.
Can you please advise? Thank you kindly for your response!
P.S. I realize some of this code may be obsolete since I’m using SciChart 5. If this is only possible in 6+ then that’s understandable.
- Ari Sagiv asked 2 years ago
- last active 2 years ago
When I work with the 2D Android Heatmap Chart, I want to draw a frame on the borders of the cells. Is this possible?
Thanks already for your help.
- MUSTAFA KELSAKA asked 3 years ago
- last active 3 years ago