VerticalAnnotation Struct
Vertical annotation to be added to a graph.
| Source | aws-cloudwatch/lib/graph.ts |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudwatch as cloudwatch } from 'aws-cdk-lib';
const verticalAnnotation: cloudwatch.VerticalAnnotation = {
date: 'date',
// the properties below are optional
color: 'color',
fill: cloudwatch.VerticalShading.NONE,
label: 'label',
visible: false,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cloudwatch as cloudwatch
vertical_annotation = cloudwatch.VerticalAnnotation(
date="date",
# the properties below are optional
color="color",
fill=cloudwatch.VerticalShading.NONE,
label="label",
visible=False
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudwatch.*;
VerticalAnnotation verticalAnnotation = VerticalAnnotation.builder()
.date("date")
// the properties below are optional
.color("color")
.fill(VerticalShading.NONE)
.label("label")
.visible(false)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudWatch;
var verticalAnnotation = new VerticalAnnotation {
Date = "date",
// the properties below are optional
Color = "color",
Fill = VerticalShading.NONE,
Label = "label",
Visible = false
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
verticalAnnotation := &VerticalAnnotation{
Date: jsii.String("date"),
// the properties below are optional
Color: jsii.String("color"),
Fill: awscdk.Aws_cloudwatch.VerticalShading_NONE,
Label: jsii.String("label"),
Visible: jsii.Boolean(false),
}
Properties
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.
Default: Automatic color
The date and time (in ISO 8601 format) in the graph where the vertical annotation line is to appear.
filloptionalVerticalShadingfilloptionalVerticalShadingfilloptionalVerticalShadingFilloptionalVerticalShadingFilloptionalVerticalShading #Add shading before or after the annotation.
Default: No shading
Label for the annotation.
Default: No label
visibleoptionalbooleanvisibleoptionalboolvisibleoptionalBooleanVisibleoptionalboolVisibleoptional*bool = true #Whether the annotation is visible.