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
Given that I have an array of BarChartDataSet which is let dataSets [4 entries, 3 entries, 1 entry].
Then I make a BarChartData(dataSets: dataSets) with that set.
When I render the bar chart with that data set it will crash at BarChartRenderer.
I found out that the ChartData > maxEntryCountSet implementation is wrong.
It returns 1 in my example in stead of 4.
I think the fixing should be
/// The DataSet object with the maximum number of entries or null if there are no DataSets.
@objc open var maxEntryCountSet: Element?
{
return self.max { $0.entryCount < $1.entryCount }
}
Charts Environment
Charts version/Branch/Commit Number: 4.0.2 Xcode version: 13.2.1 Swift version: 5.2.4 Platform(s) running Charts: iOS macOS version running Xcode: 12.3
The text was updated successfully, but these errors were encountered:
What did you do?
Given that I have an array of
BarChartDataSet
which islet dataSets [4 entries, 3 entries, 1 entry]
.Then I make a
BarChartData(dataSets: dataSets)
with that set.When I render the bar chart with that data set it will crash at
BarChartRenderer
.with an out of exception of index out of range.
What did you expect to happen?
It should not crash.
What happened instead?
I found out that the ChartData > maxEntryCountSet implementation is wrong.
It returns 1 in my example in stead of 4.
I think the fixing should be
Charts Environment
Charts version/Branch/Commit Number: 4.0.2
Xcode version: 13.2.1
Swift version: 5.2.4
Platform(s) running Charts: iOS
macOS version running Xcode: 12.3
The text was updated successfully, but these errors were encountered: