We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
No description provided.
The text was updated successfully, but these errors were encountered:
我瞅了瞅源码.是以下方法创建的点上的文字
- (CATextLayer *)createPointLabelFor:(CGFloat)grade pointCenter:(CGPoint)pointCenter width:(CGFloat)width withChartData:(PNLineChartData *)chartData
然后作者使用了一个局部可变数组变量"gradePathArray"去存储实例化的CATextLayer.我们可以弄一个NSArray去记录一下这些layer.这些CATextLayer的实例化在如下方法中
- (void)calculateChartPath:(NSMutableArray *)chartPath andPointsPath:(NSMutableArray *)pointsPath andPathKeyPoints:(NSMutableArray *)pathPoints andPathStartEndPoints:(NSMutableArray *)pointsOfPath { }
self.xxarray = gradePathArray.copy; 然后在调用stokeChart和updateChartData的时候便利一下这个数组.将其中存储的CATextLayer实例化对象removeFromSuperLayer.这样调用这俩方法的时候就会刷新了.
另,这个文字底部的白色默认颜色的问题可以搜索
[textLayer setBackgroundColor:[[[UIColor whiteColor] colorWithAlphaComponent:0.8] CGColor]];
因为这里头有些小细节的问题,具体我也不知道是哪一行了
Sorry, something went wrong.
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: