# HorizontalAnnotation

Horizontal annotation to be added to a graph.

- Source: [`aws-cloudwatch/lib/graph.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-cloudwatch/lib/graph.ts#L1051)

## Example

TypeScript:

```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,
};
```

Python:

```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

horizontal_annotation = cloudwatch.HorizontalAnnotation(
    value=123,

    # the properties below are optional
    color="color",
    fill=cloudwatch.Shading.NONE,
    label="label",
    visible=False
)
```

Java:

```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.*;

HorizontalAnnotation horizontalAnnotation = HorizontalAnnotation.builder()
        .value(123)

        // the properties below are optional
        .color("color")
        .fill(Shading.NONE)
        .label("label")
        .visible(false)
        .build();
```

C# / .NET:

```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 horizontalAnnotation = new HorizontalAnnotation {
    Value = 123,

    // the properties below are optional
    Color = "color",
    Fill = Shading.NONE,
    Label = "label",
    Visible = false
};
```

Golang:

```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"

horizontalAnnotation := &HorizontalAnnotation{
	Value: jsii.Number(123),

	// the properties below are optional
	Color: jsii.String("color"),
	Fill: awscdk.Aws_cloudwatch.Shading_NONE,
	Label: jsii.String("label"),
	Visible: jsii.Boolean(false),
}
```

## Properties

- `color`: string — 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

- `fill`: [Shading](/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.Shading.html) — Add shading above or below the annotation.

  **Default:** No shading

- `label`: string — Label for the annotation.

  **Default:** No label

- `value`: number (required) — The value of the annotation.

- `visible`: boolean = true — Whether the annotation is visible.
