SChartAnnotation


#1

Hi,

I have got a question for the SChartAnnotation. I want to add two horizantalLinesAtPosition i used this code: 

        SChartAnnotationZooming *lowerThresholdAnnotation = [SChartAnnotationZoominghorizontalLineAtPosition:@4withXAxis:self.xAxisandYAxis:self.yAxiswithWidth:0.3fwithColor:[UIColorredColor]];
         SChartAnnotationZooming *upperThresholdAnnotation = [SChartAnnotationZoominghorizontalLineAtPosition:@8withXAxis:self.xAxisandYAxis:self.yAxiswithWidth:0.3fwithColor:[UIColorredColor]];
        
        [self addAnnotation:lowerThresholdAnnotation];

        [self addAnnotation:upperThresholdAnnotation];
 
Now I have the problem, that the chartView only shows the annotation during scrolling in the chart. But if I do nothing i can't see the annotation. Why is it happening and how can I solve it?

#2

You probably need to call [chart redrawChart] to make these display before moving. This would be called when scrolling through the chart, which is why you can see it after you do so.


#3

Now this ist my code 

        SChartAnnotation *lowerThresholdAnnotation = [SChartAnnotationhorizontalLineAtPosition:@4withXAxis:self.xAxisandYAxis:self.yAxiswithWidth:0.3fwithColor:[UIColorredColor]];
         SChartAnnotation *upperThresholdAnnotation = [SChartAnnotationhorizontalLineAtPosition:@8withXAxis:self.xAxisandYAxis:self.yAxiswithWidth:0.3fwithColor:[UIColorredColor]];
        
        [self addAnnotation:lowerThresholdAnnotation];
        [self addAnnotation:upperThresholdAnnotation];
        

        [self redrawData];
 
 But I have the same problem again. The annotation is not visible after the chart is loaded. If I tap on the screen and scroling, the annotation are visible for a few moment and disappeared again.
 Have you a idea, where i can look for this problem?

#4

Hi Kupferdaechle,

We aren’t aware of any problems with our annotations disapearing like you’re describing. It’ll be much easier for us to look into this issue once we can replicate it on our end. Would it be possible to extract your chart into a cut-down sample application that you could share? (Or email it to us at info@shinobicontrols.com referncing this forum post.)

Thanks,
Jan