lib/avo/configuration/branding.rb in avo-2.13.2.pre.1 vs lib/avo/configuration/branding.rb in avo-2.13.2.pre.2
- old
+ new
@@ -1,17 +1,19 @@
class Avo::Configuration::Branding
- def initialize(colors: nil, logo: nil, logomark: nil)
+ def initialize(colors: nil, chart_colors: nil, logo: nil, logomark: nil)
@colors = colors
+ @chart_colors = chart_colors
@logo = logo
@logomark = logomark
@default_colors = {
100 => "206 231 248",
400 => "57 158 229",
500 => "8 134 222",
600 => "6 107 178"
}
+ @default_chart_colors = ["#0B8AE2", "#34C683", "#2AB1EE", "#34C6A8"]
@default_logo = "/avo-assets/logo.png"
@default_logomark = "/avo-assets/logomark.png"
end
def css_colors
@@ -28,9 +30,15 @@
def logomark
return @default_logomark if Avo::App.license.lacks_with_trial(:branding)
@logomark || @default_logomark
+ end
+
+ def chart_colors
+ return @default_chart_colors if Avo::App.license.lacks_with_trial(:branding)
+
+ @chart_colors || @default_chart_colors
end
private
def colors