Я использую CorePlot в своем приложении и хочу отобразить аннотацию на plotSymbol.Я не нашел никакого кода в примерах проектов последней версии 0.9 CorePlot.После некоторого исследования я пришел к этой точке:
- (void)scatterPlot:(CPTScatterPlot *)plot plotSymbolWasSelectedAtRecordIndex:(NSUInteger)index
{
CPTLayerAnnotation *annot = [[CPTLayerAnnotation alloc]initWithAnchorLayer:graph];
CPTBorderedLayer * logoLayer = [[(CPTBorderedLayer *) [CPTBorderedLayer alloc] initWithFrame:CGRectMake(10,10,100,50)] autorelease];
CPTFill *fillImage = [CPTFill fillWithImage:[CPTImage imageForPNGFile:@"whatEver!"]];
logoLayer.fill = fillImage;
annot.contentLayer = logoLayer;
annot.rectAnchor=CPTRectAnchorTop;
[graph addAnnotation:annot];
}
Но это, очевидно, не работает .... Кто-нибудь может мне помочь?
Моя цель - получить аннотацию по выбранному сюжетусимвол, похожий на аннотации в MKMapView.
Обновление
Это DatePlot, просто чтобы прояснить ситуацию, и он работает с временными интервалами с 2001 года по оси X.