Class: Trackplot::Components::Legend

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

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



4
5
6
7
8
9
10
# File 'lib/trackplot/components/legend.rb', line 4

def to_config
  {
    type: "legend",
    position: options[:position] || "bottom",
    clickable: options.fetch(:clickable, true)
  }.compact
end