views:

24

answers:

0

Dear all,

I wrote the delegate of CPPlotDataSource like this:

-(NSNumber *)numberForPlot:(CPPlot *)plot field:(NSUInteger)fieldEnum recordIndex:(NSUInteger)index {  

    NSNumber *num = [[dataForPlot objectAtIndex:index] valueForKey:(fieldEnum == CPScatterPlotFieldX ? @"x" : @"y")];

    if ([(NSString *)plot.identifier isEqualToString:@"Green Plot"])
    {
        if ( fieldEnum == CPScatterPlotFieldY ) 
            num = [NSNumber numberWithDouble:[NSDecimalNumber notANumber]];  
    }  
    return num;  
}  

In old version of core-plot framework, the chart will not show the data point whit '[NSDecimalNumber notANumber]'.

But in new version, the chart will show a data point at 0.

I just updated my program to new framework, I don't want the chart to show data point at 0 when use '[NSDecimalNumber notANumber]', how can I do?

Thanks!