Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [birt-dev] BPS 66 - Chart Simple API SPEC.pdf

The APIs can be used in two different cases:

 

  1. The user calls this API directly to change the report design, it may be used in the report designer, report template. In this case, the user doesn’t need the report engine, only the report model is enough. The user cases are:

 

The user has got the report handle somewhere.

The user gets the IChart though the MODEL’s script API.

The user changes the IChart through CHART API.

The user saves the change the report design or uses it in somewhere else.

 

In this case, the CHART instance is created through MODEL API (such as getReportElement(“Chart”)).

 

  1. The script API is used by BIRT, it is defined in the report design, and called by the report engine. In this use cases, there are several kinds of script need to be evaluated:

1. onPrepare

      User can define this script used to change the chart definition before execution.

2. onCreate

      User can define this script used to change the content created by the chart, the changing will be serialized into the report document.

3. onRender

      User can define this script used to change the content before the rendering. The changed content will be rendered immediately.

4. onPageBreak

      The script is called when there exits a page-break. The behavior is undefined now.

In this case, the report engine should create the CHART Script instance (IChart) and evaluates the script. This spec only defines the CHART APIs used in onPrepare. The onCreate/onRender is not defined here.

 

It seems that:

 

  1. The extension point should be defined in MODEL plugin instead of engine, as the user may call this API directly in case 1.
  2. We don’t define a mechanism for extended container, such as XTAB. In this case, an XTAB is an extended item, the user may add other report items in the XTAB. After call the XTAB’s onPrepare, the report engine needs call the onPrepare defined in the inner child. To implement this, we needs exports getChildren() in the IReportItem, which returns the children IReportItem.

 

 

 

 

-Wei Yan

 


From: birt-dev-bounces@xxxxxxxxxxx [mailto:birt-dev-bounces@xxxxxxxxxxx] On Behalf Of David Michonneau
Sent: Thursday, February 22, 2007 3:40 PM
To: For developers on the BIRT Charting project
Cc: For developers on the BIRT project
Subject: [birt-dev] BPS 66 - Chart Simple API SPEC.pdf

 

Hi All,

 

Here is the specification document for the Chart Simple API project. Its goal is to provide a simple API to modify charts inside a report design through the BIRT Report Engine Scripting API. Note that there is a new extension point in the engine plugin for extended items to extend the engine’s IReportItem interface.

 

You can also find this document on the wiki at http://wiki.eclipse.org/index.php/BPS66

 

Thanks,

 

David


Back to the top