Class: Google::Apis::SheetsV4::BasicChartSpec

Inherits:
Object
  • Object
show all
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

The specification for a basic chart. See BasicChartType for the list of charts this supports.

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

Returns a new instance of BasicChartSpec.



4060
4061
4062
# File 'generated/google/apis/sheets_v4/classes.rb', line 4060

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

Instance Attribute Details

#axisArray<Google::Apis::SheetsV4::BasicChartAxis>

The axis on the chart. Corresponds to the JSON property axis



4058
4059
4060
# File 'generated/google/apis/sheets_v4/classes.rb', line 4058

def axis
  @axis
end

#chart_typeString

The type of the chart. Corresponds to the JSON property chartType

Returns:

  • (String)


4028
4029
4030
# File 'generated/google/apis/sheets_v4/classes.rb', line 4028

def chart_type
  @chart_type
end

#domainsArray<Google::Apis::SheetsV4::BasicChartDomain>

The domain of data this is charting. Only a single domain is currently supported. Corresponds to the JSON property domains



4034
4035
4036
# File 'generated/google/apis/sheets_v4/classes.rb', line 4034

def domains
  @domains
end

#header_countFixnum

The number of rows or columns in the data that are "headers". If not set, Google Sheets will guess how many rows are headers based on the data. (Note that BasicChartAxis.title may override the axis title inferred from the header values.) Corresponds to the JSON property headerCount

Returns:

  • (Fixnum)


4043
4044
4045
# File 'generated/google/apis/sheets_v4/classes.rb', line 4043

def header_count
  @header_count
end

#legend_positionString

The position of the chart legend. Corresponds to the JSON property legendPosition

Returns:

  • (String)


4053
4054
4055
# File 'generated/google/apis/sheets_v4/classes.rb', line 4053

def legend_position
  @legend_position
end

#seriesArray<Google::Apis::SheetsV4::BasicChartSeries>

The data this chart is visualizing. Corresponds to the JSON property series



4048
4049
4050
# File 'generated/google/apis/sheets_v4/classes.rb', line 4048

def series
  @series
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4065
4066
4067
4068
4069
4070
4071
4072
# File 'generated/google/apis/sheets_v4/classes.rb', line 4065

def update!(**args)
  @chart_type = args[:chart_type] if args.key?(:chart_type)
  @domains = args[:domains] if args.key?(:domains)
  @header_count = args[:header_count] if args.key?(:header_count)
  @series = args[:series] if args.key?(:series)
  @legend_position = args[:legend_position] if args.key?(:legend_position)
  @axis = args[:axis] if args.key?(:axis)
end