Skip to content
v2.273.0

HorizontalAnnotation Struct ​

Horizontal annotation to be added to a graph.

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 horizontalAnnotation: cloudwatch.HorizontalAnnotation = {
  value: 123,

  // the properties below are optional
  color: 'color',
  fill: cloudwatch.Shading.NONE,
  label: 'label',
  visible: false,
};

Properties ​

colorstringcolorstrcolorStringColorstringColor*string= 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.
fillShadingfillShadingfillShadingFillShadingFillShading= No shading#
Add shading above or below the annotation.
labelstringlabelstrlabelStringLabelstringLabel*string= No label#
Label for the annotation.
valuenumbervalueint | floatvalueNumberValuedoubleValue*float64required#
The value of the annotation.
visiblebooleanvisibleboolvisibleBooleanVisibleboolVisible*bool= true#
Whether the annotation is visible.