Class: TChart::GridLine
- Inherits:
-
Object
- Object
- TChart::GridLine
- Defined in:
- lib/tchart/model/grid_line.rb
Overview
A horizontal or vertical line on the chart that spans the entire width or height of the chart and serves as a reading aid. The x and y axes, and the top and and right frame of the chart are also grid lines. Responsible for generating TikZ code to render the grid line.
Instance Attribute Summary collapse
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
Instance Method Summary collapse
-
#initialize(from, to) ⇒ GridLine
constructor
A new instance of GridLine.
- #render(tex) ⇒ Object
Constructor Details
#initialize(from, to) ⇒ GridLine
Returns a new instance of GridLine.
15 16 17 18 |
# File 'lib/tchart/model/grid_line.rb', line 15 def initialize(from, to) @from = from @to = to end |
Instance Attribute Details
#from ⇒ Object (readonly)
Returns the value of attribute from.
12 13 14 |
# File 'lib/tchart/model/grid_line.rb', line 12 def from @from end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
13 14 15 |
# File 'lib/tchart/model/grid_line.rb', line 13 def to @to end |
Instance Method Details
#render(tex) ⇒ Object
20 21 22 |
# File 'lib/tchart/model/grid_line.rb', line 20 def render(tex) tex.gridline @from, @to, "gridline" end |