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
When I try to use
- (nonnull instancetype)initWithYVals:(NSArray<ChartDataEntry *> * _Nullable)yVals label:(NSString * _Nullable)label OBJC_DESIGNATED_INITIALIZER;
the app crash with this stack trace
This is how I create Data Set
- (void)setChartValues:(NSArray <NSNumber *> *)values labels:(NSArray <NSString *> *)labels { NSMutableArray <ChartDataEntry *> *dataEntry = [NSMutableArray array]; [values enumerateObjectsUsingBlock:^(NSNumber * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { [dataEntry addObject:[[ChartDataEntry alloc] initWithValue:[obj doubleValue] xIndex:idx]]; }]; BarChartDataSet *barChartDataSet = [[BarChartDataSet alloc] initWithYVals:dataEntry label:@"FF"]; barChartDataSet.colors = @[[UIColor colorWithHexString:@"#8cebff"], [UIColor colorWithHexString:@"#c5ff8c"], [UIColor colorWithHexString:@"#ffd28c"]]; BarChartData *barChartData = [[BarChartData alloc] initWithXVals:labels dataSet:barChartDataSet]; self.barChart.data = barChartData; }
UPDATE I change ChartDataEntry into BarChartDataEntry and now works well.
ChartDataEntry
BarChartDataEntry
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When I try to use
- (nonnull instancetype)initWithYVals:(NSArray<ChartDataEntry *> * _Nullable)yVals label:(NSString * _Nullable)label OBJC_DESIGNATED_INITIALIZER;
the app crash with this stack trace
This is how I create Data Set
UPDATE
I change
ChartDataEntry
intoBarChartDataEntry
and now works well.The text was updated successfully, but these errors were encountered: