Package org.jCharts.chartText
Class NumericTagGroup
java.lang.Object
org.jCharts.chartText.TextTagGroup
org.jCharts.chartText.NumericTagGroup
- All Implemented Interfaces:
Serializable
,HTMLTestable
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNumericTagGroup
(ChartFont chartFont, FontRenderContext fontRenderContext, boolean isCurrency, boolean isPercent, boolean showCommas, int roundingPowerOfTen) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLabel
(double value) void
createAxisScaleLabels
(ScaleCalculator scaleCalculator) Creates the axis labels for the passed ScaleCalculator instance.static final NumberFormat
getNumberFormatInstance
(boolean isCurrency, boolean isPercent, boolean showCommas, int roundingPowerOfTen) Allow use of this logic to not only this class but to the chart label values.Methods inherited from class org.jCharts.chartText.TextTagGroup
addLabel, getTallestLabel, getTextTag, getTotalLabelWidths, getWidestLabel, render, reverse, size, toHTML
-
Field Details
-
numberFormat
-
-
Constructor Details
-
NumericTagGroup
public NumericTagGroup(ChartFont chartFont, FontRenderContext fontRenderContext, boolean isCurrency, boolean isPercent, boolean showCommas, int roundingPowerOfTen) - Parameters:
chartFont
-fontRenderContext
-isCurrency
-isPercent
-showCommas
-roundingPowerOfTen
- the exponent of ten to round to: 1=10, -1=.1, 3=1000, etc...
-
-
Method Details
-
getNumberFormatInstance
public static final NumberFormat getNumberFormatInstance(boolean isCurrency, boolean isPercent, boolean showCommas, int roundingPowerOfTen) Allow use of this logic to not only this class but to the chart label values.- Parameters:
isCurrency
-isPercent
-showCommas
-roundingPowerOfTen
-- Returns:
- NumberFormat
-
addLabel
public void addLabel(double value) - Parameters:
value
-
-
createAxisScaleLabels
Creates the axis labels for the passed ScaleCalculator instance.- Parameters:
scaleCalculator
-
-