Skip to content
New issue

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

ScatterChartDataSet basic initializer causes crashes #4010

Closed
slmille4 opened this issue May 31, 2019 · 1 comment
Closed

ScatterChartDataSet basic initializer causes crashes #4010

slmille4 opened this issue May 31, 2019 · 1 comment

Comments

@slmille4
Copy link

What did you do?

I tried to use the basic ScatterChartDataSet initializer
let set = ScatterChartDataSet(values)
instead of
let set = ScatterChartDataSet(entries: values, label: "DS 1")

What did you expect to happen?

Nothing unusual

What happened instead?

The code crashed. The first program I tried it on crashed at fatalError("Datasets for ScatterChartRenderer must conform to IScatterChartDataSet") in ScatterChartRenderer.swift
, another program crashed with "Simultaneous accesses to 0x600000d386e8, but modification requires exclusive access.
Previous access (a modification) started at Charts`ChartData._leftAxisMax.modify + 61 (0x10499551d)." in ChartData.swift Line 205

Charts Environment

**Charts version/Branch/Commit Number:**3.3.0
Xcode version: Version 10.2.1 (10E1001)
**Swift version:**5
Platform(s) running Charts: ChartDemo-iOS-Swift
macOS version running Xcode:

Change set2 in ScatterChartViewController to
let set2 = ScatterChartDataSet(values2)
set2.setScatterShape(.circle)
set2.scatterShapeHoleColor = ChartColorTemplates.colorful()[3]
// set2.scatterShapeHoleRadius = 3.5
set2.setColor(ChartColorTemplates.colorful()[1])
set2.scatterShapeSize = 8

@liuxuan30
Copy link
Member

better ask on stack overflow given your crash reason. Seems you are using it wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants