Class JFreeChartHelper


  • public class JFreeChartHelper
    extends Object
    Internal Use Only. Helper Utility class for handling Chart.
    Author:
    ashish
    • Constructor Detail

      • JFreeChartHelper

        public JFreeChartHelper()
    • Method Detail

      • drawJFreeChart

        public static org.jfree.chart.JFreeChart drawJFreeChart​(SChart chartInfo)
      • getChartType

        public static String getChartType​(SChart chartInfo)
      • getOrientation

        public static org.jfree.chart.plot.PlotOrientation getOrientation​(SChart chartInfo)
      • drawChart

        public static void drawChart​(org.zkoss.zul.Chart chart,
                                     SChart chartInfo)
      • prepareHiLoModel

        public static org.zkoss.zul.ChartModel prepareHiLoModel​(SChartData chartData)
      • prepareCategoryModel

        public static org.zkoss.zul.ChartModel prepareCategoryModel​(SChartData chartData)
        We treat those non-numeric data in a series as 0.
      • prepareXYModel

        public static org.zkoss.zul.XYModel prepareXYModel​(SChartData chartData)
        Scatter chart that uses XYModel has following characteristics: 1. It always has two value axes to show one set of numerical data along a horizontal (value) axis and another set of numerical values along a vertical (value) axis. 2. If X axis value is not numeric, we convert them to a default series with index, e.g. 1, 2, 3, 4...etc like Excel does.
        Returns:
        data model for scatter chart
      • prepareXYZModel

        public static org.zkoss.zul.XYZModel prepareXYZModel​(SChartData chartData)
        The bubble chart that use XYZModel has similar characteristics as scatter chart. Its X axis always shows numerical data. If X axis value is not numeric, we convert them to a default series with index, e.g. 1, 2, 3, 4...etc like Excel does.
        See Also:
        prepareXYModel(SChartData)
      • preparePieModel

        public static org.zkoss.zul.ChartModel preparePieModel​(SChartData chartData)
      • getCustomFont

        public static Font getCustomFont​(String key)
        chart's font property value format: [NAME], [WEIGHT], [SIZE] e.g. SansSerif, bold, 20
        Parameters:
        key -
        Returns:
      • prepareAxis

        public static void prepareAxis​(org.jfree.chart.JFreeChart jfchart,
                                       SChart chartInfo)