Class ChartUtils


  • public abstract class ChartUtils
    extends Object

    ChartUtils class.

    Version:
    $Id: $
    Author:
    David Hustace
    • Constructor Detail

      • ChartUtils

        public ChartUtils()
    • Method Detail

      • getBarChart

        public static org.jfree.chart.JFreeChart getBarChart​(String chartName)
                                                      throws IOException,
                                                             SQLException
        This method will returns a JFreeChart bar chart constructed based on XML configuration.
        Parameters:
        chartName - Name specified in chart-configuration.xml
        Returns:
        JFreeChart constructed from the chartName
        Throws:
        IOException - if any.
        SQLException - if any.
      • getBarChartAsPNGByteArray

        public static byte[] getBarChartAsPNGByteArray​(String chartName)
                                                throws IOException,
                                                       SQLException
        Helper method that returns the JFreeChart as a PNG byte array.
        Parameters:
        chartName - a String object.
        Returns:
        a byte array
        Throws:
        IOException - if any.
        SQLException - if any.
      • getBarChartConfigByName

        public static BarChart getBarChartConfigByName​(String chartName)
                                                throws IOException
        Helper method used to retrieve the XML defined BarChart
        Parameters:
        chartName - a String object.
        Returns:
        a BarChart
        Throws:
        IOException - if any.
      • getChartCollection

        public static Collection<BarChart> getChartCollection()
                                                       throws IOException
        Helper method used to fetch an Iterator for all defined Charts
        Returns:
        BarChart Iterator
        Throws:
        IOException - if any.
      • getChartCollectionIterator

        public static Iterator<BarChart> getChartCollectionIterator()
                                                             throws IOException
        Helper method used to fetch an Iterator for all defined Charts
        Returns:
        BarChart Iterator
        Throws:
        IOException - if any.