Class: Google::Apis::FusiontablesV2::StyleFunction::Gradient
- Inherits:
-
Object
- Object
- Google::Apis::FusiontablesV2::StyleFunction::Gradient
- 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
-
#colors ⇒ Array<Google::Apis::FusiontablesV2::StyleFunction::Gradient::Color>
Array with two or more colors.
-
#max ⇒ Float
Higher-end of the interpolation range: rows with this value will be assigned to colors[n-1].
-
#min ⇒ Float
Lower-end of the interpolation range: rows with this value will be assigned to colors[0].
Instance Method Summary collapse
-
#initialize(**args) ⇒ Gradient
constructor
A new instance of Gradient.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
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
#colors ⇒ Array<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 |
#max ⇒ Float
Higher-end of the interpolation range: rows with this value will be assigned
to colors[n-1].
Corresponds to the JSON property max
605 606 607 |
# File 'generated/google/apis/fusiontables_v2/classes.rb', line 605 def max @max end |
#min ⇒ Float
Lower-end of the interpolation range: rows with this value will be assigned to
colors[0].
Corresponds to the JSON property min
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 |