Class: Rubyvis::Area

Inherits:
Mark show all
Includes:
AreaPrototype
Defined in:
lib/rubyvis/mark/area.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 AreaPrototype

#area_anchor, #area_bind, #area_build_instance, #fixed

Methods inherited from Mark

#add, attr_accessor_dsl, #build, #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



115
116
117
118
# File 'lib/rubyvis/mark/area.rb', line 115

def self.defaults
  a= Rubyvis::Colors.category20
  Area.new.extend(Mark.defaults).line_width(1.5).fill_style(lambda {a.scale(self.parent.index)}).interpolate('linear').tension(0.7)
end

Instance Method Details

#anchor(name) ⇒ Object



119
120
121
# File 'lib/rubyvis/mark/area.rb', line 119

def anchor(name)
  area_anchor(name)
end

#bindObject



109
110
111
# File 'lib/rubyvis/mark/area.rb', line 109

def bind
  area_bind
end

#build_implied(s) ⇒ Object



122
123
124
125
126
# File 'lib/rubyvis/mark/area.rb', line 122

def build_implied(s)
  s.heigth=0 if s.height.nil?
  s.width=0 if s.width.nil?
  mark_build_implied(s)
end

#build_instance(s) ⇒ Object



112
113
114
# File 'lib/rubyvis/mark/area.rb', line 112

def build_instance(s)
  area_build_instance(s)
end

#typeObject



106
107
108
# File 'lib/rubyvis/mark/area.rb', line 106

def type
  'area'
end