I am trying to achieve an background image which marks some chart area (live image for a chart on which a path is drawn).
I have managed to display the image on the chart but it does not stretch when im zooming (I maintain the aspect ratio).
Code from your example:
//Add a nice Pi logo to the background
SChartAnnotationZooming *icon = [[SChartAnnotationZoomingalloc] initWithFrame:CGRectMake(0, 0, 1, 1)];
icon.xValue = [NSNumbernumberWithInt:0];
icon.yValue = [NSNumbernumberWithInt:0];
icon.stretchToBoundsOnX = NO;
icon.stretchToBoundsOnY = NO;
icon.position = SChartAnnotationBelowData;
UIImageView *iconView = [[UIImageViewalloc] initWithImage:[UIImageimageNamed:@“pi.png”]];
icon.alpha = 0.1f;
I assigned the yValueMax and xValueMax values.
I tried changing the stretch to bounds (yup its the image size only). What should be done? What to change to make it happen? Should I override the:
method? The image is supose to be clipped to the given range and just be stretched with the chart itself.
Thank you in advance.