Class: Google::Apis::FusiontablesV1::StyleFunction
- Inherits:
-
Object
- Object
- Google::Apis::FusiontablesV1::StyleFunction
- 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
Represents a StyleFunction within a StyleSetting
Defined Under Namespace
Classes: Gradient
Instance Attribute Summary collapse
-
#buckets ⇒ Array<Google::Apis::FusiontablesV1::Bucket>
Bucket function that assigns a style based on the range a column value falls into.
-
#column_name ⇒ String
Name of the column whose value is used in the style.
-
#gradient ⇒ Google::Apis::FusiontablesV1::StyleFunction::Gradient
Gradient function that interpolates a range of colors based on column value.
-
#kind ⇒ String
Stylers can be one of three kinds: "fusiontables#fromColumn" if the column value is to be used as is, i.e., the column values can have colors in # RRGGBBAA format or integer line widths or icon names; "fusiontables#gradient" if the styling of the row is to be based on applying the gradient function on the column value; or "fusiontables#buckets" if the styling is to based on the bucket into which the the column value falls.
Instance Method Summary collapse
-
#initialize(**args) ⇒ StyleFunction
constructor
A new instance of StyleFunction.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ StyleFunction
Returns a new instance of StyleFunction
523 524 525 |
# File 'generated/google/apis/fusiontables_v1/classes.rb', line 523 def initialize(**args) update!(**args) end |
Instance Attribute Details
#buckets ⇒ Array<Google::Apis::FusiontablesV1::Bucket>
Bucket function that assigns a style based on the range a column value falls
into.
Corresponds to the JSON property buckets
501 502 503 |
# File 'generated/google/apis/fusiontables_v1/classes.rb', line 501 def buckets @buckets end |
#column_name ⇒ String
Name of the column whose value is used in the style.
Corresponds to the JSON property columnName
506 507 508 |
# File 'generated/google/apis/fusiontables_v1/classes.rb', line 506 def column_name @column_name end |
#gradient ⇒ Google::Apis::FusiontablesV1::StyleFunction::Gradient
Gradient function that interpolates a range of colors based on column value.
Corresponds to the JSON property gradient
511 512 513 |
# File 'generated/google/apis/fusiontables_v1/classes.rb', line 511 def gradient @gradient end |
#kind ⇒ String
Stylers can be one of three kinds: "fusiontables#fromColumn" if the column
value is to be used as is, i.e., the column values can have colors in #
RRGGBBAA format or integer line widths or icon names; "fusiontables#gradient"
if the styling of the row is to be based on applying the gradient function on
the column value; or "fusiontables#buckets" if the styling is to based on the
bucket into which the the column value falls.
Corresponds to the JSON property kind
521 522 523 |
# File 'generated/google/apis/fusiontables_v1/classes.rb', line 521 def kind @kind end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
528 529 530 531 532 533 |
# File 'generated/google/apis/fusiontables_v1/classes.rb', line 528 def update!(**args) @buckets = args[:buckets] if args.key?(:buckets) @column_name = args[:column_name] if args.key?(:column_name) @gradient = args[:gradient] if args.key?(:gradient) @kind = args[:kind] if args.key?(:kind) end |