aws-cdk-lib.aws_cloudwatch.YAxisProps

interface YAxisProps

LanguageType name
.NETAmazon.CDK.AWS.CloudWatch.YAxisProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#YAxisProps
Javasoftware.amazon.awscdk.services.cloudwatch.YAxisProps
Pythonaws_cdk.aws_cloudwatch.YAxisProps
TypeScript (source)aws-cdk-lib » aws_cloudwatch » YAxisProps

Properties for a Y-Axis.

Example

declare const dashboard: cloudwatch.Dashboard;
declare const errorAlarm: cloudwatch.Alarm;
declare const gaugeMetric: cloudwatch.Metric;

dashboard.addWidgets(new cloudwatch.GaugeWidget({
  metrics: [gaugeMetric],
  leftYAxis: {
    min: 0,
    max: 1000,
  }
}));

Properties

NameTypeDescription
label?stringThe label.
max?numberThe max value.
min?numberThe min value.
showUnits?booleanWhether to show units.

label?

Type: string (optional, default: No label)

The label.


max?

Type: number (optional, default: No maximum value)

The max value.


min?

Type: number (optional, default: 0)

The min value.


showUnits?

Type: boolean (optional, default: true)

Whether to show units.