interface GaugeWidgetProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.CloudWatch.GaugeWidgetProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#GaugeWidgetProps |
![]() | software.amazon.awscdk.services.cloudwatch.GaugeWidgetProps |
![]() | aws_cdk.aws_cloudwatch.GaugeWidgetProps |
![]() | aws-cdk-lib » aws_cloudwatch » GaugeWidgetProps |
Properties for a GaugeWidget.
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
Name | Type | Description |
---|---|---|
annotations? | Horizontal [] | Annotations for the left Y axis. |
height? | number | Height of the widget. |
left | YAxis | Left Y axis. |
legend | Legend | Position of the legend. |
live | boolean | Whether the graph should show live data. |
metrics? | IMetric [] | Metrics to display on left Y axis. |
period? | Duration | The default period for all metrics in this widget. |
region? | string | The region the metrics of this graph should be taken from. |
set | boolean | Whether to show the value from the entire time range. Only applicable for Bar and Pie charts. |
statistic? | string | The default statistic to be displayed for each metric. |
title? | string | Title for the graph. |
width? | number | Width of the widget, in a grid of 24 units wide. |
annotations?
Type:
Horizontal
[]
(optional, default: No annotations)
Annotations for the left Y axis.
height?
Type:
number
(optional, default: 6 for Alarm and Graph widgets.
3 for single value widgets where most recent value of a metric is displayed.)
Height of the widget.
leftYAxis?
Type:
YAxis
(optional, default: None)
Left Y axis.
legendPosition?
Type:
Legend
(optional, default: bottom)
Position of the legend.
liveData?
Type:
boolean
(optional, default: false)
Whether the graph should show live data.
metrics?
Type:
IMetric
[]
(optional, default: No metrics)
Metrics to display on left Y axis.
period?
Type:
Duration
(optional, default: cdk.Duration.seconds(300))
The default period for all metrics in this widget.
The period is the length of time represented by one data point on the graph. This default can be overridden within each metric definition.
region?
Type:
string
(optional, default: Current region)
The region the metrics of this graph should be taken from.
setPeriodToTimeRange?
Type:
boolean
(optional, default: false)
Whether to show the value from the entire time range. Only applicable for Bar and Pie charts.
If false, values will be from the most recent period of your chosen time range; if true, shows the value from the entire time range.
statistic?
Type:
string
(optional, default: The statistic for each metric is used)
The default statistic to be displayed for each metric.
This default can be overridden within the definition of each individual metric
title?
Type:
string
(optional, default: None)
Title for the graph.
width?
Type:
number
(optional, default: 6)
Width of the widget, in a grid of 24 units wide.