Class: Ziya::Maps::Support::HeatRange

Inherits:
Base show all
Defined in:
lib/ziya/maps/support/heat_range.rb

Instance Method Summary collapse

Methods inherited from Base

#to_comp_yaml

Methods included from YamlHelpers::Gauges

#dial, #dials, #gauge

Methods included from YamlHelpers::Base

#clazz, #indent

Methods inherited from Charts::Support::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



8
9
10
11
12
13
14
15
16
# File 'lib/ziya/maps/support/heat_range.rb', line 8

def flatten( xml )
  ranges = compute_ranges
  ranges.each_pair do |range, color|
    xml.state( :id => 'range' ) do
      xml.data( range )
      xml.color( color )
    end      
  end
end