Class: RubyPost::GraphLabel

Inherits:
BaseLabel show all
Defined in:
lib/graph.rb

Overview

base class for graph labels

Direct Known Subclasses

GraphTitle, XLabel, YLabel, YLabelRight

Instance Attribute Summary

Attributes inherited from BaseLabel

#position, #text

Instance Method Summary collapse

Methods inherited from BaseLabel

#add_option, #bot, #bottom, #bottom_left, #bottom_right, #color, #colour, #compile_options, #left, #lft, #llft, #lrt, #right, #rotate, #rt, #scale, #set_position, #set_text, #top, #top_left, #top_right, #translate, #ulft, #urt

Constructor Details

#initialize(t = nil, p = 0) ⇒ GraphLabel

Returns a new instance of GraphLabel.



261
262
263
264
# File 'lib/graph.rb', line 261

def initialize(t=nil,p=0)
  super(t,p)
  self
end

Instance Method Details

#compileObject



266
267
268
# File 'lib/graph.rb', line 266

def compile
  'glabel.' + @place + '(' + @text.compile + ', ' + @position.compile + ') ' + compile_options + ";\n"
end