Sha256: 1a2cf5e0c91cddff8a6384b6b2a01da6fd0b598443c42d1adf583e555fbaae05

Contents?: true

Size: 683 Bytes

Versions: 12

Compression:

Stored size: 683 Bytes

Contents

module Vis
  class DataView
    include Native
    include Vis::Utilities
    include Vis::EventSupport
    include Vis::DataCommon

    aliases_native %i[refresh length]
    alias :size :length

    attr_reader :event_handlers

    def initialize(data_set_or_view, options = {})
      native_options = options_to_native(options)
      @data_set_or_view = data_set_or_view
      @event_handlers = {}
      @native = `new vis.DataView(data_set_or_view.$to_n(), native_options)`
    end

    def get_data_set
      @data_set_or_view
    end

    def set_data(data_set_or_view)
      @data_set_or_view = data_set_or_view
      @native.JS.setData(data_set_or_view.to_n)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
hyper-vis-1.0.1 lib/vis/data_view.rb
hyper-vis-1.0.0.lap34 lib/vis/data_view.rb
hyper-vis-1.0.0.lap33 lib/vis/data_view.rb
hyper-vis-1.0.0.lap32 lib/vis/data_view.rb
hyper-vis-1.0.0.lap31 lib/vis/data_view.rb
hyper-vis-1.0.0.lap30 lib/vis/data_view.rb
hyper-vis-1.0.0.lap29 lib/vis/data_view.rb
hyper-vis-1.0.0.lap28 lib/vis/data_view.rb
hyper-vis-1.0.0.lap27 lib/vis/data_view.rb
hyper-vis-1.0.0.lap26 lib/vis/data_view.rb
hyper-vis-1.0.0.lap25 lib/vis/data_view.rb
hyper-vis-1.0.0.lap24 lib/vis/data_view.rb