public class BarCharts
extends java.lang.Object
BarChart instances| Modifier and Type | Method and Description |
|---|---|
static double |
computeMax(BarChart barChart)
Computes the maximum value that appears in the given
BarChart. |
static double |
computeMin(BarChart barChart)
Computes the minimum value that appears in the given
BarChart. |
static BarChart |
createFromList(java.util.List<? extends java.lang.Number> list,
java.awt.Paint barPaint)
Create a simple
BarChart that is a view on the given list. |
static BarChart |
createFromList(java.util.List<? extends java.lang.Number> list,
java.awt.Paint barPaint,
boolean paintLabels,
boolean paintValueStrings)
Create a simple
BarChart that is a view on the given
list. |
static double |
getMax(double optionalMax,
BarChart barChart)
If the given optional value is not NaN, then it will be returned.
|
static double |
getMin(double optionalMin,
BarChart barChart)
If the given optional value is not NaN, then it will be returned.
|
public static BarChart createFromList(java.util.List<? extends java.lang.Number> list, java.awt.Paint barPaint)
BarChart that is a view on the given list.
This means that changes in the given list will be visible in the returned
chart.value strings
of the values in the list, with an unspecified string format.null, then
0.0 will be used as the value.list - The listbarPaint - The paint (color) to use for the barsBarChartpublic static BarChart createFromList(java.util.List<? extends java.lang.Number> list, java.awt.Paint barPaint, boolean paintLabels, boolean paintValueStrings)
BarChart that is a view on the given
list. This means that changes in the given list will be visible in
the returned chart.null, then
0.0 will be used as the value.list - The listbarPaint - The paint (color) to use for the barspaintLabels - Whether the chart should have
labels. These will just be the indices
of the bars.paintValueStrings - Whether the chart should have
value strings. These will be
the string values of the values, in an unspecified format.BarChartpublic static double computeMin(BarChart barChart)
BarChart.
Returns POSITIVE_INFINITY if the given chart is empty.barChart - The BarChartpublic static double computeMax(BarChart barChart)
BarChart.
Returns NEGATIVE_INFINITY if the given chart is empty.barChart - The BarChartpublic static double getMin(double optionalMin,
BarChart barChart)
BarChart will be returned.
If the BarChart does not have any bars, then 0.0 will be
returned.optionalMin - The optional minimum valuebarChart - The BarChartpublic static double getMax(double optionalMax,
BarChart barChart)
BarChart will be returned.
If the BarChart does not have any bars, then 1.0 will be
returned.optionalMax - The optional maximum valuebarChart - The BarChartCopyright © 2019. All Rights Reserved.