Sha256: 6782399a07ea77d99f5596a19a9486d0f8c7b048066ebfff2d583f23586517bc

Contents?: true

Size: 549 Bytes

Versions: 1

Compression:

Stored size: 549 Bytes

Contents

module Rubyvis
  def self.Label
    Rubyvis::Label
  end
  
  class Label < Mark
    @properties=Mark.properties
    attr_accessor_dsl :text, :font, :text_angle, :text_style, :text_align, :text_baseline, :text_margin, :text_decoration, :text_shadow
    def type
      'label'
    end
    def defaults
      sd=super
      return sd.merge({:events=>'none', :text=>lambda{|x| puts "->#{x}"; x}, :font=>"10px sans-serif", :text_angle=>0, :text_style=>pv.color('black'), :text_align=>'left', :text_baseline=>'bottom', :text_margin=>3})
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubyvis-0.1.0 lib/rubyvis/mark/label.rb