Class: AWSCDK::CloudWatch::HorizontalAnnotation
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudWatch::HorizontalAnnotation
- Defined in:
- cloud_watch/horizontal_annotation.rb
Overview
Horizontal annotation to be added to a graph.
Instance Attribute Summary collapse
-
#color ⇒ String?
readonly
The hex color code, prefixed with '#' (e.g. '#00ff00'), to be used for the annotation.
-
#fill ⇒ AWSCDK::CloudWatch::Shading?
readonly
Add shading above or below the annotation.
-
#label ⇒ String?
readonly
Label for the annotation.
-
#value ⇒ Numeric
readonly
The value of the annotation.
-
#visible ⇒ Boolean?
readonly
Whether the annotation is visible.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(value:, color: nil, fill: nil, label: nil, visible: nil) ⇒ HorizontalAnnotation
constructor
A new instance of HorizontalAnnotation.
- #to_jsii ⇒ Object
Constructor Details
#initialize(value:, color: nil, fill: nil, label: nil, visible: nil) ⇒ HorizontalAnnotation
Returns a new instance of HorizontalAnnotation.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'cloud_watch/horizontal_annotation.rb', line 12 def initialize(value:, color: nil, fill: nil, label: nil, visible: nil) @value = value Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "value") @color = color Jsii::Type.check_type(@color, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "color") unless @color.nil? @fill = fill Jsii::Type.check_type(@fill, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5TaGFkaW5nIn0=")), "fill") unless @fill.nil? @label = label Jsii::Type.check_type(@label, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "label") unless @label.nil? @visible = visible Jsii::Type.check_type(@visible, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "visible") unless @visible.nil? end |
Instance Attribute Details
#color ⇒ String? (readonly)
Note:
Default: - Automatic color
The hex color code, prefixed with '#' (e.g. '#00ff00'), to be used for the annotation. The Color class has a set of standard colors that can be used here.
33 34 35 |
# File 'cloud_watch/horizontal_annotation.rb', line 33 def color @color end |
#fill ⇒ AWSCDK::CloudWatch::Shading? (readonly)
Note:
Default: No shading
Add shading above or below the annotation.
38 39 40 |
# File 'cloud_watch/horizontal_annotation.rb', line 38 def fill @fill end |
#label ⇒ String? (readonly)
Note:
Default: - No label
Label for the annotation.
43 44 45 |
# File 'cloud_watch/horizontal_annotation.rb', line 43 def label @label end |
#value ⇒ Numeric (readonly)
The value of the annotation.
28 29 30 |
# File 'cloud_watch/horizontal_annotation.rb', line 28 def value @value end |
#visible ⇒ Boolean? (readonly)
Note:
Default: true
Whether the annotation is visible.
48 49 50 |
# File 'cloud_watch/horizontal_annotation.rb', line 48 def visible @visible end |
Class Method Details
.jsii_properties ⇒ Object
50 51 52 53 54 55 56 57 58 |
# File 'cloud_watch/horizontal_annotation.rb', line 50 def self.jsii_properties { :value => "value", :color => "color", :fill => "fill", :label => "label", :visible => "visible", } end |
Instance Method Details
#to_jsii ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 |
# File 'cloud_watch/horizontal_annotation.rb', line 60 def to_jsii result = {} result.merge!({ "value" => @value, "color" => @color, "fill" => @fill, "label" => @label, "visible" => @visible, }) result.compact end |