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

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

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.


580
581
582
# File 'generated/google/apis/fusiontables_v2/classes.rb', line 580

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

Instance Attribute Details

#bucketsArray<Google::Apis::FusiontablesV2::Bucket>

Bucket function that assigns a style based on the range a column value falls into. Corresponds to the JSON property buckets


558
559
560
# File 'generated/google/apis/fusiontables_v2/classes.rb', line 558

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)

563
564
565
# File 'generated/google/apis/fusiontables_v2/classes.rb', line 563

def column_name
  @column_name
end

#gradientGoogle::Apis::FusiontablesV2::StyleFunction::Gradient

Gradient function that interpolates a range of colors based on column value. Corresponds to the JSON property gradient


568
569
570
# File 'generated/google/apis/fusiontables_v2/classes.rb', line 568

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)

578
579
580
# File 'generated/google/apis/fusiontables_v2/classes.rb', line 578

def kind
  @kind
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


585
586
587
588
589
590
# File 'generated/google/apis/fusiontables_v2/classes.rb', line 585

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