lib/gallery_lib.rb
# Fill and sort chart data - single series
Fill and sort chart data - single series
Fill and sort chart data - single series
def chart_prep_single(data, keys, value)
      data = data.to_h
      keys.each {|k| data[k] ||= value}
      data.to_a.sort_by(&:first).to_h
    end
def chart_prep_single ( data , keys , value ) data = data . to_h keys . each { | k | data [ k ] ||= value } data . to_a . sort_by ( & :first ) . to_h end
Fill and sort chart data - single series
Fill and sort chart data - single series
data
<not_specific>
keys
<not_specific>
value
<not_specific>