-
public class Description extends ComponentBase
Created by Philipp Jahoda on 17/09/16.
-
-
Constructor Summary
Constructors Constructor Description Description()
-
Method Summary
Modifier and Type Method Description StringgetText()Returns the description text. voidsetText(String text)Sets the text to be shown as the description.Never set this to null as this will cause nullpointer exception when drawing with Android Canvas. voidsetPosition(float x, float y)Sets a custom position for the description text in pixels on the screen. MPPointFgetPosition()Returns the customized position of the description, or null if none set. voidsetTextAlign(Paint.Align align)Sets the text alignment of the description text. Paint.AligngetTextAlign()Returns the text alignment of the description. -
Methods inherited from class com.github.mikephil.charting.components.ComponentBase
getTextColor, getTextSize, getTypeface, getXOffset, getYOffset, isEnabled, setEnabled, setTextColor, setTextSize, setTypeface, setXOffset, setYOffset -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
setText
void setText(String text)
Sets the text to be shown as the description.Never set this to null as this will cause nullpointer exception when drawing with Android Canvas.
-
setPosition
void setPosition(float x, float y)
Sets a custom position for the description text in pixels on the screen.
- Parameters:
x- - xcoordinatey- - ycoordinate
-
getPosition
MPPointF getPosition()
Returns the customized position of the description, or null if none set.
-
setTextAlign
void setTextAlign(Paint.Align align)
Sets the text alignment of the description text. Default RIGHT.
-
getTextAlign
Paint.Align getTextAlign()
Returns the text alignment of the description.
-
-
-
-