Class: Trackplot::Components::DataLabel
- Defined in:
- lib/trackplot/components/data_label.rb
Constant Summary collapse
- FORMAT_SYMBOLS =
{ currency: "currency", percent: "percent", compact: "compact", decimal: "decimal", integer: "integer" }.freeze
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Trackplot::Components::Base
Instance Method Details
#to_config ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/trackplot/components/data_label.rb', line 12 def to_config { type: "data_label", format: resolve_format([:format]), position: ([:position] || :top).to_s, font_size: [:font_size] || 11 }.compact end |