Package org.eclipse.birt.chart.api

# Class ChartEngine

java.lang.Object
org.eclipse.birt.chart.api.ChartEngine

public class ChartEngine extends Object
The Entry Point class to access the Eclipse Chart Engine (ECE) API

## Method Summary

Modifier and Type
Method
Description
`final IDataSetProcessor`
`getDataSetProcessor(Class cSeries)`
Retrieves the first instance of a data set processor registered as an extension for a given series type.
`IGenerator`
`getGenerator()`
Returns the IChartGenerator interface used to run and render charts
`IDeviceRenderer`
`getRenderer(String deviceID)`
Loads a device renderer, required by IChartGenerator to render charts
`Serializer`
`getSerializer()`
Deprecated.
The Serializer instance is decoupled from the ChartEngine.
`static ChartEngine`
`instance()`
Returns a singleton instance of the Chart Engine
`static ChartEngine`
`instance(org.eclipse.birt.core.framework.PlatformConfig config)`
Retrieves a singleton instance of the Chart Engine Initializes the OSGi Platform framework to load chart extension bundles unless the STANDALONE flag was set in PlatformConfig property.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### instance

public static ChartEngine instance(org.eclipse.birt.core.framework.PlatformConfig config)
Retrieves a singleton instance of the Chart Engine Initializes the OSGi Platform framework to load chart extension bundles unless the STANDALONE flag was set in PlatformConfig property. If the config is null, it will use the BIRT_HOME JVM property to find the OSGi chart bundles. Subsequent calls to this method will ignore the config parameter .

Parameters:
  `config` - The OSGi platform configuration. Can be null.

### instance

public static ChartEngine instance()
Returns a singleton instance of the Chart Engine

Returns:
  A singleton instance of the Chart Engine

### getSerializer

@Deprecated public Serializer getSerializer()
Deprecated.
The Serializer instance is decoupled from the ChartEngine. To obtain a instance of SerializerImpl use: SerializerImpl.instance( ).
Retrieve the Serializer interface, used for loading/saving chart design from/to an XML stream

Returns:
  A Serializer instance

### getGenerator

public IGenerator getGenerator()
Returns the IChartGenerator interface used to run and render charts

Returns:
  IChartGenerator

### getRenderer

public IDeviceRenderer getRenderer(String deviceID) throws ChartException
Loads a device renderer, required by IChartGenerator to render charts

Parameters:
  `deviceID` - The type of output. Examples are dv.SWT, dv.PNG, dv.JPG, dv.PDF, dv.SVG
Returns:
  An IDeviceRenderer instance
Throws:
  `ChartException` - If the device renderer does not exist or there is problem loading it.

### getDataSetProcessor

public final IDataSetProcessor getDataSetProcessor(Class cSeries) throws ChartException
Retrieves the first instance of a data set processor registered as an extension for a given series type.

Parameters:
  `cSeries` - The Class instance associated with the given series type
Returns:
  A newly created instance of a registered data set processor extension
Throws:
  `ChartException`