Class: Trackplot::Components::Base
- Inherits:
-
Object
- Object
- Trackplot::Components::Base
- Defined in:
- lib/trackplot/components/base.rb
Direct Known Subclasses
Area, Axis, Bar, Brush, Candlestick, DataLabel, Drilldown, Funnel, Grid, Heatmap, HorizontalBar, Legend, Line, Pie, Radar, ReferenceLine, Scatter, Tooltip, Treemap
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(**options) ⇒ Base
constructor
A new instance of Base.
- #to_config ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(**options) ⇒ Base
Returns a new instance of Base.
6 7 8 |
# File 'lib/trackplot/components/base.rb', line 6 def initialize(**) @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/trackplot/components/base.rb', line 4 def @options end |
Instance Method Details
#to_config ⇒ Object
14 15 16 |
# File 'lib/trackplot/components/base.rb', line 14 def to_config {type: type}.merge().compact end |
#type ⇒ Object
10 11 12 |
# File 'lib/trackplot/components/base.rb', line 10 def type self.class.name.demodulize.underscore end |