Module: Treemap
- Defined in:
- lib/chart_helpers/less_common/treemap.rb
Instance Method Summary collapse
Instance Method Details
#radio_input(value, checked) ⇒ Object
11 12 13 14 15 |
# File 'lib/chart_helpers/less_common/treemap.rb', line 11 def radio_input value, checked data = ( :mode, value, checked ) data << value content_tag( :label, data, class: 'radio inline') end |
#treemap(data_url, element = '.treemap') ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/chart_helpers/less_common/treemap.rb', line 3 def treemap( data_url, element='.treemap' ) TreemapGenerator.new.generate( element, data_url ) treemap_inputs = radio_input( 'size', true ) treemap_inputs << radio_input( 'count', false ) treemap_form = content_tag( :form, treemap_inputs ) content_tag( :div, treemap_form, class: element[1..-1] ) end |