lib/rubyvis/mark/bar.rb in rubyvis-0.1.3 vs lib/rubyvis/mark/bar.rb in rubyvis-0.1.4

- old
+ new

@@ -8,9 +8,12 @@ end @properties=Mark.properties.dup attr_accessor_dsl :width, :height, :line_width, [:stroke_style, lambda {|d| pv.color(d)}], [:fill_style, lambda {|d| pv.color(d)}] def self.defaults - Bar.new.extend(Mark.defaults).line_width(1.5).fill_style( lambda {Rubyvis.Colors.category20().scale(self.parent.index)}) + a=Rubyvis.Colors.category20() + Bar.new.extend(Mark.defaults).line_width(1.5).fill_style( lambda { + a.scale(self.parent.index) + }) end end end