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.



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_colorObject

Returns the value of attribute background_color.



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

def background_color
  @background_color
end

#backgroundImageObject

Returns the value of attribute backgroundImage.



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

def backgroundImage
  @backgroundImage
end

#borderColorObject

Returns the value of attribute borderColor.



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

def borderColor
  @borderColor
end

#categoriesObject

Returns the value of attribute categories.



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

def categories
  @categories
end

#heightObject

Returns the value of attribute height.



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

def height
  @height
end

#lineColorObject

Returns the value of attribute lineColor.



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

def lineColor
  @lineColor
end

#pointLabelsObject

Returns the value of attribute pointLabels.



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

def pointLabels
  @pointLabels
end

#seriesColorsObject

Returns the value of attribute seriesColors.



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

def seriesColors
  @seriesColors
end

#templateObject

Returns the value of attribute template.



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

def template
  @template
end

#titleObject

Returns the value of attribute title.



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

def title
  @title
end

#typeObject

Returns the value of attribute type.



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

def type
  @type
end

#widthObject

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