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

No circle is drawn on a line chart when there is only one data. (version 3.2.2 only) #3848

Closed
mock123 opened this issue Feb 17, 2019 · 3 comments

Comments

@mock123
Copy link

mock123 commented Feb 17, 2019

What did you do?

I updated the Charts library from 3.2.1 to 3.2.2.

What did you expect to happen?

When a line chart has just "one" entry data, the chart shows a circle to indicate the data.

v3.2.1 (with highlight / It draws a circle. correct.)

v3.2.1 (without highlight / It draws a circle. correct.)

What happened instead?

No circle was drawn on the chart.
*chartDataSet.drawCirclesEnabled is always set as TRUE.

The problem happens when there is only "one" entry.
(But if there are more than two entries, it works fine.)

v3.2.2 (with highlight / No circle was drawn. wrong)

v3.2.2 (without highlight / No circle was drawn. wrong)

*When I switch it back to the version 3.2.1, it draws a circle (expected behavior).

Charts Environment

Charts version/Branch/Commit Number: 3.2.2 (latest version)
Xcode version: 10.1 (latest version)
Swift version: 4.2.1 (latest version)
Platform(s) running Charts: iOS
macOS version running Xcode: Mojave 10.14.3 (latest version)

Sample Code

let chartDataSet = LineChartDataSet(values: dataEntries, label: nil)
chartDataSet.setCircleColor(.blue)
chartDataSet.drawCirclesEnabled = true
chartDataSet.circleRadius = 1.0

lineChartView.data = LineChartData(dataSet: chartDataSet)

FYI

The issues/fixes below may be related to this problem.
#3798
#3164

@lorenzOliveto
Copy link

I'm experiencing the same issue, also, adding more points the first circle is not displayed.

@staticVoidMan
Copy link

Actually, the first point doesn't have a circle. It doesn't matter if there's only one data point or more.

@jjatie
Copy link
Collaborator

jjatie commented Mar 9, 2019

Resolved by #3891

@jjatie jjatie closed this as completed Mar 9, 2019
@ChartsOrg ChartsOrg locked as resolved and limited conversation to collaborators Mar 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants