Skip to content

Index out of bounds exception in v3.2 in createAccessibleElement #3659

@simonbengtsson

Description

@simonbengtsson

After updating to charts 3.2 I started getting Fatal error: Index out of range in the new BarChartRenderer#createAccessibleElement():809. It seems this code dataSet.stackLabels[idx % stackSize] makes stackLabels required?

My workaround for now is to always specify stackLabels. Can be done with something like this:

let dataSet = BarChartDataSet(values: entries, label: nil)
dataSet.stackLabels = [String](repeating: "", count: dataSet.stackSize)

Charts Environment

Charts version: 3.2
Xcode version: 10
Swift version: 4.2
Platform: iOS
macOS: 10.13.6

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions