Draws an ellipse to the chart. A control point is place on the top, bottom, left and right points of the ellipse, allowing adjusting its size and shape.

Hierarchy

Constructors

  • Parameters

    • priceChart: TradingChart
    • chart: ChartXY<UIBackground>
    • closeValues: number[]
    • startPoint: Point
    • endPoint: Point
    • lineColor: Color
    • lineWidth: number
    • areaColor: Color

    Returns Ellipse

Methods

  • Gets the current drawing tool position in axis values.

    Returns Point[]

    • Array containing all control point positions.
  • Unsubscribes from the DrawingToolMoved event.

    Returns void

  • Unsubscribes from the PointerDown event.

    Returns void

  • Unsubscribes from the PointerEnter event.

    Returns void

  • Unsubscribes from the PointerLeave event.

    Returns void

  • Unsubscribes from the PointerUp event.

    Returns void

  • Event that triggers when drawing tool's position has been changed either by dragging it or in code.

    Parameters

    • handler: Handler<DrawingToolMovedEvent>

      Event handler containing 'leftX', 'rightX', 'topY' and 'bottomY' parameters indicating the Ellipse's new position.

    Returns void

  • Event that triggers when pointer is pressed down on top of the drawing tool.

    Parameters

    • handler: Handler<PointerDownEvent>

      Event handler containing the following parameters:

      -'xPosition' and 'yPosition' parameters return the current cursor position in axis values.

      -'xPositionClient' and 'yPositionClient' return the current cursor position in client coordinates (zero equals top-left corner).

      -'drawingTool' gets the drawing tool instance.

      -'isControlPoint' tells if the event was triggered by one of the drawing tool's control points.

      -'button' indicates the pressed mouse button.

    Returns void

  • Event that triggers when pointer is moved onto the drawing tool.

    Parameters

    • handler: Handler<PointerEnterEvent>

      Event handler containing the following parameters:

      -'xPosition' and 'yPosition' parameters return the current cursor position in axis values.

      -'xPositionClient' and 'yPositionClient' return the current cursor position in client coordinates (zero equals top-left corner).

      -'drawingTool' gets the drawing tool instance.

      -'isControlPoint' tells if the event was triggered by one of the drawing tool's control points.

    Returns void

  • Event that triggers when pointer is moved away from the drawing tool.

    Parameters

    • handler: Handler<PointerLeaveEvent>

      Event handler containing the following parameters:

      -'xPosition' and 'yPosition' parameters return the current cursor position in axis values.

      -'xPositionClient' and 'yPositionClient' return the current cursor position in client coordinates (zero equals top-left corner).

      -'drawingTool' gets the drawing tool instance.

      -'isControlPoint' tells if the event was triggered by one of the drawing tool's control points.

    Returns void

  • Event that triggers when pointer is released on top of the drawing tool.

    Parameters

    • handler: Handler<PointerUpEvent>

      Event handler containing the following parameters:

      -'xPosition' and 'yPosition' parameters return the current cursor position in axis values.

      -'xPositionClient' and 'yPositionClient' return the current cursor position in client coordinates (zero equals top-left corner).

      -'drawingTool' gets the drawing tool instance.

      -'isControlPoint' tells if the event was triggered by one of the drawing tool's control points.

      -'button' indicates the released mouse button.

    Returns void

  • Sets the area color of the Ellipse.

    Parameters

    • newColor: string

      New area color as string, should be in HEX format e.g. #FFFFFF.

    Returns void

  • Sets the line color of the Ellipse's border lines.

    Parameters

    • newColor: string

      New line color as string, should be in HEX format e.g. #FFFFFF.

    Returns void

  • Sets the width of the Ellipse's border lines.

    Parameters

    • newWidth: number

      New line width.

    Returns void

  • Updates the drawing tool based on the control points' locations.

    Parameters

    • point1X: number

      X-location of the Ellipse's left edge.

    • point2X: number

      X-location of the Ellipse's right edge.

    • point1Y: number

      Y-location of the Ellipse's bottom edge.

    • point2Y: number

      Y-location of the Ellipse's top edge.

    Returns void