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

Returns a new instance of PieChart.



1521
1522
1523
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1521

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

Returns:

  • (String)


1508
1509
1510
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1508

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



1513
1514
1515
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1513

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

Returns:

  • (Boolean)


1518
1519
1520
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1518

def show_labels
  @show_labels
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1526
1527
1528
1529
1530
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1526

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)
end