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

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

Represents a StyleFunction within a StyleSetting

Defined Under Namespace

Classes: Gradient

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) ⇒ 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

#bucketsArray<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_nameString

Name of the column whose value is used in the style. Corresponds to the JSON property columnName

Returns:

  • (String)


506
507
508
# File 'generated/google/apis/fusiontables_v1/classes.rb', line 506

def column_name
  @column_name
end

#gradientGoogle::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

#kindString

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

Returns:

  • (String)


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