I need to define colors for graph based on the values(example : green for values between 0-50 and red for values between 50-100).I tried with gradient colors but it is not as expected. Could anyone help me out in this please? I'm using Swift 3.
I need the bottom of the graph to be green and upper part as red
Declare out of class for this code
declate in viewDidLoad Method.