Sha256: b7289e4d772ae1219e01e5d9c728f6b130ad992772af611cf8bcee076a89df2e

Contents?: true

Size: 419 Bytes

Versions: 6

Compression:

Stored size: 419 Bytes

Contents

module D3
  class ThresholdScale
    include D3::Native
    attributes_d3 %i[domain range]
    alias_native_new :copy

    def call(t)
      @native.call(t)
    end

    def invert_extent(t)
      a,b = @native.JS.invertExtent(t)
      [`a === undefined ? nil : a`, `b === undefined ? nil : b`]
    end
  end

  class << self
    def scale_threshold
      D3::ThresholdScale.new @d3.JS.scaleThreshold
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hyper-d3-1.0.0.lap28 lib/d3/threshold_scale.rb
hyper-d3-1.0.0.lap27 lib/d3/threshold_scale.rb
hyper-d3-1.0.0.lap26 lib/d3/threshold_scale.rb
hyper-d3-1.0.0.lap25 lib/d3/threshold_scale.rb
hyper-d3-1.0.0.lap24 lib/d3/threshold_scale.rb
hyper-d3-1.0.0.lap23 lib/d3/threshold_scale.rb