class Array
for both multiple series and making sure hash order is preserved in JavaScript
Public Instance Methods
chart_json()
click to toggle source
# File lib/chartkick/core_ext.rb, line 5 def chart_json map do |v| if v.is_a?(Hash) && v[:data].is_a?(Hash) v = v.dup v[:data] = v[:data].to_a end v end.to_json end