Go Back   Forum - BIRT Exchange > Designing BIRT Reports Forums > Designing BIRT Reports

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-28-2010, 10:27 PM
Junior Member
 
Join Date: Jan 2010
Posts: 2
Default Chart Scripting to change Gantt Chart Task Label

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
Reply With Quote
  #2 (permalink)  
Old 02-17-2010, 10:59 AM
Super Moderator
 
Join Date: Jul 2007
Posts: 816
Send a message via Yahoo to vdodson
Default

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

Code:
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 Files
File Type: rptdesign gantt_chart_scripting.rptdesign (56.4 KB, 1 views)
__________________
~Virgil
http://twitter.com/birtexchange
Reply With Quote
  #3 (permalink)  
Old 02-22-2010, 09:36 PM
Junior Member
 
Join Date: Jan 2010
Posts: 2
Red face getDecoration not available on Eclipse Platform 3.4.1

Hi vdodson,

Thank you for your examples.
However, I neglected to mention that I'm on Eclipse 3.4.1.

Unfortunately, getDecoration is not available on series on this version.

Any other thoughts ?
Reply With Quote
Reply


Thread Tools
Display Modes




All times are GMT -7. The time now is 10:13 AM.
Powered by vBulletin Copyright © 2000-2010 Jelsoft Enterprises Limited.


Content Relevant URLs by vBSEO 3.1.0