Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.8.9 bug. #450

Open
cywd opened this issue Nov 23, 2018 · 0 comments
Open

Release 0.8.9 bug. #450

cywd opened this issue Nov 23, 2018 · 0 comments

Comments

@cywd
Copy link

cywd commented Nov 23, 2018

PNRadarChart can not change plotColor.

self.radarChart.plotColor = [UIColor yellowColor];

This is code in PNRadarChart.m (Release 0.8.9).

- (void)strokeChart {
    
    [self calculateChartPoints];
    [self setNeedsDisplay];
    [_detailLabel setHidden:YES];
    
    //Draw plot
    [_chartPlot removeAllAnimations];
    UIBezierPath *plotline = [UIBezierPath bezierPath];
    CGPoint beginPoint = [[_pointsToPlotArray objectAtIndex:0] CGPointValue];
    [plotline moveToPoint:CGPointMake(beginPoint.x, beginPoint.y)];
    for(NSValue *pointValue in _pointsToPlotArray){
        CGPoint point = [pointValue CGPointValue];
        [plotline addLineToPoint:CGPointMake(point.x ,point.y)];
        
    }
    [plotline setLineWidth:1];
    [plotline setLineCapStyle:kCGLineCapButt];
    
    _chartPlot.path = plotline.CGPath;

    [self addAnimationIfNeeded];
    [self showGraduation];
}

This is code in PNRadarChart.m (Now Master Souce Code).

- (void)strokeChart {
    
    [self calculateChartPoints];
    [self setNeedsDisplay];
    [_detailLabel setHidden:YES];
    
    //Draw plot
    [_chartPlot removeAllAnimations];
    UIBezierPath *plotline = [UIBezierPath bezierPath];
    CGPoint beginPoint = [[_pointsToPlotArray objectAtIndex:0] CGPointValue];
    [plotline moveToPoint:CGPointMake(beginPoint.x, beginPoint.y)];
    for(NSValue *pointValue in _pointsToPlotArray){
        CGPoint point = [pointValue CGPointValue];
        [plotline addLineToPoint:CGPointMake(point.x ,point.y)];
        
    }
    [plotline setLineWidth:1];
    [plotline setLineCapStyle:kCGLineCapButt];
    
    _chartPlot.path = plotline.CGPath;
    
    _chartPlot.fillColor = _plotColor.CGColor;

    [self addAnimationIfNeeded];
    [self showGraduation];

//    self.transform = CGAffineTransformMakeRotation(-M_PI_2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant