Package 

Class StackedValueFormatter

    • Method Summary

      Modifier and Type Method Description
      String getFormattedValue(Float value, Entry entry, Integer dataSetIndex, ViewPortHandler viewPortHandler) Called when a value (from labels inside the chart) is formatted before being drawn.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 top
        appendix - a string that should be appended behind the value
        decimals - 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 formatted
        entry - the entry the value belongs to - in e.g.
        dataSetIndex - the index of the DataSet the entry in focus belongs to
        viewPortHandler - provides information about the current chart state (scale, translation, ...