Class: Ambling::Data::XyChart
- Defined in:
- lib/ambling/data.rb
Overview
For an amchart xy (line) chart
Instance Attribute Summary collapse
-
#graphs ⇒ Object
readonly
Returns the value of attribute graphs.
Attributes inherited from BaseData
Instance Method Summary collapse
- #build_xml(builder) ⇒ Object
-
#initialize ⇒ XyChart
constructor
A new instance of XyChart.
- #tag_name ⇒ Object
Methods inherited from Base
Constructor Details
#initialize ⇒ XyChart
Returns a new instance of XyChart.
209 210 211 |
# File 'lib/ambling/data.rb', line 209 def initialize @graphs = [] end |
Instance Attribute Details
#graphs ⇒ Object (readonly)
Returns the value of attribute graphs.
207 208 209 |
# File 'lib/ambling/data.rb', line 207 def graphs @graphs end |
Instance Method Details
#build_xml(builder) ⇒ Object
213 214 215 216 217 218 |
# File 'lib/ambling/data.rb', line 213 def build_xml(builder) @message.build_xml(builder) if !@message.nil? builder.graphs do |graphs| @graphs.each_with_index {|g,i| graphs.graph({:gid => i}) {|graph| g.build_xml(graph)}} end end |
#tag_name ⇒ Object
220 221 222 |
# File 'lib/ambling/data.rb', line 220 def tag_name "chart" end |