-
- All Implemented Interfaces:
-
com.patrykandpatrick.vico.core.formatter.ValueFormatter
public class DecimalFormatValueFormatter implements ValueFormatter
A ValueFormatter implementation that formats values using a DecimalFormat with a given pattern.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classDecimalFormatValueFormatter.Companion
-
Constructor Summary
Constructors Constructor Description DecimalFormatValueFormatter()Creates a DecimalFormatValueFormatter using the default pattern. DecimalFormatValueFormatter(String pattern, RoundingMode roundingMode)Creates a DecimalFormatValueFormatter that will format values based on the given pattern and roundingMode. DecimalFormatValueFormatter(DecimalFormat decimalFormat)
-
Method Summary
Modifier and Type Method Description StringformatValue(Float value, ChartValues chartValues)Called to format axis labels and data labels. -
-
Constructor Detail
-
DecimalFormatValueFormatter
DecimalFormatValueFormatter()
Creates a DecimalFormatValueFormatter using the default pattern.
-
DecimalFormatValueFormatter
DecimalFormatValueFormatter(String pattern, RoundingMode roundingMode)
Creates a DecimalFormatValueFormatter that will format values based on the given pattern and roundingMode.
-
DecimalFormatValueFormatter
DecimalFormatValueFormatter(DecimalFormat decimalFormat)
-
-
Method Detail
-
formatValue
String formatValue(Float value, ChartValues chartValues)
Called to format axis labels and data labels.
- Parameters:
value- the value to be formatted.chartValues- the ChartValues used by the chart.
-
-
-
-