Class: Gecko::Pusher::Channel::LineChart
- Defined in:
- lib/gecko-pusher/channel/line_chart.rb
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Gecko::Pusher::Channel::Base
Instance Method Details
#push(points, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/gecko-pusher/channel/line_chart.rb', line 6 def push(points, = {}) data = { item: points } unless .empty? data[:settings] = {} [:colour, :axisx, :axisy].each do |setting| data[:settings][setting] = [setting] if [setting] end end _push(data) end |