-
public interface IValueFormatterInterface that allows custom formatting of all values inside the chart before they are being drawn to the screen. Simply create your own formatting class and let it implement IValueFormatter. Then override the getFormattedValue(...) method and return whatever you want.
-
-
Method Summary
Modifier and Type Method Description abstract StringgetFormattedValue(Float value, Entry entry, Integer dataSetIndex, ViewPortHandler viewPortHandler)Called when a value (from labels inside the chart) is formatted before being drawn. -
-
Method Detail
-
getFormattedValue
abstract String getFormattedValue(Float value, Entry entry, Integer dataSetIndex, ViewPortHandler viewPortHandler)
Called when a value (from labels inside the chart) is formatted before being drawn. For performance reasons, avoid excessive calculations and memory allocations inside this method.
- Parameters:
value- the value to be formattedentry- the entry the value belongs to - in e.g.dataSetIndex- the index of the DataSet the entry in focus belongs toviewPortHandler- provides information about the current chart state (scale, translation, ...
-
-
-
-