-
- All Implemented Interfaces:
-
com.github.mikephil.charting.formatter.IValueFormatter
public class StackedValueFormatter implements IValueFormatter
Constructor.
-
-
Constructor Summary
Constructors Constructor Description StackedValueFormatter(Boolean drawWholeStack, String appendix, Integer decimals)
-
Method Summary
Modifier and Type Method Description StringgetFormattedValue(Float value, Entry entry, Integer dataSetIndex, ViewPortHandler viewPortHandler)Called when a value (from labels inside the chart) is formatted before being drawn. -
-
Constructor Detail
-
StackedValueFormatter
StackedValueFormatter(Boolean drawWholeStack, String appendix, Integer decimals)
- Parameters:
drawWholeStack- if true, all stack values of the stacked bar entry are drawn, else only topappendix- a string that should be appended behind the valuedecimals- the number of decimal digits to use
-
-
Method Detail
-
getFormattedValue
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, ...
-
-
-
-