Class: Rubyvis::Line

Inherits:
Mark show all
Includes:
AreaPrototype, LinePrototype
Defined in:
lib/rubyvis/mark/line.rb

Instance Attribute Summary

Attributes inherited from Mark

#_properties, #binds, #child_index, #parent, #proto, #root, #scale, #scene, #target

Class Method Summary collapse

Instance Method Summary collapse

Methods included from LinePrototype

#line_anchor

Methods included from AreaPrototype

#area_anchor, #area_bind, #area_build_instance, #fixed

Methods inherited from Mark

#add, attr_accessor_dsl, #build, #build_implied, #build_properties, #context, #context_apply, #context_clear, #cousin, #delete_index, #event, #extend, #index, index, index=, #index=, #index_defined?, #initialize, #instance, #instances, #margin, #mark_anchor, #mark_bind, #mark_build_implied, #mark_build_instance, #properties, properties, property_method, #property_value, #render, scene, scene=, #sibling, stack, stack=

Constructor Details

This class inherits a constructor from Rubyvis::Mark

Class Method Details

.defaultsObject



34
35
36
37
# File 'lib/rubyvis/mark/line.rb', line 34

def self.defaults
  a=Rubyvis::Colors.category10()
  Line.new.extend(Mark.defaults).line_join('miter').line_width(1.5).stroke_style( lambda {return a.scale(self.parent.index)}).interpolate('linear').eccentricity(0).tension(7)
end

Instance Method Details

#anchor(name) ⇒ Object



25
26
27
# File 'lib/rubyvis/mark/line.rb', line 25

def anchor(name)
  line_anchor(name)
end

#bind(*args) ⇒ Object



28
29
30
# File 'lib/rubyvis/mark/line.rb', line 28

def bind(*args)
  area_bind(*args)
end

#build_instance(*args) ⇒ Object



31
32
33
# File 'lib/rubyvis/mark/line.rb', line 31

def build_instance(*args)
  area_build_instance(*args)
end

#typeObject



22
23
24
# File 'lib/rubyvis/mark/line.rb', line 22

def type
  "line"
end