interface IMarker {
    offset: MPPointF;
    draw(canvas: Canvas, posX: any, posY: any): any;
    getOffsetForDrawingAtPoint(posX: any, posY: any): MPPointF;
    refreshContent(e: Entry, highlight: Highlight<Entry>): any;
}

Properties

offset: MPPointF

The desired (general) offset you wish the IMarker to have on the x- and y-axis. By returning x: -(width / 2) you will center the IMarker horizontally. By returning y: -(height / 2) you will center the IMarker vertically.

Methods

  • Draws the IMarker on the given position on the screen with the given Canvas object.

    Parameters

    • canvas: Canvas
    • posX: any
    • posY: any

    Returns any

  • Parameters

    • posX: any

      This is the X position at which the marker wants to be drawn. You can adjust the offset conditionally based on this argument.

    • posY: any

      This is the X position at which the marker wants to be drawn. You can adjust the offset conditionally based on this argument.

    Returns MPPointF

    The offset for drawing at the specific point. This allows conditional adjusting of the Marker position. If you have no adjustments to make, return getOffset().

  • This method enables a specified custom IMarker to update it's content every time the IMarker is redrawn.

    Parameters

    • e: Entry

      The Entry the IMarker belongs to. This can also be any subclass of Entry, like BarEntry or CandleEntry, simply cast it at runtime.

    • highlight: Highlight<Entry>

      The highlight object contains information about the highlighted value such as it's dataset-index, the selected range or stack-index (only stacked bar entries).

    Returns any