Class: Rust::Plots::Axis
- Inherits:
-
Renderable
- Object
- Renderable
- Rust::Plots::Axis
- Defined in:
- lib/rust-plots.rb
Constant Summary collapse
- BELOW =
1- LEFT =
2- ABOVE =
3- RIGHT =
4
Instance Method Summary collapse
- #_render ⇒ Object
- #at(values) ⇒ Object
- #horizontal_labels ⇒ Object
-
#initialize(side) ⇒ Axis
constructor
A new instance of Axis.
- #labels(value) ⇒ Object
- #vertical_labels ⇒ Object
Methods inherited from Renderable
Constructor Details
#initialize(side) ⇒ Axis
Returns a new instance of Axis.
327 328 329 330 331 332 333 |
# File 'lib/rust-plots.rb', line 327 def initialize(side) super() self['side'] = side self.at(nil) self.labels(true) end |
Instance Method Details
#_render ⇒ Object
359 360 361 362 363 364 365 366 |
# File 'lib/rust-plots.rb', line 359 def _render() function = Rust::Function.new("axis") function. = function.call return self end |
#at(values) ⇒ Object
335 336 337 338 339 |
# File 'lib/rust-plots.rb', line 335 def at(values) self['at'] = values return self end |
#horizontal_labels ⇒ Object
347 348 349 350 351 |
# File 'lib/rust-plots.rb', line 347 def horizontal_labels self['las'] = 1 return self end |
#labels(value) ⇒ Object
353 354 355 356 357 |
# File 'lib/rust-plots.rb', line 353 def labels(value) self['labels'] = value return self end |
#vertical_labels ⇒ Object
341 342 343 344 345 |
# File 'lib/rust-plots.rb', line 341 def vertical_labels self['las'] = 2 return self end |