Package 

Class MarkerImage

  • All Implemented Interfaces:
    com.github.mikephil.charting.components.IMarker

    
    public class MarkerImage
     implements IMarker
                        

    View that can be displayed when selecting values in the chart. Extend this class to provide custom layouts for your markers.

    • Constructor Detail

      • MarkerImage

        MarkerImage(Context context, int drawableResourceId)
        Constructor.
        Parameters:
        drawableResourceId - the drawable resource to render
    • Method Detail

      • setOffset

         void setOffset(float offsetX, float offsetY)
      • getOffsetForDrawingAtPoint

         MPPointF getOffsetForDrawingAtPoint(float posX, float posY)
        Parameters:
        posX - This is the X position at which the marker wants to be drawn.You can adjust the offset conditionally based on this argument.
        posY - This is the X position at which the marker wants to be drawn.You can adjust the offset conditionally based on this argument.
      • refreshContent

         void refreshContent(Entry e, Highlight highlight)

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

        Parameters:
        e - The Entry the IMarker belongs to.
        highlight - The highlight object contains information about the highlighted value such as it's dataset-index, theselected range or stack-index (only stacked bar entries).
      • draw

         void draw(Canvas canvas, float posX, float posY)

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