Class: Google::Apis::FusiontablesV2::StyleFunction::Gradient

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/fusiontables_v2/classes.rb,
generated/google/apis/fusiontables_v2/representations.rb,
generated/google/apis/fusiontables_v2/representations.rb

Overview

Gradient function that interpolates a range of colors based on column value.

Defined Under Namespace

Classes: Color

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Gradient

Returns a new instance of Gradient.



613
614
615
# File 'generated/google/apis/fusiontables_v2/classes.rb', line 613

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#colorsArray<Google::Apis::FusiontablesV2::StyleFunction::Gradient::Color>

Array with two or more colors. Corresponds to the JSON property colors



599
600
601
# File 'generated/google/apis/fusiontables_v2/classes.rb', line 599

def colors
  @colors
end

#maxFloat

Higher-end of the interpolation range: rows with this value will be assigned to colors[n-1]. Corresponds to the JSON property max

Returns:

  • (Float)


605
606
607
# File 'generated/google/apis/fusiontables_v2/classes.rb', line 605

def max
  @max
end

#minFloat

Lower-end of the interpolation range: rows with this value will be assigned to colors[0]. Corresponds to the JSON property min

Returns:

  • (Float)


611
612
613
# File 'generated/google/apis/fusiontables_v2/classes.rb', line 611

def min
  @min
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



618
619
620
621
622
# File 'generated/google/apis/fusiontables_v2/classes.rb', line 618

def update!(**args)
  @colors = args[:colors] if args.key?(:colors)
  @max = args[:max] if args.key?(:max)
  @min = args[:min] if args.key?(:min)
end