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

- old
+ new

@@ -6,11 +6,11 @@ def type "bar" end @properties=Mark.properties.dup - attr_accessor_dsl :width, :height, :line_width, :stroke_style, :fill_style + 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(Rubyvis.Colors.category20().by(Rubyvis.parent)) + Bar.new.extend(Mark.defaults).line_width(1.5).fill_style( lambda {Rubyvis.Colors.category20().scale(self.parent.index)}) end end end