Package com.jalios.jcms.chart
Class ChartUtil
java.lang.Object
com.jalios.jcms.chart.ChartUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic RatioSeriesCreate a ration series from a lambdastatic doublemax(ChartSeries<?> series) compute the max of all value of a seriesstatic doublemax(TimeChartSeries series) compute the sum of all value of a seriesstatic doublemean(ChartSeries<?> series) compute the arithmetic mean of all value of a seriesstatic doublemean(TimeChartSeries series) compute the arithmetic mean of all value of a seriesstatic doublemin(ChartSeries<?> series) compute the min of all value of a seriesstatic doublemin(TimeChartSeries series) compute the sum of all value of a seriesstatic voidsortRatioSeriesByValue(RatioSeries series) Sort a ratioSeries by valuestatic doublesum(ChartSeries<?> series) compute the sum of all value of a seriesstatic doublesum(TimeChartSeries series) compute the sum of all value of a seriesstatic StringwriteLegend(Chart chart, String userLang) Create HTML legendstatic StringwriteLegend(PieChart chart, String userLang) Create HTML legendstatic StringwriteLegend(TimeChart chart, String userLang) Create HTML legend
-
Method Details
-
sum
compute the sum of all value of a series- Parameters:
series- theChartSeries- Returns:
- the sum
-
mean
compute the arithmetic mean of all value of a series- Parameters:
series- theChartSeries- Returns:
- the mean
-
max
compute the max of all value of a series- Parameters:
series- theChartSeries- Returns:
- the max
-
min
compute the min of all value of a series- Parameters:
series- theChartSeries- Returns:
- the min
-
sum
compute the sum of all value of a series- Parameters:
series- theTimeChartSeries- Returns:
- the sum
-
mean
compute the arithmetic mean of all value of a series- Parameters:
series- theTimeChartSeries- Returns:
- the mean
-
max
compute the sum of all value of a series- Parameters:
series- theChartSeries- Returns:
- the sum
-
min
compute the sum of all value of a series- Parameters:
series- theChartSeries- Returns:
- the sum
-
sortRatioSeriesByValue
Sort a ratioSeries by value- Parameters:
series- theRatioSeries
-
createRatioSeries
public static RatioSeries createRatioSeries(Map<String, Integer> inputMap, Function<String, String> getLabel) Create a ration series from a lambda- Parameters:
inputMap- the map with key, valuegetLabel- the method to get label from key- Returns:
- the
RatioSeries
-
writeLegend
Create HTML legend- Parameters:
chart- theTimeChartuserLang- the lang- Returns:
- the HTML legend
-
writeLegend
Create HTML legend- Parameters:
chart- theChartuserLang- the lang- Returns:
- the HTML legend
-
writeLegend
Create HTML legend- Parameters:
chart- thePieChartuserLang- the lang- Returns:
- the HTML legend
-