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

Change LineColor Stroke when graph already displayed #37

Open
inkrementz opened this issue Aug 2, 2016 · 0 comments
Open

Change LineColor Stroke when graph already displayed #37

inkrementz opened this issue Aug 2, 2016 · 0 comments
Labels

Comments

@inkrementz
Copy link

I have my Graph already displayed. If I tap on a button, i'd like to change the strokecolor of the lineLayer. So I added this in the class:

public func changeLineColor(color : UIColor) {    
  lineLayer?.strokeColor = color.CGColor
}

But if I call it from my view like: myGraph.changeLineColor(myColor) , it will return the error:

fatal error: use of unimplemented initializer 'init(layer:)' for class 'TestGraph.ScrollableGraphViewDrawingLayer'

I can still change the background color by adding this function and it works:

public func changeBackgroundColor(color : UIColor) {
drawingView.backgroundColor = color
}

BUT do you have any idea why I can't change the linecolor ? :/ thanks !!

@philackm philackm added the bug label Dec 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants