Class: Trackplot::Components::Tooltip

Inherits:
Base
  • Object
show all
Defined in:
lib/trackplot/components/tooltip.rb

Constant Summary collapse

FORMAT_SYMBOLS =
{
  currency: "currency",
  percent: "percent",
  compact: "compact",
  decimal: "decimal",
  integer: "integer"
}.freeze

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Base

#initialize, #type

Constructor Details

This class inherits a constructor from Trackplot::Components::Base

Instance Method Details

#to_configObject



12
13
14
15
16
17
18
# File 'lib/trackplot/components/tooltip.rb', line 12

def to_config
  {
    type: "tooltip",
    format: resolve_format(options[:format]),
    label_format: options[:label_format]
  }.compact
end