Class: Google::Apis::FusiontablesV2::StyleFunction
- Inherits:
- 
      Object
      
        - Object
- Google::Apis::FusiontablesV2::StyleFunction
 
- 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
- 
  
    
      #buckets  ⇒ Array<Google::Apis::FusiontablesV2::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::FusiontablesV2::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
| 580 581 582 | # File 'generated/google/apis/fusiontables_v2/classes.rb', line 580 def initialize(**args) update!(**args) end | 
Instance Attribute Details
#buckets ⇒ Array<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_name ⇒ String
Name of the column whose value is used in the style.
Corresponds to the JSON property columnName
| 563 564 565 | # File 'generated/google/apis/fusiontables_v2/classes.rb', line 563 def column_name @column_name end | 
#gradient ⇒ Google::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 | 
#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
| 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 |