public class LargeValueFormatter extends java.lang.Object implements IValueFormatter, IAxisValueFormatter
| Constructor and Description |
|---|
LargeValueFormatter() |
LargeValueFormatter(java.lang.String appendix)
Creates a formatter that appends a specified text to the result string
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDecimalDigits() |
java.lang.String |
getFormattedValue(float value,
AxisBase axis)
Called when a value from an axis is to be formatted
before being drawn.
|
java.lang.String |
getFormattedValue(float value,
Entry entry,
int dataSetIndex,
ViewPortHandler viewPortHandler)
Called when a value (from labels inside the chart) is formatted
before being drawn.
|
void |
setAppendix(java.lang.String appendix)
Set an appendix text to be added at the end of the formatted value.
|
void |
setMaxLength(int maxLength) |
void |
setSuffix(java.lang.String[] suffix)
Set custom suffix to be appended after the values.
|
public LargeValueFormatter()
public LargeValueFormatter(java.lang.String appendix)
appendix - a text that will be appendedpublic java.lang.String getFormattedValue(float value,
Entry entry,
int dataSetIndex,
ViewPortHandler viewPortHandler)
IValueFormattergetFormattedValue in interface IValueFormattervalue - the value to be formattedentry - the entry the value belongs to - in e.g. BarChart, this is of class BarEntrydataSetIndex - the index of the DataSet the entry in focus belongs toviewPortHandler - provides information about the current chart state (scale, translation, ...)public java.lang.String getFormattedValue(float value,
AxisBase axis)
IAxisValueFormattergetFormattedValue in interface IAxisValueFormattervalue - the value to be formattedaxis - the axis the value belongs topublic void setAppendix(java.lang.String appendix)
appendix - public void setSuffix(java.lang.String[] suffix)
suffix - new suffixpublic void setMaxLength(int maxLength)
public int getDecimalDigits()