org.zkoss.zssex.util
Class ChartHelper

java.lang.Object
  extended by org.zkoss.zssex.util.ChartHelper

public class ChartHelper
extends java.lang.Object

Internal Use Only. Helper Utility class for handling Chart.

Author:
ashish

Constructor Summary
ChartHelper()
           
 
Method Summary
static org.zkoss.zul.Chart createChart(SChart chartInfo)
          Creates Chart based on the SChart
static void drawChart(org.zkoss.zul.Chart chart, SChart chartInfo)
           
static JFreeChart drawJFreeChart(SChart chartInfo)
           
static java.lang.String getChartType(SChart chartInfo)
           
static java.awt.Font getCustomFont(java.lang.String key)
          chart's font property value format: [NAME], [WEIGHT], [SIZE] e.g.
static PlotOrientation getOrientation(SChart chartInfo)
           
static org.zkoss.zul.ChartModel prepareCategoryModel(SChartData chartData)
          We treat those non-numeric data in a series as 0.
static org.zkoss.zul.ChartModel prepareHiLoModel(SChartData chartData)
           
static org.zkoss.zul.ChartModel preparePieModel(SChartData chartData)
           
static org.zkoss.zul.XYModel prepareXYModel(SChartData chartData)
          Scatter chart that uses XYModel has following characteristics: 1.
static org.zkoss.zul.XYZModel prepareXYZModel(SChartData chartData)
          The bubble chart that use XYZModel has similar characteristics as scatter chart.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartHelper

public ChartHelper()
Method Detail

createChart

public static org.zkoss.zul.Chart createChart(SChart chartInfo)
Creates Chart based on the SChart

Parameters:
chartInfo -
Returns:
the created Chart based on the SChart

drawJFreeChart

public static JFreeChart drawJFreeChart(SChart chartInfo)

getChartType

public static java.lang.String getChartType(SChart chartInfo)

getOrientation

public static 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 java.awt.Font getCustomFont(java.lang.String key)
chart's font property value format: [NAME], [WEIGHT], [SIZE] e.g. SansSerif, bold, 20

Parameters:
key -
Returns:


Copyright © 2005-2010 Potix Corporation. All Rights Reserved.