Class: Ziya::Charts::Support::Text
- Defined in:
- lib/ziya/charts/support/text.rb
Overview
Text component to draw text on the chart. Must be set up within the draw component. See www.maani.us/xml_charts/index.php?menu=Reference&submenu=draw for additional documentation, examples and futher detail.
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
19 20 21 22 23 |
# File 'lib/ziya/charts/support/text.rb', line 19 def flatten( xml ) opts = .clone text = opts.delete( :text ) xml.text( opts ) { |x| x.text!( text.to_s ) } end |