Class: Google::Apis::SheetsV4::HistogramChartSpec
- Inherits:
-
Object
- Object
- Google::Apis::SheetsV4::HistogramChartSpec
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/sheets_v4/classes.rb,
generated/google/apis/sheets_v4/representations.rb,
generated/google/apis/sheets_v4/representations.rb
Overview
A histogram chart. A histogram chart groups data items into bins, displaying each bin as a column of stacked items. Histograms are used to display the distribution of a dataset. Each column of items represents a range into which those items fall. The number of bins can be chosen automatically or specified explicitly.
Instance Attribute Summary collapse
-
#bucket_size ⇒ Float
By default the bucket size (the range of values stacked in a single column) is chosen automatically, but it may be overridden here.
-
#legend_position ⇒ String
The position of the chart legend.
-
#outlier_percentile ⇒ Float
The outlier percentile is used to ensure that outliers do not adversely affect the calculation of bucket sizes.
-
#series ⇒ Array<Google::Apis::SheetsV4::HistogramSeries>
The series for a histogram may be either a single series of values to be bucketed or multiple series, each of the same length, containing the name of the series followed by the values to be bucketed for that series.
-
#show_item_dividers ⇒ Boolean
(also: #show_item_dividers?)
Whether horizontal divider lines should be displayed between items in each column.
Instance Method Summary collapse
-
#initialize(**args) ⇒ HistogramChartSpec
constructor
A new instance of HistogramChartSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ HistogramChartSpec
Returns a new instance of HistogramChartSpec.
5992 5993 5994 |
# File 'generated/google/apis/sheets_v4/classes.rb', line 5992 def initialize(**args) update!(**args) end |
Instance Attribute Details
#bucket_size ⇒ Float
By default the bucket size (the range of values stacked in a single
column) is chosen automatically, but it may be overridden here.
E.g., A bucket size of 1.5 results in buckets from 0 - 1.5, 1.5 - 3.0, etc.
Cannot be negative.
This field is optional.
Corresponds to the JSON property bucketSize
5961 5962 5963 |
# File 'generated/google/apis/sheets_v4/classes.rb', line 5961 def bucket_size @bucket_size end |
#legend_position ⇒ String
The position of the chart legend.
Corresponds to the JSON property legendPosition
5966 5967 5968 |
# File 'generated/google/apis/sheets_v4/classes.rb', line 5966 def legend_position @legend_position end |
#outlier_percentile ⇒ Float
The outlier percentile is used to ensure that outliers do not adversely
affect the calculation of bucket sizes. For example, setting an outlier
percentile of 0.05 indicates that the top and bottom 5% of values when
calculating buckets. The values are still included in the chart, they will
be added to the first or last buckets instead of their own buckets.
Must be between 0.0 and 0.5.
Corresponds to the JSON property outlierPercentile
5976 5977 5978 |
# File 'generated/google/apis/sheets_v4/classes.rb', line 5976 def outlier_percentile @outlier_percentile end |
#series ⇒ Array<Google::Apis::SheetsV4::HistogramSeries>
The series for a histogram may be either a single series of values to be
bucketed or multiple series, each of the same length, containing the name
of the series followed by the values to be bucketed for that series.
Corresponds to the JSON property series
5983 5984 5985 |
# File 'generated/google/apis/sheets_v4/classes.rb', line 5983 def series @series end |
#show_item_dividers ⇒ Boolean Also known as: show_item_dividers?
Whether horizontal divider lines should be displayed between items in each
column.
Corresponds to the JSON property showItemDividers
5989 5990 5991 |
# File 'generated/google/apis/sheets_v4/classes.rb', line 5989 def show_item_dividers @show_item_dividers end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5997 5998 5999 6000 6001 6002 6003 |
# File 'generated/google/apis/sheets_v4/classes.rb', line 5997 def update!(**args) @bucket_size = args[:bucket_size] if args.key?(:bucket_size) @legend_position = args[:legend_position] if args.key?(:legend_position) @outlier_percentile = args[:outlier_percentile] if args.key?(:outlier_percentile) @series = args[:series] if args.key?(:series) @show_item_dividers = args[:show_item_dividers] if args.key?(:show_item_dividers) end |