Class: Google::Apis::SheetsV4::BasicChartSpec
- Inherits:
-
Object
- Object
- Google::Apis::SheetsV4::BasicChartSpec
- 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
-
#axis ⇒ Array<Google::Apis::SheetsV4::BasicChartAxis>
The axis on the chart.
-
#chart_type ⇒ String
The type of the chart.
-
#compare_mode ⇒ String
The behavior of tooltips and data highlighting when hovering on data and chart area.
-
#domains ⇒ Array<Google::Apis::SheetsV4::BasicChartDomain>
The domain of data this is charting.
-
#header_count ⇒ Fixnum
The number of rows or columns in the data that are "headers".
-
#interpolate_nulls ⇒ Boolean
(also: #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).
-
#legend_position ⇒ String
The position of the chart legend.
-
#line_smoothing ⇒ Boolean
(also: #line_smoothing?)
Gets whether all lines should be rendered smooth or straight by default.
-
#series ⇒ Array<Google::Apis::SheetsV4::BasicChartSeries>
The data this chart is visualizing.
-
#stacked_type ⇒ String
The stacked type for charts that support vertical stacking.
-
#three_dimensional ⇒ Boolean
(also: #three_dimensional?)
True to make the chart 3D.
-
#total_data_label ⇒ Google::Apis::SheetsV4::DataLabel
Settings for one set of data labels.
Instance Method Summary collapse
-
#initialize(**args) ⇒ BasicChartSpec
constructor
A new instance of BasicChartSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ BasicChartSpec
Returns a new instance of BasicChartSpec.
1335 1336 1337 |
# File 'lib/google/apis/sheets_v4/classes.rb', line 1335 def initialize(**args) update!(**args) end |
Instance Attribute Details
#axis ⇒ Array<Google::Apis::SheetsV4::BasicChartAxis>
The axis on the chart.
Corresponds to the JSON property axis
1264 1265 1266 |
# File 'lib/google/apis/sheets_v4/classes.rb', line 1264 def axis @axis end |
#chart_type ⇒ String
The type of the chart.
Corresponds to the JSON property chartType
1269 1270 1271 |
# File 'lib/google/apis/sheets_v4/classes.rb', line 1269 def chart_type @chart_type end |
#compare_mode ⇒ String
The behavior of tooltips and data highlighting when hovering on data and chart
area.
Corresponds to the JSON property compareMode
1275 1276 1277 |
# File 'lib/google/apis/sheets_v4/classes.rb', line 1275 def compare_mode @compare_mode end |
#domains ⇒ Array<Google::Apis::SheetsV4::BasicChartDomain>
The domain of data this is charting. Only a single domain is supported.
Corresponds to the JSON property domains
1280 1281 1282 |
# File 'lib/google/apis/sheets_v4/classes.rb', line 1280 def domains @domains end |
#header_count ⇒ Fixnum
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
1288 1289 1290 |
# File 'lib/google/apis/sheets_v4/classes.rb', line 1288 def header_count @header_count end |
#interpolate_nulls ⇒ Boolean 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
1295 1296 1297 |
# File 'lib/google/apis/sheets_v4/classes.rb', line 1295 def interpolate_nulls @interpolate_nulls end |
#legend_position ⇒ String
The position of the chart legend.
Corresponds to the JSON property legendPosition
1301 1302 1303 |
# File 'lib/google/apis/sheets_v4/classes.rb', line 1301 def legend_position @legend_position end |
#line_smoothing ⇒ Boolean 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
1307 1308 1309 |
# File 'lib/google/apis/sheets_v4/classes.rb', line 1307 def line_smoothing @line_smoothing end |
#series ⇒ Array<Google::Apis::SheetsV4::BasicChartSeries>
The data this chart is visualizing.
Corresponds to the JSON property series
1313 1314 1315 |
# File 'lib/google/apis/sheets_v4/classes.rb', line 1313 def series @series end |
#stacked_type ⇒ String
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
1319 1320 1321 |
# File 'lib/google/apis/sheets_v4/classes.rb', line 1319 def stacked_type @stacked_type end |
#three_dimensional ⇒ Boolean Also known as: three_dimensional?
True to make the chart 3D. Applies to Bar and Column charts.
Corresponds to the JSON property threeDimensional
1324 1325 1326 |
# File 'lib/google/apis/sheets_v4/classes.rb', line 1324 def three_dimensional @three_dimensional end |
#total_data_label ⇒ Google::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
1333 1334 1335 |
# File 'lib/google/apis/sheets_v4/classes.rb', line 1333 def total_data_label @total_data_label end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 |
# File 'lib/google/apis/sheets_v4/classes.rb', line 1340 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 |