Sha256: cdac0880802472929d9bb9a988e6f560bf8b22b757f45d1097fd99f0405c9744

Contents?: true

Size: 560 Bytes

Versions: 1

Compression:

Stored size: 560 Bytes

Contents

module Vega
  class LiteChart < BaseChart
    # https://vega.github.io/vega-lite/docs/spec.html
    scalar_methods \
      :background, :padding, :autosize, :title, :name, :description, :width, :height, :mark

    hash_methods \
      :config, :usermeta, :projection, :datasets, :encoding

    array_methods \
      :transform, :layer

    def initialize
      @schema = "https://vega.github.io/schema/vega-lite/v4.json"
      super()
    end

    def data!(value)
      @spec[:data] = data_value(value)
      self
    end
    immutable_method :data
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vega-0.1.0 lib/vega/lite_chart.rb