Class GraphWidget

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.cloudwatch.ConcreteWidget
software.amazon.awscdk.services.cloudwatch.GraphWidget
All Implemented Interfaces:
IWidget, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:36.861Z") @Stability(Stable) public class GraphWidget extends ConcreteWidget
A dashboard widget that displays metrics.

Example:

 Dashboard dashboard;
 dashboard.addWidgets(GraphWidget.Builder.create()
         // ...
         .legendPosition(LegendPosition.RIGHT)
         .build());
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A fluent builder for GraphWidget.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.amazon.awscdk.services.cloudwatch.IWidget

    IWidget.Jsii$Default
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
     
    protected
    GraphWidget(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    GraphWidget(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Add another metric to the left Y axis of the GraphWidget.
    void
    Add another metric to the right Y axis of the GraphWidget.
    Return the widget JSON for use in the dashboard.

    Methods inherited from class software.amazon.awscdk.services.cloudwatch.ConcreteWidget

    copyMetricWarnings, getHeight, getWarnings, getWidth, getX, getY, position, setX, setY

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • GraphWidget

      protected GraphWidget(software.amazon.jsii.JsiiObjectRef objRef)
    • GraphWidget

      protected GraphWidget(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • GraphWidget

      @Stability(Stable) public GraphWidget(@NotNull GraphWidgetProps props)
      Parameters:
      props - This parameter is required.
  • Method Details

    • addLeftMetric

      @Stability(Stable) public void addLeftMetric(@NotNull IMetric metric)
      Add another metric to the left Y axis of the GraphWidget.

      Parameters:
      metric - the metric to add. This parameter is required.
    • addRightMetric

      @Stability(Stable) public void addRightMetric(@NotNull IMetric metric)
      Add another metric to the right Y axis of the GraphWidget.

      Parameters:
      metric - the metric to add. This parameter is required.
    • toJson

      @Stability(Stable) @NotNull public List<Object> toJson()
      Return the widget JSON for use in the dashboard.
      Specified by:
      toJson in interface IWidget
      Specified by:
      toJson in class ConcreteWidget