Page 1 of 1
Chart Scripting to change Gantt Chart Task Label
#1
Posted 28 January 2010 - 09:27 PM
Hi,
I would like to use chart scripting to dynamically change the color of "Task Label" within Gantt Chart - Value (Y) Series.
I've been experimenting but could not find the appropriate function to call during onRender.
I've tried beforeDrawSeries() and beforeDrawSeriesTitle() but have not been able to locate "Task Label" within these functions.
Would appreciate your assistance.
Thank you.
Calvin
I would like to use chart scripting to dynamically change the color of "Task Label" within Gantt Chart - Value (Y) Series.
I've been experimenting but could not find the appropriate function to call during onRender.
I've tried beforeDrawSeries() and beforeDrawSeriesTitle() but have not been able to locate "Task Label" within these functions.
Would appreciate your assistance.
Thank you.
Calvin
#2
Posted 17 February 2010 - 09:59 AM
Hi Calvin,
On the series, it is the Decoration Label you are looking for. Below is a piece of code that will change those label colors, and attached is an example created in BIRT 2.5.1
On the series, it is the Decoration Label you are looking for. Below is a piece of code that will change those label colors, and attached is an example created in BIRT 2.5.1
function beforeDrawSeries( series, isr, icsc ) {
importPackage(Packages.org.eclipse.birt.chart.model.attribute.impl);
if (series.eClass().getName().equals("GanttSeries"))
{
java.lang.System.out.println(series);
series.getDecorationLabel().setBackground(ColorDefinitionImpl.BLACK());
}
}
Attached File(s)
-
gantt_chart_scripting.rptdesign (56.44K)
Number of downloads: 5 -
gantt_chart_scripting.rptdesign (56.44K)
Number of downloads: 5
Page 1 of 1



MultiQuote
