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

- old
+ new

@@ -7,10 +7,11 @@ "wedge" end @properties=Mark.properties.dup attr_accessor_dsl :start_angle, :end_angle, :angle, :inner_radius, :outer_radius, :line_width, [:stroke_style, lambda {|d| pv.color(d)}], [:fill_style, lambda {|d| pv.color(d)}] def self.defaults - Wedge.new.extend(Mark.defaults).start_angle(lambda {s=self.sibling; s ? s.end_angle: -Math::PI.quo(2) } ).inner_radius( 0 ).line_width( 1.5 ).stroke_style( nil ).fill_style( lambda {Rubyvis.Colors.category20().scale(self.parent.index)}) + a=Rubyvis.Colors.category20() + Wedge.new.extend(Mark.defaults).start_angle(lambda {s=self.sibling; s ? s.end_angle: -Math::PI.quo(2) } ).inner_radius( 0 ).line_width( 1.5 ).stroke_style( nil ).fill_style( lambda {a.scale(self.index)}) end def mid_radius (inner_radius+outer_radius) / 2.0 end def mid_angle