public class DefaultValueFormatter extends java.lang.Object implements ValueFormatter
| Constructor and Description |
|---|
DefaultValueFormatter(int digits)
Constructor that specifies to how many digits the value should be
formatted.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public DefaultValueFormatter(int digits)
digits - public java.lang.String getFormattedValue(float value,
Entry entry,
int dataSetIndex,
ViewPortHandler viewPortHandler)
ValueFormattergetFormattedValue in interface ValueFormattervalue - 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, ...)