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.
258 259 260 261 262 263 264 |
# File 'lib/rust-plots.rb', line 258 def initialize(side) super() self['side'] = side self.at(nil) self.labels(true) end |
Instance Method Details
#_render ⇒ Object
290 291 292 293 294 295 296 297 |
# File 'lib/rust-plots.rb', line 290 def _render() function = Rust::Function.new("axis") function. = @options function.call return self end |
#at(values) ⇒ Object
266 267 268 269 270 |
# File 'lib/rust-plots.rb', line 266 def at(values) self['at'] = values return self end |
#horizontal_labels ⇒ Object
278 279 280 281 282 |
# File 'lib/rust-plots.rb', line 278 def horizontal_labels self['las'] = 1 return self end |
#labels(value) ⇒ Object
284 285 286 287 288 |
# File 'lib/rust-plots.rb', line 284 def labels(value) self['labels'] = value return self end |
#vertical_labels ⇒ Object
272 273 274 275 276 |
# File 'lib/rust-plots.rb', line 272 def vertical_labels self['las'] = 2 return self end |