Module: Rubyvis::LinePrototype
Overview
Provides methods pertinents to line like marks.
Instance Method Summary collapse
Methods included from AreaPrototype
#area_anchor, #area_bind, #area_build_instance, #fixed
Instance Method Details
#line_anchor(name) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/rubyvis/mark/line.rb', line 9 def line_anchor(name) anchor=area_anchor(name).text_align(lambda {|d| {'left'=>'right', 'bottom'=>'center', 'top'=>'center', 'center'=>'center','right'=>'left'}[self.name()] }).text_baseline(lambda{|d| {'top'=>'bottom', 'right'=>'middle', 'left'=>'middle','center'=>'middle', 'bottom'=>'top'}[self.name()] }) anchor end |