BIRT Exchange Forum: Chart Scripting to change Gantt Chart Task Label - BIRT Exchange Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Chart Scripting to change Gantt Chart Task Label Rate Topic: -----

#1 User is offline   ctan1010 

  • Junior Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 28-January 10

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
0

#2 User is offline   vdodson 

  • Administrator
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 856
  • Joined: 16-July 07

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


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)


0

#3 User is offline   ctan1010 

  • Junior Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 28-January 10

Posted 22 February 2010 - 08:36 PM

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 ?
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users