lib/gallery_lib.rb
# Fill and sort chart data - multiple series
Fill and sort chart data - multiple series
Fill and sort chart data - multiple series
def chart_prep_multi(data, keys, value)
      data.each do |series|
        keys.merge(series[:data].to_a.map(&:first))
      end
      data.each do |series|
        series[:data] = chart_prep_single(series[:data], keys, value)
      end
      data
    end
def chart_prep_multi ( data , keys , value ) data . each do | series | keys . merge ( series [ :data ] . to_a . map ( & :first ) ) end data . each do | series | series [ :data ] = chart_prep_single ( series [ :data ] , keys , value ) end data end
Fill and sort chart data - multiple series
Fill and sort chart data - multiple series
# Union all series keys # Fill values for each series
data
<not_specific>
keys
<not_specific>
value
<not_specific>