Class: PlotSimple::Charts::BarChart
- Inherits:
-
Object
- Object
- PlotSimple::Charts::BarChart
- Defined in:
- lib/plot_simple.rb
Overview
This will be a bump to 1.0.0…inserting objects
Direct Known Subclasses
Instance Attribute Summary collapse
-
#background_color ⇒ Object
Returns the value of attribute background_color.
-
#backgroundImage ⇒ Object
Returns the value of attribute backgroundImage.
-
#borderColor ⇒ Object
Returns the value of attribute borderColor.
-
#categories ⇒ Object
Returns the value of attribute categories.
-
#height ⇒ Object
Returns the value of attribute height.
-
#lineColor ⇒ Object
Returns the value of attribute lineColor.
-
#pointLabels ⇒ Object
Returns the value of attribute pointLabels.
-
#seriesColors ⇒ Object
Returns the value of attribute seriesColors.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
- #addCategory(name, size, link) ⇒ Object
- #addSeriesColor(color) ⇒ Object
-
#initialize ⇒ BarChart
constructor
A new instance of BarChart.
- #setBackgroundColor(color) ⇒ Object
- #setBackgroundImage(image) ⇒ Object
- #setBorderColor(color) ⇒ Object
- #setHeight(height) ⇒ Object
- #setLineColor(color) ⇒ Object
- #setTitle(title) ⇒ Object
- #setWidth(width) ⇒ Object
Constructor Details
#initialize ⇒ BarChart
Returns a new instance of BarChart.
7 8 9 10 |
# File 'lib/plot_simple.rb', line 7 def initialize @type = "bar" #just so that this can be an object end |
Instance Attribute Details
#background_color ⇒ Object
Returns the value of attribute background_color.
6 7 8 |
# File 'lib/plot_simple.rb', line 6 def background_color @background_color end |
#backgroundImage ⇒ Object
Returns the value of attribute backgroundImage.
6 7 8 |
# File 'lib/plot_simple.rb', line 6 def backgroundImage @backgroundImage end |
#borderColor ⇒ Object
Returns the value of attribute borderColor.
6 7 8 |
# File 'lib/plot_simple.rb', line 6 def borderColor @borderColor end |
#categories ⇒ Object
Returns the value of attribute categories.
6 7 8 |
# File 'lib/plot_simple.rb', line 6 def categories @categories end |
#height ⇒ Object
Returns the value of attribute height.
6 7 8 |
# File 'lib/plot_simple.rb', line 6 def height @height end |
#lineColor ⇒ Object
Returns the value of attribute lineColor.
6 7 8 |
# File 'lib/plot_simple.rb', line 6 def lineColor @lineColor end |
#pointLabels ⇒ Object
Returns the value of attribute pointLabels.
6 7 8 |
# File 'lib/plot_simple.rb', line 6 def pointLabels @pointLabels end |
#seriesColors ⇒ Object
Returns the value of attribute seriesColors.
6 7 8 |
# File 'lib/plot_simple.rb', line 6 def seriesColors @seriesColors end |
#title ⇒ Object
Returns the value of attribute title.
6 7 8 |
# File 'lib/plot_simple.rb', line 6 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/plot_simple.rb', line 6 def type @type end |
#width ⇒ Object
Returns the value of attribute width.
6 7 8 |
# File 'lib/plot_simple.rb', line 6 def width @width end |
Instance Method Details
#addCategory(name, size, link) ⇒ Object
41 42 43 44 45 46 |
# File 'lib/plot_simple.rb', line 41 def addCategory(name,size,link) @categories ||= [] @pointLabels ||= [] @categories << Hash[:tick=>name,:bar_size=>size,:link=>link] @pointLabels << size end |
#addSeriesColor(color) ⇒ Object
48 49 50 51 |
# File 'lib/plot_simple.rb', line 48 def addSeriesColor(color) @seriesColors ||= [] @seriesColors << color end |
#setBackgroundColor(color) ⇒ Object
20 21 22 |
# File 'lib/plot_simple.rb', line 20 def setBackgroundColor(color) @bgcolor = color end |
#setBackgroundImage(image) ⇒ Object
16 17 18 |
# File 'lib/plot_simple.rb', line 16 def setBackgroundImage(image) @backgroundImage = image end |
#setBorderColor(color) ⇒ Object
24 25 26 |
# File 'lib/plot_simple.rb', line 24 def setBorderColor(color) @borderColor = color end |
#setHeight(height) ⇒ Object
36 37 38 |
# File 'lib/plot_simple.rb', line 36 def setHeight(height) @height = height end |
#setLineColor(color) ⇒ Object
28 29 30 |
# File 'lib/plot_simple.rb', line 28 def setLineColor(color) @lineColor = color end |
#setTitle(title) ⇒ Object
12 13 14 |
# File 'lib/plot_simple.rb', line 12 def setTitle(title) @title = title; end |
#setWidth(width) ⇒ Object
32 33 34 |
# File 'lib/plot_simple.rb', line 32 def setWidth(width) @width = width end |