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

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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ BasicChartSpec

Returns a new instance of BasicChartSpec.



1389
1390
1391
# File 'lib/google/apis/sheets_v4/classes.rb', line 1389

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



1318
1319
1320
# File 'lib/google/apis/sheets_v4/classes.rb', line 1318

def axis
  @axis
end

#chart_typeString

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

Returns:

  • (String)


1323
1324
1325
# File 'lib/google/apis/sheets_v4/classes.rb', line 1323

def chart_type
  @chart_type
end

#compare_modeString

The behavior of tooltips and data highlighting when hovering on data and chart area. Corresponds to the JSON property compareMode

Returns:

  • (String)


1329
1330
1331
# File 'lib/google/apis/sheets_v4/classes.rb', line 1329

def compare_mode
  @compare_mode
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



1334
1335
1336
# File 'lib/google/apis/sheets_v4/classes.rb', line 1334

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)


1342
1343
1344
# File 'lib/google/apis/sheets_v4/classes.rb', line 1342

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)


1349
1350
1351
# File 'lib/google/apis/sheets_v4/classes.rb', line 1349

def interpolate_nulls
  @interpolate_nulls
end

#legend_positionString

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

Returns:

  • (String)


1355
1356
1357
# File 'lib/google/apis/sheets_v4/classes.rb', line 1355

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)


1361
1362
1363
# File 'lib/google/apis/sheets_v4/classes.rb', line 1361

def line_smoothing
  @line_smoothing
end

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

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



1367
1368
1369
# File 'lib/google/apis/sheets_v4/classes.rb', line 1367

def series
  @series
end

#stacked_typeString

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

Returns:

  • (String)


1373
1374
1375
# File 'lib/google/apis/sheets_v4/classes.rb', line 1373

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)


1378
1379
1380
# File 'lib/google/apis/sheets_v4/classes.rb', line 1378

def three_dimensional
  @three_dimensional
end

#total_data_labelGoogle::Apis::SheetsV4::DataLabel

Settings for one set of data labels. Data labels are annotations that appear next to a set of data, such as the points on a line chart, and provide additional information about what the data represents, such as a text representation of the value behind that point on the graph. Corresponds to the JSON property totalDataLabel



1387
1388
1389
# File 'lib/google/apis/sheets_v4/classes.rb', line 1387

def total_data_label
  @total_data_label
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
# File 'lib/google/apis/sheets_v4/classes.rb', line 1394

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