Class ChartUtil


  • public class ChartUtil
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static RatioSeries createRatioSeries​(java.util.Map<java.lang.String,​java.lang.Integer> inputMap, java.util.function.Function<java.lang.String,​java.lang.String> getLabel)
      Create a ration series from a lambda
      static double max​(ChartSeries<?> series)
      compute the max of all value of a series
      static double max​(TimeChartSeries series)
      compute the sum of all value of a series
      static double mean​(ChartSeries<?> series)
      compute the arithmetic mean of all value of a series
      static double mean​(TimeChartSeries series)
      compute the arithmetic mean of all value of a series
      static double min​(ChartSeries<?> series)
      compute the min of all value of a series
      static double min​(TimeChartSeries series)
      compute the sum of all value of a series
      static void sortRatioSeriesByValue​(RatioSeries series)
      Sort a ratioSeries by value
      static double sum​(ChartSeries<?> series)
      compute the sum of all value of a series
      static double sum​(TimeChartSeries series)
      compute the sum of all value of a series
      static java.lang.String writeLegend​(Chart chart, java.lang.String userLang)
      Create HTML legend
      static java.lang.String writeLegend​(PieChart chart, java.lang.String userLang)
      Create HTML legend
      static java.lang.String writeLegend​(TimeChart chart, java.lang.String userLang)
      Create HTML legend
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • sum

        public static double sum​(ChartSeries<?> series)
        compute the sum of all value of a series
        Parameters:
        series - the ChartSeries
        Returns:
        the sum
      • mean

        public static double mean​(ChartSeries<?> series)
        compute the arithmetic mean of all value of a series
        Parameters:
        series - the ChartSeries
        Returns:
        the mean
      • max

        public static double max​(ChartSeries<?> series)
        compute the max of all value of a series
        Parameters:
        series - the ChartSeries
        Returns:
        the max
      • min

        public static double min​(ChartSeries<?> series)
        compute the min of all value of a series
        Parameters:
        series - the ChartSeries
        Returns:
        the min
      • sum

        public static double sum​(TimeChartSeries series)
        compute the sum of all value of a series
        Parameters:
        series - the TimeChartSeries
        Returns:
        the sum
      • mean

        public static double mean​(TimeChartSeries series)
        compute the arithmetic mean of all value of a series
        Parameters:
        series - the TimeChartSeries
        Returns:
        the mean
      • max

        public static double max​(TimeChartSeries series)
        compute the sum of all value of a series
        Parameters:
        series - the ChartSeries
        Returns:
        the sum
      • min

        public static double min​(TimeChartSeries series)
        compute the sum of all value of a series
        Parameters:
        series - the ChartSeries
        Returns:
        the sum
      • sortRatioSeriesByValue

        public static void sortRatioSeriesByValue​(RatioSeries series)
        Sort a ratioSeries by value
        Parameters:
        series - the RatioSeries
      • createRatioSeries

        public static RatioSeries createRatioSeries​(java.util.Map<java.lang.String,​java.lang.Integer> inputMap,
                                                    java.util.function.Function<java.lang.String,​java.lang.String> getLabel)
        Create a ration series from a lambda
        Parameters:
        inputMap - the map with key, value
        getLabel - the method to get label from key
        Returns:
        the RatioSeries
      • writeLegend

        public static java.lang.String writeLegend​(TimeChart chart,
                                                   java.lang.String userLang)
        Create HTML legend
        Parameters:
        chart - the TimeChart
        userLang - the lang
        Returns:
        the HTML legend
      • writeLegend

        public static java.lang.String writeLegend​(Chart chart,
                                                   java.lang.String userLang)
        Create HTML legend
        Parameters:
        chart - the Chart
        userLang - the lang
        Returns:
        the HTML legend
      • writeLegend

        public static java.lang.String writeLegend​(PieChart chart,
                                                   java.lang.String userLang)
        Create HTML legend
        Parameters:
        chart - the PieChart
        userLang - the lang
        Returns:
        the HTML legend