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.
-
#template ⇒ Object
Returns the value of attribute template.
-
#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
- #setTemplate(template) ⇒ Object
- #setTitle(title) ⇒ Object
- #setWidth(width) ⇒ Object
Constructor Details
#initialize ⇒ BarChart
Returns a new instance of BarChart.
8 9 10 11 |
# File 'lib/plot_simple.rb', line 8 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.
7 8 9 |
# File 'lib/plot_simple.rb', line 7 def background_color @background_color end |
#backgroundImage ⇒ Object
Returns the value of attribute backgroundImage.
7 8 9 |
# File 'lib/plot_simple.rb', line 7 def backgroundImage @backgroundImage end |
#borderColor ⇒ Object
Returns the value of attribute borderColor.
7 8 9 |
# File 'lib/plot_simple.rb', line 7 def borderColor @borderColor end |
#categories ⇒ Object
Returns the value of attribute categories.
7 8 9 |
# File 'lib/plot_simple.rb', line 7 def categories @categories end |
#height ⇒ Object
Returns the value of attribute height.
7 8 9 |
# File 'lib/plot_simple.rb', line 7 def height @height end |
#lineColor ⇒ Object
Returns the value of attribute lineColor.
7 8 9 |
# File 'lib/plot_simple.rb', line 7 def lineColor @lineColor end |
#pointLabels ⇒ Object
Returns the value of attribute pointLabels.
7 8 9 |
# File 'lib/plot_simple.rb', line 7 def pointLabels @pointLabels end |
#seriesColors ⇒ Object
Returns the value of attribute seriesColors.
7 8 9 |
# File 'lib/plot_simple.rb', line 7 def seriesColors @seriesColors end |
#template ⇒ Object
Returns the value of attribute template.
7 8 9 |
# File 'lib/plot_simple.rb', line 7 def template @template end |
#title ⇒ Object
Returns the value of attribute title.
7 8 9 |
# File 'lib/plot_simple.rb', line 7 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
7 8 9 |
# File 'lib/plot_simple.rb', line 7 def type @type end |
#width ⇒ Object
Returns the value of attribute width.
7 8 9 |
# File 'lib/plot_simple.rb', line 7 def width @width end |
Instance Method Details
#addCategory(name, size, link) ⇒ Object
42 43 44 45 46 47 |
# File 'lib/plot_simple.rb', line 42 def addCategory(name,size,link) @categories ||= [] @pointLabels ||= [] @categories << Hash[:tick=>name,:bar_size=>size,:link=>link] @pointLabels << size end |
#addSeriesColor(color) ⇒ Object
49 50 51 52 |
# File 'lib/plot_simple.rb', line 49 def addSeriesColor(color) @seriesColors ||= [] @seriesColors << color end |
#setBackgroundColor(color) ⇒ Object
21 22 23 |
# File 'lib/plot_simple.rb', line 21 def setBackgroundColor(color) @bgcolor = color end |
#setBackgroundImage(image) ⇒ Object
17 18 19 |
# File 'lib/plot_simple.rb', line 17 def setBackgroundImage(image) @backgroundImage = image end |
#setBorderColor(color) ⇒ Object
25 26 27 |
# File 'lib/plot_simple.rb', line 25 def setBorderColor(color) @borderColor = color end |
#setHeight(height) ⇒ Object
37 38 39 |
# File 'lib/plot_simple.rb', line 37 def setHeight(height) @height = height end |
#setLineColor(color) ⇒ Object
29 30 31 |
# File 'lib/plot_simple.rb', line 29 def setLineColor(color) @lineColor = color end |
#setTemplate(template) ⇒ Object
58 59 60 |
# File 'lib/plot_simple.rb', line 58 def setTemplate(template) @template = template end |
#setTitle(title) ⇒ Object
13 14 15 |
# File 'lib/plot_simple.rb', line 13 def setTitle(title) @title = title; end |
#setWidth(width) ⇒ Object
33 34 35 |
# File 'lib/plot_simple.rb', line 33 def setWidth(width) @width = width end |