Class: Google::Apis::FusiontablesV1::StyleFunction::Gradient

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/fusiontables_v1/classes.rb,
generated/google/apis/fusiontables_v1/representations.rb,
generated/google/apis/fusiontables_v1/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



556
557
558
# File 'generated/google/apis/fusiontables_v1/classes.rb', line 556

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

Instance Attribute Details

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

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



542
543
544
# File 'generated/google/apis/fusiontables_v1/classes.rb', line 542

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)


548
549
550
# File 'generated/google/apis/fusiontables_v1/classes.rb', line 548

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)


554
555
556
# File 'generated/google/apis/fusiontables_v1/classes.rb', line 554

def min
  @min
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



561
562
563
564
565
# File 'generated/google/apis/fusiontables_v1/classes.rb', line 561

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