public class PercentFormatter extends java.lang.Object implements ValueFormatter, YAxisValueFormatter
| Modifier and Type | Field and Description |
|---|---|
protected java.text.DecimalFormat |
mFormat |
| Constructor and Description |
|---|
PercentFormatter() |
PercentFormatter(java.text.DecimalFormat format)
Allow a custom decimalformat
|
| 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.
|
java.lang.String |
getFormattedValue(float value,
YAxis yAxis)
Called when a value from the YAxis is formatted
before being drawn.
|
public PercentFormatter()
public PercentFormatter(java.text.DecimalFormat format)
format - 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, ...)public java.lang.String getFormattedValue(float value,
YAxis yAxis)
YAxisValueFormattergetFormattedValue in interface YAxisValueFormattervalue - the YAxis value to be formattedyAxis - the YAxis object the value belongs to