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

Added bar gradient #3225

Closed
wants to merge 16 commits into from
Closed
Prev Previous commit
Next Next commit
Used default palette for gradients
alekzuz committed Mar 29, 2018
commit 4f9b35c503f90e92d316ecea87857988585d272d
12 changes: 4 additions & 8 deletions Source/Charts/Utils/ChartColorTemplates.swift
Original file line number Diff line number Diff line change
@@ -86,14 +86,10 @@ open class ChartColorTemplates: NSObject

@objc open class func gradients () -> [[NSUIColor]]
{
return [
[NSUIColor(red: 146/255.0, green: 132/255.0, blue: 240/255.0, alpha: 1.0),
NSUIColor(red: 225/255.0, green: 129/255.0, blue: 222/255.0, alpha: 1.0)],
[NSUIColor(red: 253/255.0, green: 155/255.0, blue: 168/255.0, alpha: 1.0),
NSUIColor(red: 236/255.0, green: 215/255.0, blue: 144/255.0, alpha: 1.0)],
[NSUIColor(red: 98/255.0, green: 199/255.0, blue: 203/255.0, alpha: 1.0),
NSUIColor(red: 147/255.0, green: 210/255.0, blue: 173/255.0, alpha: 1.0)]
]
let palette = joyful()
return [[palette[0], palette[1]],
[palette[2], palette[3]],
[palette[4], palette[0]]]
}

@objc open class func colorFromString(_ colorString: String) -> NSUIColor