Sha256: afebf427936b08f4da2edb95ee10c912bb5ec74a62c08c747f9a66040535e78d
Contents?: true
Size: 422 Bytes
Versions: 1
Compression:
Stored size: 422 Bytes
Contents
module Jqplot::Rails module ViewHelpers def jqplot(height, width, data_series, options={}) dom_id = SecureRandom.hex(12) height = height.is_a?(String) ? height : "#{height}px" width = width.is_a?(String) ? width : "#{width}px" content_tag :div, nil, data: {series: data_series, options: options, role: 'jqplot'}, id: dom_id, style: "height:#{height};width:#{width}" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jqplot-rails-0.3 | lib/jqplot-rails/view_helpers.rb |