Class: Ziya::Charts::Support::SeriesColor
- Defined in:
- lib/ziya/charts/support/series_color.rb
Instance Method Summary collapse
-
#flatten(xml) ⇒ Object
————————————————————————- Dump has_attribute into xml element.
Methods inherited from Base
#==, attributes, #attributes_for, #configured?, has_attribute, #has_sub_components, #initialize, #merge, #options, #options_as_string
Constructor Details
This class inherits a constructor from Ziya::Charts::Support::Base
Instance Method Details
#flatten(xml) ⇒ Object
Dump has_attribute into xml element
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/ziya/charts/support/series_color.rb', line 20 def flatten( xml ) unless colors.nil? xml.series_color do if colors.is_a? String cols = colors.split( "," ) cols.each { |c| xml.color( c.strip ) } elsif colors.respond_to? :each colors.each { |c| xml.color( c ) } else xml.color( colors ) end end end end |