Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Calling the Simple Chart API from Script(BIRT)

< To: Report Developer Examples (BIRT)
This example is Bugzilla ID 190637. If you would like to contribute an example see the example contribution guidelines.

Introduction

A new Simple Chart API is available to modify Chart properties with the release of BIRT 2.2 RC0. This API can be within RE/DE API applications as well as from the scripting environment within a report. This example illustrates many of the methods available.

BIRT Version Compatibility

This example was built and tested with BIRT 2.2 RC0.

Example Files

Add a URL to your bugzilla attachment. eg. Example Report

Description

The simple Chart API is described in detail in [BPS66]. This example shows many chart properties being changed within the beforeFactory eventHandler. For example to change the chart output type the following script can be used.

 //first get handle to the chart (Name your Charts)
 //Before Factory
var chart1 = this.getReportElement( "Chart1" );
chart1.setOutputType("JPG");

Many examples exist in the example report, including changing titles, dimensions, fonts, etc.

Comments

Please enter comments below by selecting the edit icon to the right. You will need a Bugzilla account to add comments.


Back to the top