Class: Google::Apis::SheetsV4::ChartGroupRule

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/sheets_v4/classes.rb,
lib/google/apis/sheets_v4/representations.rb,
lib/google/apis/sheets_v4/representations.rb

Overview

An optional setting on the ChartData of the domain of a data source chart that defines buckets for the values in the domain rather than breaking out each individual value. For example, when plotting a data source chart, you can specify a histogram rule on the domain (it should only contain numeric values), grouping its values into buckets. Any values of a chart series that fall into the same bucket are aggregated based on the aggregate_type.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ChartGroupRule

Returns a new instance of ChartGroupRule.



2834
2835
2836
# File 'lib/google/apis/sheets_v4/classes.rb', line 2834

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

Instance Attribute Details

#date_time_ruleGoogle::Apis::SheetsV4::ChartDateTimeRule

Allows you to organize the date-time values in a source data column into buckets based on selected parts of their date or time values. Corresponds to the JSON property dateTimeRule



2826
2827
2828
# File 'lib/google/apis/sheets_v4/classes.rb', line 2826

def date_time_rule
  @date_time_rule
end

#histogram_ruleGoogle::Apis::SheetsV4::ChartHistogramRule

Allows you to organize numeric values in a source data column into buckets of constant size. Corresponds to the JSON property histogramRule



2832
2833
2834
# File 'lib/google/apis/sheets_v4/classes.rb', line 2832

def histogram_rule
  @histogram_rule
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2839
2840
2841
2842
# File 'lib/google/apis/sheets_v4/classes.rb', line 2839

def update!(**args)
  @date_time_rule = args[:date_time_rule] if args.key?(:date_time_rule)
  @histogram_rule = args[:histogram_rule] if args.key?(:histogram_rule)
end