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



3676
3677
3678
# File 'generated/google/apis/sheets_v4/classes.rb', line 3676

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



3637
3638
3639
# File 'generated/google/apis/sheets_v4/classes.rb', line 3637

def axis
  @axis
end

#chart_typeString

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

Returns:

  • (String)


3658
3659
3660
# File 'generated/google/apis/sheets_v4/classes.rb', line 3658

def chart_type
  @chart_type
end

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

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



3674
3675
3676
# File 'generated/google/apis/sheets_v4/classes.rb', line 3674

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)


3626
3627
3628
# File 'generated/google/apis/sheets_v4/classes.rb', line 3626

def header_count
  @header_count
end

#interpolate_nullsBoolean Also known as: interpolate_nulls?

If some values in a series are missing, gaps may appear in the chart (e.g, segments of lines in a line chart will be missing). To eliminate these gaps set this to true. Applies to Line, Area, and Combo charts. Corresponds to the JSON property interpolateNulls

Returns:

  • (Boolean)


3652
3653
3654
# File 'generated/google/apis/sheets_v4/classes.rb', line 3652

def interpolate_nulls
  @interpolate_nulls
end

#legend_positionString

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

Returns:

  • (String)


3668
3669
3670
# File 'generated/google/apis/sheets_v4/classes.rb', line 3668

def legend_position
  @legend_position
end

#line_smoothingBoolean Also known as: line_smoothing?

Gets whether all lines should be rendered smooth or straight by default. Applies to Line charts. Corresponds to the JSON property lineSmoothing

Returns:

  • (Boolean)


3616
3617
3618
# File 'generated/google/apis/sheets_v4/classes.rb', line 3616

def line_smoothing
  @line_smoothing
end

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

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



3663
3664
3665
# File 'generated/google/apis/sheets_v4/classes.rb', line 3663

def series
  @series
end

#stacked_typeString

The stacked type for charts that support vertical stacking. Applies to Area, Bar, Column, and Stepped Area charts. Corresponds to the JSON property stackedType

Returns:

  • (String)


3632
3633
3634
# File 'generated/google/apis/sheets_v4/classes.rb', line 3632

def stacked_type
  @stacked_type
end

#three_dimensionalBoolean Also known as: three_dimensional?

True to make the chart 3D. Applies to Bar and Column charts. Corresponds to the JSON property threeDimensional

Returns:

  • (Boolean)


3643
3644
3645
# File 'generated/google/apis/sheets_v4/classes.rb', line 3643

def three_dimensional
  @three_dimensional
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
# File 'generated/google/apis/sheets_v4/classes.rb', line 3681

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