Class: Rust::Plots::Axis
- Inherits:
-
Renderable
- Object
- Renderable
- Rust::Plots::Axis
- Defined in:
- lib/rust/plots/core.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.
159 160 161 162 163 164 165 |
# File 'lib/rust/plots/core.rb', line 159 def initialize(side) super() self['side'] = side self.at(nil) self.labels(true) end |
Instance Method Details
#_render ⇒ Object
191 192 193 194 195 196 197 198 |
# File 'lib/rust/plots/core.rb', line 191 def _render() function = Rust::Function.new("axis") function. = @options function.call return self end |
#at(values) ⇒ Object
167 168 169 170 171 |
# File 'lib/rust/plots/core.rb', line 167 def at(values) self['at'] = values return self end |
#horizontal_labels ⇒ Object
179 180 181 182 183 |
# File 'lib/rust/plots/core.rb', line 179 def horizontal_labels self['las'] = 1 return self end |
#labels(value) ⇒ Object
185 186 187 188 189 |
# File 'lib/rust/plots/core.rb', line 185 def labels(value) self['labels'] = value return self end |
#vertical_labels ⇒ Object
173 174 175 176 177 |
# File 'lib/rust/plots/core.rb', line 173 def vertical_labels self['las'] = 2 return self end |