Class: Google::Apis::MonitoringV1::PieChart

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/monitoring_v1/classes.rb,
lib/google/apis/monitoring_v1/representations.rb,
lib/google/apis/monitoring_v1/representations.rb

Overview

A widget that displays timeseries data as a pie or a donut.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PieChart



1368
1369
1370
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1368

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

Instance Attribute Details

#chart_typeString

Required. Indicates the visualization type for the PieChart. Corresponds to the JSON property chartType



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

def chart_type
  @chart_type
end

#data_setsArray<Google::Apis::MonitoringV1::PieChartDataSet>

Required. The queries for the chart's data. Corresponds to the JSON property dataSets



1347
1348
1349
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1347

def data_sets
  @data_sets
end

#show_labelsBoolean Also known as: show_labels?

Optional. Indicates whether or not the pie chart should show slices' labels Corresponds to the JSON property showLabels



1352
1353
1354
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1352

def show_labels
  @show_labels
end

#show_totalBoolean Also known as: show_total?

Optional. Indicates whether or not donut chart should show the total in the middle Corresponds to the JSON property showTotal



1359
1360
1361
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1359

def show_total
  @show_total
end

#slice_aggregated_thresholdFloat

Optional. If slices's values are smaller than this value, they will be combined into other category Corresponds to the JSON property sliceAggregatedThreshold



1366
1367
1368
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1366

def slice_aggregated_threshold
  @slice_aggregated_threshold
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1373
1374
1375
1376
1377
1378
1379
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1373

def update!(**args)
  @chart_type = args[:chart_type] if args.key?(:chart_type)
  @data_sets = args[:data_sets] if args.key?(:data_sets)
  @show_labels = args[:show_labels] if args.key?(:show_labels)
  @show_total = args[:show_total] if args.key?(:show_total)
  @slice_aggregated_threshold = args[:slice_aggregated_threshold] if args.key?(:slice_aggregated_threshold)
end