Class: Trackplot::Components::Heatmap

Inherits:
Base
  • Object
show all
Defined in:
lib/trackplot/components/heatmap.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
11
12
13
# File 'lib/trackplot/components/heatmap.rb', line 4

def to_config
  {
    type: "heatmap",
    x_key: options[:x_key],
    y_key: options[:y_key],
    value_key: options[:value_key],
    color_range: options[:color_range] || ["#f0f9ff", "#1e40af"],
    radius: options[:radius] || 2
  }.compact
end