Module: GoogleChart::BarStyle
- Included in:
- BarChart
- Defined in:
- lib/google_chart/bar_style.rb
Instance Attribute Summary collapse
-
#width ⇒ Object
writeonly
Sets the attribute width.
Class Method Summary collapse
Instance Method Summary collapse
-
#spacing=(spacing) ⇒ Object
TODO: raise error if bar spacing > group spacing?.
- #style ⇒ Object
Instance Attribute Details
#width=(value) ⇒ Object (writeonly)
Sets the attribute width
8 9 10 |
# File 'lib/google_chart/bar_style.rb', line 8 def width=(value) @width = value end |
Class Method Details
.included(klass) ⇒ Object
4 5 6 |
# File 'lib/google_chart/bar_style.rb', line 4 def self.included(klass) klass.register!(:style) end |
Instance Method Details
#spacing=(spacing) ⇒ Object
TODO: raise error if bar spacing > group spacing?
11 12 13 |
# File 'lib/google_chart/bar_style.rb', line 11 def spacing=(spacing) @spacing = [spacing].flatten end |
#style ⇒ Object
15 16 17 |
# File 'lib/google_chart/bar_style.rb', line 15 def style "chbh=#{[@width, *@spacing].compact.join(',')}" if @width end |