org.pentaho.chart
Class ChartFactory

java.lang.Object
  extended by org.pentaho.chart.ChartFactory

public class ChartFactory
extends Object

API for generating charts

Author:
David Kincade

Method Summary
static ChartDocumentContext generateChart(ChartDocument chart, ChartTableModel tableModel)
           
static ChartDocumentContext generateChart(URL chartURL)
          Creates a chart based on the chart definition TODO: document / complete
static ChartDocumentContext generateChart(URL chartURL, ChartTableModel tableModel)
          Creats a chart based on the chart definition and the table model TODO: document / complete
static ChartDocument getChartDocument(URL chartURL)
           
static ChartDocument getChartDocument(URL chartURL, boolean cascadeStyles)
           
static IChartPlugin getPlugin(String pluginId)
           
static void loadDefaultChartPlugins(List<IChartPlugin> plugins)
          This method is called from a platform system listener on startup, to initialize the available plugins from the chartbeans configuration file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPlugin

public static IChartPlugin getPlugin(String pluginId)

loadDefaultChartPlugins

public static void loadDefaultChartPlugins(List<IChartPlugin> plugins)
This method is called from a platform system listener on startup, to initialize the available plugins from the chartbeans configuration file.


generateChart

public static ChartDocumentContext generateChart(URL chartURL)
                                          throws org.pentaho.reporting.libraries.resourceloader.ResourceException
Creates a chart based on the chart definition TODO: document / complete

Parameters:
chartURL - the URL of the chart definition
Throws:
org.pentaho.reporting.libraries.resourceloader.ResourceException - indicates an error loading the chart resources
InvalidChartDefinition - indicates an error with chart definition

getChartDocument

public static ChartDocument getChartDocument(URL chartURL)
                                      throws org.pentaho.reporting.libraries.resourceloader.ResourceException
Throws:
org.pentaho.reporting.libraries.resourceloader.ResourceException

getChartDocument

public static ChartDocument getChartDocument(URL chartURL,
                                             boolean cascadeStyles)
                                      throws org.pentaho.reporting.libraries.resourceloader.ResourceException
Throws:
org.pentaho.reporting.libraries.resourceloader.ResourceException

generateChart

public static ChartDocumentContext generateChart(URL chartURL,
                                                 ChartTableModel tableModel)
                                          throws org.pentaho.reporting.libraries.resourceloader.ResourceException
Creats a chart based on the chart definition and the table model TODO: document / complete

Parameters:
chartURL - the URL of the chart definition
tableModel - the chart table model for this chart
Throws:
org.pentaho.reporting.libraries.resourceloader.ResourceException - indicates an error loading the chart resources
InvalidChartDefinition - indicates an error with chart definition

generateChart

public static ChartDocumentContext generateChart(ChartDocument chart,
                                                 ChartTableModel tableModel)
                                          throws org.pentaho.reporting.libraries.resourceloader.ResourceException
Throws:
org.pentaho.reporting.libraries.resourceloader.ResourceException