Class Ambling::Data::LineColumnChart
In: lib/ambling/data.rb
Parent: BaseData

Line and Column Data have a single series and a number of graphs

Methods

build_xml   new   series=   tag_name  

Attributes

graphs  [R] 
series  [R] 

Public Class methods

[Source]

# File lib/ambling/data.rb, line 172
      def initialize
        @series, @graphs = Series.new, []
      end

Public Instance methods

[Source]

# File lib/ambling/data.rb, line 184
      def build_xml(builder)
        @message.build_xml(builder) if !@message.nil?
        builder.series {|series| @series.build_xml(series)}
        builder.graphs do |graphs|
          @graphs.each_with_index {|g,i| graphs.graph({:gid => i+1}.merge(g.attributes)) {|graph| g.build_xml(graph)}}
        end
      end

[Source]

# File lib/ambling/data.rb, line 176
      def series=(data)
        if data.is_a?(Series)
          @series = data
        else
          @series.values = data
        end
      end

[Source]

# File lib/ambling/data.rb, line 192
      def tag_name
        "chart"
      end

[Validate]