Class: TChart::Coordinate

Inherits:
Object
  • Object
show all
Defined in:
lib/tchart/model/coordinate.rb

Overview

An (x,y) location on the chart. x and y can be in any units, e.g. millimeters, pixels, etc.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x, y) ⇒ Coordinate

Returns a new instance of Coordinate.



12
13
14
15
# File 'lib/tchart/model/coordinate.rb', line 12

def initialize(x, y)
  @x = x
  @y = y
end

Instance Attribute Details

#xObject (readonly)

Returns the value of attribute x.



9
10
11
# File 'lib/tchart/model/coordinate.rb', line 9

def x
  @x
end

#yObject (readonly)

Returns the value of attribute y.



10
11
12
# File 'lib/tchart/model/coordinate.rb', line 10

def y
  @y
end