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

How to include a gap between data points & lines #2251

Closed
JohnW808 opened this issue Mar 16, 2017 · 1 comment
Closed

How to include a gap between data points & lines #2251

JohnW808 opened this issue Mar 16, 2017 · 1 comment

Comments

@JohnW808
Copy link

I'm using iOS-Charts with Swift to draw line charts, and I'm looking for a way to place a gap between the data points (circles) and the lines themselves.

Something like this: Example

I've tried playing around with some values under the drawLinear section of LineChartRenderer.swift, but I don't know enough about Core Graphics to do anything useful.

Having a white outline for the circles is unfortunately not an option, since I'm displaying multiple datasets with images containing transparent layers, and the datasets need to be able to overlap (as in the example image)

Apologies if this is was not the right place to ask this, I'm new here. Any help would be greatly appreciated :)

@liuxuan30
Copy link
Member

I used to do something similar. Just take a look at

    /// The radius of the drawn circles.
    open var circleRadius = CGFloat(8.0)
    
    /// The hole radius of the drawn circles
    open var circleHoleRadius = CGFloat(4.0)

and the drawCircles() function to know how it applies those radius.

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