Class: PlotSimple::Charts::BarChart

Inherits:
Object
  • Object
show all
Defined in:
lib/plot_simple.rb

Overview

This will be a bump to 1.0.0…inserting objects

Direct Known Subclasses

PieChart, StackedColumn

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBarChart

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_colorObject

Returns the value of attribute background_color.



6
7
8
# File 'lib/plot_simple.rb', line 6

def background_color
  @background_color
end

#backgroundImageObject

Returns the value of attribute backgroundImage.



6
7
8
# File 'lib/plot_simple.rb', line 6

def backgroundImage
  @backgroundImage
end

#borderColorObject

Returns the value of attribute borderColor.



6
7
8
# File 'lib/plot_simple.rb', line 6

def borderColor
  @borderColor
end

#categoriesObject

Returns the value of attribute categories.



6
7
8
# File 'lib/plot_simple.rb', line 6

def categories
  @categories
end

#heightObject

Returns the value of attribute height.



6
7
8
# File 'lib/plot_simple.rb', line 6

def height
  @height
end

#lineColorObject

Returns the value of attribute lineColor.



6
7
8
# File 'lib/plot_simple.rb', line 6

def lineColor
  @lineColor
end

#pointLabelsObject

Returns the value of attribute pointLabels.



6
7
8
# File 'lib/plot_simple.rb', line 6

def pointLabels
  @pointLabels
end

#seriesColorsObject

Returns the value of attribute seriesColors.



6
7
8
# File 'lib/plot_simple.rb', line 6

def seriesColors
  @seriesColors
end

#titleObject

Returns the value of attribute title.



6
7
8
# File 'lib/plot_simple.rb', line 6

def title
  @title
end

#typeObject

Returns the value of attribute type.



6
7
8
# File 'lib/plot_simple.rb', line 6

def type
  @type
end

#widthObject

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