You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FYI: The code above worked fine in Charts 2.1.6, it was updating to XCode 8 + Swift 2.3 + Charts 2.3.0 that triggered this error. Glad it was a simple fix, thanks again!
Seems related to closed issue #410 (#410) but not fixed by d6cb47e
Error in console:
Could not cast value of type 'Charts.ChartData' (0x100e0e838) to 'Charts.PieChartData' (0x100e183e0).
Crash on line 182 of PieChartView.swift: private func calcAngles():
let yValueSum = (_data as! PieChartData).yValueSum
Error occurs on updated Charts CocoaPod to 2.3.0 and swift 2.3 when upgrading primarily Objective-C codebase from XCode 7 to XCode 8
Objective-C Code triggering this issue:
double resultForPercentage = somevalue;
ChartDataEntry *entry1 = [[ChartDataEntry alloc] initWithValue:resultForPercentage xIndex:0];
ChartDataEntry *entry2 = [[ChartDataEntry alloc] initWithValue:(100.0f - resultForPercentage) xIndex:1];
PieChartDataSet *set1 = [[PieChartDataSet alloc] initWithYVals:@[entry1,entry2]];
goalCell.graphView.data = [[ChartData alloc] initWithXVals:@[@"",@""] dataSets:@[set1]];
which then eventually calls: PieChartView.swift: private func calcAngles():
let yValueSum = (_data as! PieChartData).yValueSum
The text was updated successfully, but these errors were encountered: